In probability theory and statistics, the triangular distribution is a continuous
probability distribution with the probability density function defined on the interval [a, b]:
where a (location), b (scale) and c (shape) are the triangular distribution parameters.
The cumulative distribution function is:
The expected value and variance of a triangular random variable X are:
The distribution simplifies when c=a or c=b. For example, if a=0, b=1 and c=1, then the equations above become: