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:

    Assemble, first, all casual bits and scraps
    That may shake down into a world perhaps;
    People this world, by chance created so,
    With random persons whom you do not know—
    Robert Graves (1895–1985)