The triangular distribution is a useful tool if a variable has to be estimated subjectively. The estimator has to indicate a Low, a Most Likely value (Mode) and a High value, the distribution contained within the Low to High range. In the formulas below "l" is the Low, "m" is the mode and "h" the High value. In other descriptions (Wikipedia) the characters "a", "c" and "b" are used resp. for l, m and h.
The pdf is a triangle:
and as a formula:
The mean is:
The variance is:
The CDF consists of two curved line segments, with a discontinuity at the mode.
In this case it is interesting to know also the inverse form of the cumulative distribution function:
This formula is used in generating a random triangular deviate from a rectangular one between 0 and 1 in Monte Carlo analysis.
The triangular distribution can be fitted to a data sample to find a rough estimate of the mode. If the distribution type is unknown it is quite difficult to estimate the mode, as no simple analytical solution is at hand. In such case an easy way is to fit a triangular to the data by recording the lowest and the highest values as l and h, as well as calculating the mean. Then the mode (m) is:
However, this simple solution may go entirely wrong if the distribution of the data is such that the mean is very low in comparison to the
High parameter. Then the mode estimate might end up on the left of the Low! In such case the triangular distribution can not reasonably be fitted to the data (for instance if the data are lognormally distributed).