Standard triangular distribution (from http://www.math.wm.edu/˜ leemis/chart/UDR/UDR.html ) The shorthand X ∼ triangular(−1, 0, 1) is used to indicate that the random variable X has the standard triangular distribution. A standard triangular random variable X has the probability density function

f(x) = \{ \begin{matrix}x + 1 & −1 < x < 0 \\ 1 − x & 0 ≤ x < 1. \end{matrix}

The probability density function is illustrated below.

PSfrag replacements

x f(x) −1 0 1

The cumulative distribution function on the support of X is

F (x) = \{ \begin{matrix}\frac{1}{2}x^{2}+ x + \frac{1}{2} & −1 < x < 0 \\ −\frac{1}{2}x^{2}+ x + \frac{1}{2} & 0 ≤ x < 1. \end{matrix}

The survivor function is

S(x) = \{ \begin{matrix}−\frac{1}{2}x^{2}− x + \frac{1}{2} & −1 < x < 0 \\ \frac{1}{2}x^{2}− x + \frac{1}{2} & 0 ≤ x < 1. \end{matrix}

The hazard function is

h(x) = \{ \begin{matrix}\frac{2(x+1)}{−x^{2}−2x+1} & −1 < x < 0 \\ \frac{2}{1−x} & 0 ≤ x < 1. \end{matrix}

The cumulative hazard function is

H(x) = \{ \begin{matrix}−ln(−\frac{1}{2}x^{2}− x + \frac{1}{2}) & −1 < x < 0 \\ −ln( \frac{1}{2}x^{2}− x + \frac{1}{2}) & 0 ≤ x < 1. \end{matrix}

The inverse distribution function of X is

F^{−1} (u) = \{ \begin{matrix}−1 + \sqrt{2u} & 0 < u < \frac{1}{2} \\ 1 − \sqrt{2 − 2u} & \frac{1}{2} ≤ u < 1. \end{matrix}

The median of X is 0. The mode of X is 0. The moment generating function of X is

M(t) = E [e^{tX}] = \{ \begin{matrix}1 & t = 0 \\ \frac{e^{−t} −2+e^{t}}{t^{2}} & t ≠ 0. \end{matrix}

The population mean, variance, skewness, and kurtosis of X are

E[X] = 0  V [X] = \frac{1}{6}  E [( \frac{X − μ}{σ} ) ^{3}] = 0  E [( \frac{X − μ}{σ} ) ^{4}] = \frac{12}{5}.

An alternate definition of the standard triangular distribution exists. The alternate definition has a minimum of 0, a maximum of 1, and a parameter m, representing the mode.

APPL verification: The APPL statements

X := TriangularRV(-1,0,1); CDF(X); SF(X); HF(X); Mean(X); Variance(X); Skewness(X); Kurtosis(X); MGF(X);

verify the cumulative distribution function, survivor function, hazard function, population mean, variance, skewness, kurtosis, and moment generating function.