Note
Click here 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)
Out:
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()
Total running time of the script: ( 0 minutes 0.094 seconds)