Create a maximum entropy statistics distributionΒΆ

In this example we are going to build maximum entropy statistics distribution, which yields ordered realizations:

X_1 \leq \dots \leq X_n

from __future__ import print_function
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

coll = [ot.Beta(1.5, 1.7, 0.0, 1.0),  ot.Beta(2.0, 2.3, 0.5, 1.2)]

create the distribution

distribution = ot.MaximumEntropyOrderStatisticsDistribution(coll)
print(distribution)

Out:

MaximumEntropyOrderStatisticsDistribution(collection = [Beta(alpha = 1.5, beta = 1.7, a = 0, b = 1),Beta(alpha = 2, beta = 2.3, a = 0.5, b = 1.2)])

draw a sample (ordered!)

distribution.getSample(10)
X0X1
00.64402871.086573
10.71416910.9588674
20.43627110.6576377
30.59404180.6238439
40.52731630.5399325
50.30978740.742308
60.63993050.7142689
70.81387420.8253311
80.58899750.7029539
90.49693040.5786498


draw PDF

graph = distribution.drawPDF()
view = viewer.View(graph)
plt.show()
[X0,X1] iso-PDF

Total running time of the script: ( 0 minutes 0.428 seconds)

Gallery generated by Sphinx-Gallery