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

[1]:
from __future__ import print_function
import openturns as ot
[2]:
# 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)]
[3]:
# create the distribution
distribution = ot.MaximumEntropyOrderStatisticsDistribution(coll)
print(distribution)
MaximumEntropyOrderStatisticsDistribution(collection = [Beta(r = 1.5, t = 3.2, a = 0, b = 1),Beta(r = 2, t = 4.3, a = 0.5, b = 1.2)])
[4]:
# draw a sample (ordered!)
distribution.getSample(10)
[4]:
X0X1
00.57380168128115730.640331333512734
10.056149270346530861.0876500496604604
20.86094776842528560.871370278512005
30.304463764949226670.72287671649012
40.369279702009523540.9884771935681209
50.306281179786467350.9391618306818713
60.62025870929602640.7522133010565687
70.90871632223340950.9355207646820087
80.11861143515573390.6498097139211859
90.37912320644114250.7376445845601645
[5]:
# draw PDF
distribution.drawPDF()
[5]:
../../_images/examples_probabilistic_modeling_order_statistics_distribution_6_0.svg