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:

    ... the random talk of people who have no chance of immortality and thus can speak their minds out has a setting, often, of lights, streets, houses, human beings, beautiful or grotesque, which will weave itself into the moment for ever.
    Virginia Woolf (1882–1941)