Note
Go to the end to download the full example code
Create the distribution of the maximum of independent distributionsΒΆ
In this example we are going to build the distribution of the maximum of independent distributions.
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt
ot.Log.Show(ot.Log.NONE)
create a collection of distribution
distribution1 = ot.Normal()
distribution2 = ot.Uniform(-1.0, 2.0)
distColl = [distribution1, distribution2]
create the distribution
distribution = ot.MaximumDistribution(distColl)
print(distribution)
MaximumDistribution(ComposedDistribution(Normal(mu = 0, sigma = 1), Uniform(a = -1, b = 2), IndependentCopula(dimension = 2)))
draw PDF
graph = distribution.drawPDF()
view = viewer.View(graph)
plt.show()