Triangular distribution

{{Probability distribution | name      =Triangular| type      =density| pdf_image =| cdf_image =| parameters =$$a:~a\in (-\infty,\infty)$$ $$b:~b>a\,$$ $$c:~a\le c\le b\,$$| support   =$$a \le x \le b \!$$| pdf       =$$ \left\{ \begin{matrix} \frac{2(x-a)}{(b-a)(c-a)} & \mathrm{for\ } a \le x \le c \\ & \\ \frac{2(b-x)}{(b-a)(b-c)} & \mathrm{for\ } c \le x \le b                  \end{matrix} \right. $$| cdf        =$$ \left\{ \begin{matrix} \frac{(x-a)^2}{(b-a)(c-a)} & \mathrm{for\ } a \le x \le c \\ & \\ 1-\frac{(b-x)^2}{(b-a)(b-c)} & \mathrm{for\ } c \le x \le b                  \end{matrix} \right. $$| mean       =$$\frac{a+b+c}{3}$$| median    =$$ \left\{ \begin{matrix} a+\frac{\sqrt{(b-a)(c-a)}}{\sqrt{2}} & \mathrm{for\ } c\!\ge\!\frac{b\!-\!a}{2}\\ & \\ b-\frac{\sqrt{(b-a)(b-c)}}{\sqrt{2}} & \mathrm{for\ } c\!\le\!\frac{b\!-\!a}{2} \end{matrix} \right. $$| mode       =$$c\,$$| variance  =$$\frac{a^2+b^2+c^2-ab-ac-bc}{18}$$| skewness  =$$ \frac{\sqrt 2 (a\!+\!b\!-\!2c)(2a\!-\!b\!-\!c)(a\!-\!2b\!+\!c)}{5(a^2\!+\!b^2\!+\!c^2\!-\!ab\!-\!ac\!-\!bc)^\frac{3}{2}} $$| kurtosis   =$$-\frac{3}{5}$$| entropy   =$$\frac{1}{2}+\ln\left(\frac{b-a}{2}\right)$$| mgf       =$$2\frac{(b\!-\!c)e^{at}\!-\!(b\!-\!a)e^{ct}\!+\!(c\!-\!a)e^{bt}} {(b-a)(c-a)(b-c)t^2}$$| char      =$$-2\frac{(b\!-\!c)e^{iat}\!-\!(b\!-\!a)e^{ict}\!+\!(c\!-\!a)e^{ibt}} {(b-a)(c-a)(b-c)t^2}$$| }}

In probability theory and statistics, the triangular distribution is a continuous probability distribution with lower limit a, mode c and upper limit b.

$$f(x|a,b,c)=\left\{ \begin{matrix} \frac{2(x-a)}{(b-a)(c-a)} & \mathrm{for\ } a \le x \le c \\ & \\ \frac{2(b-x)}{(b-a)(b-c)} & \mathrm{for\ } c \le x \le b \\ & \\ 0                        & \mathrm{for\ any\ other\ case} \end{matrix} \right. $$

Two points known
The distribution simplifies when c=a or c=b. For example, if a=0, b=1 and c=1, then the equations above become:
 * $$ \left.\begin{matrix}f(x) &=& 2x \\ \\                                                      F(x) &=& x^2 \end{matrix}\right\} \mathrm{for\ } 0 \le x \le 1 $$


 * $$ \begin{matrix}

E(X) &=& \frac{2}{3} \\ & & \\ \mathrm{Var}(X) &=& \frac{1}{18} \end{matrix} $$

Distribution of two standard uniform variables
This distribution for a=0, b=1 and c=0.5 is distribution of $$X = \frac{X_1+X_2}{2} $$, where $$X_1, X_2 $$ are two random variables with standard uniform distribution.



f(x)=\left\{\begin{matrix} 4x  & \mathrm{for\ }0 \le x < \frac{1}{2}   \\ \\ 4-4x & \mathrm{for\ }\frac{1}{2} \le x \le 1 \end{matrix}\right. $$



F(x)=\left\{\begin{matrix} 2x^2      & \mathrm{for\ }0 \le x < \frac{1}{2}     \\ \\ 1-2(1-x)^2 & \mathrm{for\ }\frac{1}{2} \le x \le 1 \end{matrix}\right. $$


 * $$ \begin{matrix}

E(X) &=& \frac{1}{2} \\ \\ \mathrm{Var}(X) &=& \frac{1}{24} \end{matrix} $$

Distribution of the absolute difference of two standard uniform variables
This distribution for a=0, b=1 and c=0 is distribution of $$X = | X_1-X_2 | $$, where $$X_1, X_2 $$ are two random variables with standard uniform distribution.


 * $$ \begin{matrix}

f(x)&=& 2 - 2x \qquad \mathrm{for\ } 0 \le x < 1 \\ \\

F(x) &=& 2x - x^2 \qquad \mathrm{for\ } 0 \le x < 1 \\ \\ \end{matrix} $$


 * $$ \begin{matrix}

E(X) &=& \frac{1}{3} \\ \\ \mathrm{Var}(X) &=& \frac{1}{18} \end{matrix} $$

Use of the distribution
The Triangular Distribution is typically used as a subjective description of a population for which there is only limited sample data, and especially in cases where the relationship between variables is known but data is scarce (possibly because of the high cost of collection). It is based on a knowledge of the minimum and maximum and an "inspired guess" as to the modal value.

Business simulations
The Triangular distribution is therefore often used in business decision making, particularly in simulations. Generally, when not much is known about the distribution of an outcome, (say, only its smallest and largest values) it is possible to use the uniform distribution. But if the most likely outcome is also known, then the outcome can be simulated by a Triangular distribution. See for example under Corporate Finance.

Project management
The Triangular distribution, along with the Beta distribution, is also widely used in project management (as an input into PERT and hence critical path method (CPM)) to model events which take place within an interval defined by a minimum and maximum value.

Audio Dithering
The symmetric triangular distribution is commonly used in audio dithering, where it is called TPDF (Triangular Probability Density Function).