Create a composed distributionΒΆ

In this example we are going to create a multidimensional distribution described by its marginal distributions and optionally its dependence structure (a particular copula).

[1]:
from __future__ import print_function
import openturns as ot
[2]:
# create the marginals
marginals = [ot.Normal(), ot.Gumbel()]
[3]:
# create the multivariate distribution, assume no dependency structure
distribution = ot.ComposedDistribution(marginals)
[4]:
# draw PDF
distribution.drawPDF()
[4]:
../../_images/examples_probabilistic_modeling_composed_distribution_5_0.svg
[5]:
# create the copula which specifies the dependency structure
R = ot.CorrelationMatrix(2)
R[0, 1] = 0.3
copula = ot.NormalCopula(R)
copula
[5]:

NormalCopula(R = [[ 1 0.3 ]
[ 0.3 1 ]])

[6]:
# create the multivariate distribution with the desired copula
distribution = ot.ComposedDistribution(marginals, copula)
[7]:
# draw PDF
distribution.drawPDF()
[7]:
../../_images/examples_probabilistic_modeling_composed_distribution_8_0.svg