@@ -673,6 +673,8 @@ As for arithmetic operators and built-ins, this list can be extended on demand.
673673 +-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
674674 | **histograms ** | any | discrete distributions defined by means of a list of pairs |
675675 +-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
676+ | **triangle ** | 3 | triangle (or triangular) distribution defined by its two limits and mode |
677+ +-----------------------+------------+-------------------------------------------------------------------------------------------------------------+
676678
677679Uniform Deviates
678680 These primitives describe uniform distributions in a given range
@@ -808,6 +810,19 @@ Histograms
808810 with the initial value
809811 :math: `x_0 = 0 , x_1 = 2 m_1 , \text { and } x_i = x_{i-1 } + 2 (m_i - x_{i-1 })`.
810812
813+ Triangle Distributions
814+ A triangle (or triangular) distribution is a special case of a piecewise-linear distribution
815+ defined only by three bounds :math: `(a, b, c)`,
816+ a lower limit, mode, and upper limit respectively.
817+ The lower and upper limit weights are 0,
818+ and the most probable value :math: `b` has :math: `\frac {2 }{c - a}` weight.
819+
820+ The expected value of a triangle distribution is the arithmetic mean of its bounds.
821+
822+ .. math ::
823+
824+ E(x) = \frac {a + b + c}{3 }
825+
811826
812827 XML Representation
813828------------------
@@ -824,6 +839,7 @@ The Backus-Naur grammar for the XML representation of random deviates is given
824839 | <gamma-deviate> [ expression ]:2 </gamma-deviate>
825840 | <beta-deviate> [ expression ]:2 </beta-deviate>
826841 | histogram
842+ | <triangle> [ expression ]:3 </triangle>
827843
828844 histogram ::= <histogram > expression /bin/+ </histogram>
829845
0 commit comments