# Create a maximum distribution¶

In this basic example we are going to build the distribution of the maximum of independent distributions.

In [52]:

from __future__ import print_function
import openturns as ot

In [53]:

# create a collection of distribution
distribution1 = ot.Normal()
distribution2 = ot.Uniform(-1.0, 2.0)
distColl = [distribution1, distribution2]

In [54]:

# create the distribution
distribution = ot.MaximumDistribution(distColl)
print(distribution)

MaximumDistribution(ComposedDistribution(Normal(mu = 0, sigma = 1), Uniform(a = -1, b = 2), IndependentCopula(dimension = 2)))

In [55]:

# draw PDF
distribution.drawPDF()

Out[55]: