.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_probabilistic_modeling/distributions/plot_order_statistics_distribution.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_probabilistic_modeling_distributions_plot_order_statistics_distribution.py: Create a maximum entropy statistics distribution ================================================ .. GENERATED FROM PYTHON SOURCE LINES 6-11 In this example we are going to build maximum entropy statistics distribution, which yields ordered realizations: .. math:: X_1 \leq \dots \leq X_n .. GENERATED FROM PYTHON SOURCE LINES 13-19 .. code-block:: Python import openturns as ot import openturns.viewer as viewer from matplotlib import pylab as plt ot.Log.Show(ot.Log.NONE) .. GENERATED FROM PYTHON SOURCE LINES 20-21 create a collection of distribution .. GENERATED FROM PYTHON SOURCE LINES 21-23 .. code-block:: Python coll = [ot.Beta(1.5, 1.7, 0.0, 1.0), ot.Beta(2.0, 2.3, 0.5, 1.2)] .. GENERATED FROM PYTHON SOURCE LINES 24-25 create the distribution .. GENERATED FROM PYTHON SOURCE LINES 25-28 .. code-block:: Python distribution = ot.MaximumEntropyOrderStatisticsDistribution(coll) print(distribution) .. rst-class:: sphx-glr-script-out .. code-block:: none 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)]) .. GENERATED FROM PYTHON SOURCE LINES 29-30 draw a sample (ordered!) .. GENERATED FROM PYTHON SOURCE LINES 30-32 .. code-block:: Python distribution.getSample(10) .. raw:: html
X0X1
00.63807050.7940242
10.31188010.8304515
20.45251620.6586167
30.67248170.8490304
40.29772580.9140666
50.16911290.9547993
60.35459620.9400742
70.83380340.8877587
80.18304820.8514765
90.58593670.8921155


.. GENERATED FROM PYTHON SOURCE LINES 33-34 draw PDF .. GENERATED FROM PYTHON SOURCE LINES 34-37 .. code-block:: Python graph = distribution.drawPDF() view = viewer.View(graph) plt.show() .. image-sg:: /auto_probabilistic_modeling/distributions/images/sphx_glr_plot_order_statistics_distribution_001.png :alt: [X0,X1] iso-PDF :srcset: /auto_probabilistic_modeling/distributions/images/sphx_glr_plot_order_statistics_distribution_001.png :class: sphx-glr-single-img .. _sphx_glr_download_auto_probabilistic_modeling_distributions_plot_order_statistics_distribution.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_order_statistics_distribution.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_order_statistics_distribution.py `