Triangular Distribution Sample Generator

Triangular Distribution Sample Generator

Generate random samples from a Triangular distribution using:
If \( U < \frac{c-a}{b-a} \): $$ x = a + \sqrt{U\,(b-a)(c-a)}; $$
Otherwise: $$ x = b – \sqrt{(1-U)(b-a)(b-c)}. $$

* Enter the parameters \( a \), \( c \) (with \( a \le c \le b \)), \( b \), and the desired sample size.

Step 1: Enter Parameters

e.g., 0

e.g., 5 (ensure \( a \le c \le b \))

e.g., 10

e.g., 1000

Samples are generated using the inverse transform method for the Triangular distribution.

Related Calculators