[ot-users] Random variable algebra

HADDAD Sofiane sofiane_haddad at yahoo.fr
Wed Sep 20 12:31:37 CEST 2017


Hi
I don t know if you already get answers for the above questions.
For the +/* operators, we should respectively refers to RandomMixture & ProductDistribution for more details
import openturns as ot
a = ot.Normal() b = ot.LogNormal() #c = a*b ==> ProductDistribution distribution — OpenTURNS documentationc = ot.ProductDistribution(a, b) 
# d = a + b ==> RandomMixture — OpenTURNS documentation
  
|   |

 d = ot.RandomMixture([a, b])
  
|   |

 


 Regards,Sofiane
 

    Le Jeudi 7 septembre 2017 0h32, Phil Fernandes <phil.fernandes at enbridge.com> a écrit :
 

  <!--#yiv0344931583 _filtered #yiv0344931583 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv0344931583 #yiv0344931583 p.yiv0344931583MsoNormal, #yiv0344931583 li.yiv0344931583MsoNormal, #yiv0344931583 div.yiv0344931583MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv0344931583 a:link, #yiv0344931583 span.yiv0344931583MsoHyperlink {color:blue;text-decoration:underline;}#yiv0344931583 a:visited, #yiv0344931583 span.yiv0344931583MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv0344931583 span.yiv0344931583EmailStyle17 {font-family:"Calibri", "sans-serif";color:windowtext;}#yiv0344931583 .yiv0344931583MsoChpDefault {font-family:"Calibri", "sans-serif";} _filtered #yiv0344931583 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv0344931583 div.yiv0344931583WordSection1 {}-->I’m curious about the methods used for random variable algebra in OpenTurns; that is, what are the mathematics / pseudocode used for adding/subtracting and multiplying or dividing Distribution objects? For example, a = ot.Normal() b = ot.LogNormal() c = a*b    When calculating probabilities of failure using a limit state function, are there guidelines for when it is faster and/or more accurate to write the limit state function as an algebraic expression of the random variables compared to using FORM or SORM with a Function or NumericalMathFunction?    Thanks, Phil _______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openturns.org/pipermail/users/attachments/20170920/7f1dd042/attachment.html>


More information about the users mailing list