Note
Go to the end to download the full example code.
Create a conditional random vectorΒΆ
In this example we are going to build a conditional random vector
import openturns as ot
Create the random vector (parameters of )
gammaDist = ot.Uniform(1.0, 2.0)
alphaDist = ot.Uniform(0.0, 0.1)
thetaDist = ot.JointDistribution([gammaDist, alphaDist])
thetaRV = ot.RandomVector(thetaDist)
Create the distribution
XgivenThetaDist = ot.Exponential()
Create the distribution
XDist = ot.ConditionalRandomVector(XgivenThetaDist, thetaRV)
Draw a sample
XDist.getSample(5)