Triangular Distribution - Generating Triangular-distributed Random Variates

Generating Triangular-distributed Random Variates

Given a random variate U drawn from the uniform distribution in the interval (0, 1), then the variate


\begin{matrix}
\begin{cases}
X = a + \sqrt{U(b-a)(c-a)} & \text{ for } 0 < U < F(c) \\ & \\
X = b - \sqrt{(1-U)(b-a)(b-c)} & \text{ for } F(c) \le U < 1
\end{cases}
\end{matrix}

Where F(c) = (c-a)/(b-a)

has a Triangular distribution with parameters a, b and c. This can be obtained from the cumulative distribution function.

Read more about this topic:  Triangular Distribution

Famous quotes containing the word random:

    It is a secret from nobody that the famous random event is most likely to arise from those parts of the world where the old adage “There is no alternative to victory” retains a high degree of plausibility.
    Hannah Arendt (1906–1975)