@@ -533,7 +533,7 @@ When used to perform Monte-Carlo simulations,
533
533
they return a number drawn at pseudo-random according to their type.
534
534
The Model Exchange Format includes two types of random deviates:
535
535
built-in deviates like uniform, normal or lognormal,
536
- and histograms that are user defined discrete distributions.
536
+ and user defined discrete distributions like histograms .
537
537
A preliminary list of distributions is summarized in :numref: `table_random_deviates `.
538
538
As for arithmetic operators and built-ins, this list can be extended on demand.
539
539
@@ -556,6 +556,8 @@ As for arithmetic operators and built-ins, this list can be extended on demand.
556
556
+-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
557
557
| **histograms ** | any | discrete distributions defined by means of a list of pairs |
558
558
+-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
559
+ | **discrete ** | >1 | discrete distributions defined by means of a list of pairs |
560
+ +-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
559
561
560
562
Uniform Deviates
561
563
These primitives describe uniform distributions in a given range
@@ -685,9 +687,7 @@ Histograms
685
687
686
688
\mathbf {E}(X) = \frac {1 }{x_n - x_0 } \times \sum _{i=1 }^{n}(x_i - x_{i-1 })\mathbf {E}(E_i)
687
689
688
- Both Cumulative Distribution Functions
689
- and Density Probability Distributions can be translated into histograms.
690
-
690
+ Cumulative Distribution Functions can be translated into histograms.
691
691
A Cumulative Distribution Function is a list of pairs
692
692
:math: `(p_1 , v_1 ), \ldots , (p_n, v_n)`,
693
693
where the :math: `p_i`'s are
@@ -701,17 +701,31 @@ Histograms
701
701
with the initial value
702
702
:math: `x_0 = 0 , x_1 = p_1 , \text { and } x_i = p_i - p_{i-1 } \text { for all } i>1 `.
703
703
704
- A Discrete Probability Distribution is a list of pairs
705
- :math: `(d_1 , m_1 ), \ldots , (d_n, m_n)`.
706
- The :math: `d_i`'s are probability densities.
707
- However, they could be any kind of values.
708
- The :math: `m_i`'s are midpoints of intervals
709
- and are such that :math: `m_1 < m_2 < \ldots < m_n < 1 `.
710
- The histogram that corresponds to a Discrete Probability Distribution
711
- :math: `(d_1 , m_1 ), \ldots , (d_n, m_n)`
712
- is the list of pairs :math: `(x_1 , d_1 ), \ldots , (x_n, d_n)`,
713
- with the initial value
714
- :math: `x_0 = 0 , x_1 = 2 m_1 , \text { and } x_i = x_{i-1 } + 2 (m_i - x_{i-1 })`.
704
+ Discrete Distribution
705
+ A discrete distribution is a statistical distribution
706
+ whose variables can only take discrete values.
707
+ It is defined by a list of pairs
708
+ :math: `(a_1 , w_1 ), \ldots , (a_n, w_n)`.
709
+ The :math: `a_i`'s are the values of the distribution,
710
+ and the :math: `w_i` are their respective non-negative weights.
711
+
712
+ The probability density function of the discrete distribution:
713
+
714
+ .. math ::
715
+
716
+ f(x;w_1 ,\ldots ,w_n) = \frac {w_k}{\sum _{i=1 }^{n}w_i}
717
+
718
+ Where :math: `k` is such that
719
+
720
+ .. math ::
721
+
722
+ x = a_k \quad \forall k \in \mathbb {Z} : 1 \leq k \leq n
723
+
724
+ The default value is the expected value of the distribution.
725
+
726
+ .. math ::
727
+
728
+ E(x) = \dfrac {\sum _{i=1 }^{n}a_i \cdot w_i}{\sum _{i=1 }^{n}w_i}
715
729
716
730
717
731
XML Representation
0 commit comments