In statistics and probability theory, triangular distribution is a continuous probability distribution. The probability density function of a triangular distribution is shaped like a simple geometric shape, triangle.
The triangular distribution is a good model for skewed distributions. It has a definite lower and upper limit, which is helpful to avoid unwanted extreme values. Usually according to the property of the probability density functions, area under the function is one but for triangular distribution the maximum value of the probability distribution function is $\frac{2}{n-m}$ if x $\in$ [m, n].
The sum of three dice is a discrete triangular distribution with minimum value 3, maximum value 18 and a peak at 13. The triangular distribution is similar to the trapezoidal in that the probability increase linearly from the minimum and then decrease linearly from the maximum, but differ in that it has only one mode.

## Triangular Distribution Function

The triangular distribution is used to describe a random variable that in a particular interval but is most likely to have values in the middle of the interval. This distribution is one that looks like a triangle with one side on the x-axis. The sides extends from a lower value to higher value and the most likely value is the mode.
For example: a triangular distribution with lower value of 15, higher value of 80, and mode of 25 will be skewed to the left.

Above graph shows the pdf of a triangle distribution with m = 2, n = 7 and t = 4.
Triangular distribution is defined by three points:
1) Minimum point
2) Maximum point
3) Peak point.

## Triangular Distribution Formula

The triangular distribution is requires only three parameters: a lower and upper bound to set the limits of the distribution, along with a likeliest score to establish the peak location.

The probability density function and cumulative density function of a triangular distribution are defined on the interval [m, n] is illustrated as:

The probability density function :

$f(x ; m, n, t)$ = $\left\{\begin{matrix} 0 & ; for\ x < m\\ \frac{2(x-m)}{(n-m)(t-m)} &;for\ m \leq x \leq t \\ \frac{2(n-x)}{(n-m)(n-t)} & ;for\ t < x \leq n\\ 0& ;for\ n\end{matrix}\right.$

The cumulative density function :

$F(x ; m, n, t)$ = $\left\{\begin{matrix} 0 & ; for\ x < m\\ \frac{(x-m)^2}{(n-m)(t-m)} &;for\ m \leq x \leq t \\ \frac{(n-x)^2}{(n-m)(n-t)} & ;for\ t < x \leq n\\ 1& ;for\ n\end{matrix}\right.$

Where $x$ is the random variable and t $\in$ [m, n] is the mode.

The maximum value of the probability distribution for the triangular distribution is given below:
Maximum value of the probability distribution:

$(pdf)$ $_{maximum}$ = $\frac{2}{n-m}$ ; $x$ $\in$ [m, n]

The probability density function of a triangular distribution is zero for values below minimum value and values above maximum value.

## Triangular Distribution Example

Below are some examples on triangular distribution:
Example 1: Find the probability, Pr(4 < x < 7), for a triangular distribution with m = 1 (minimum value), n = 8 (maximum value) and t = 3 (peak value).

Solution:
Given:
Minimum value = 1, Maximum value = 8 and Peak value = 3

And Pr (4 < x < 7) is the area under the pdf for x between 4 and 7.

Step 1:
From the given information we can draw a diagram:

Now we have to find the area of ABCD. From above figure we can see that shaded area (resultant area) is not a triangle.

Step 2:
To find the resultant area, subtract the area of triangle EDC from the triangle ABE.

For the triangle EDC

Base = 8 - 7 = 1 and

Height = $f(7)$ = $\frac{2(n-x)}{(n-m)(n-t)}$ = $\frac{2 \times 1}{7 \times 5}$ = $\frac{2}{35}$ = 0.0571

(Here n = 8, m = 1, $x$ = 7 and t  = 3)

So Area of $\triangle$ EDC = $\frac{1}{2}$ $\times$ 1 $\times$ 0.0571 = 0.0286

For the triangle ABE

Base = 8 - 4 = 4 and

Height = $f(4)$ = $\frac{2(n-x)}{(n-m)(n-t)}$ = $\frac{2 \times 4}{7 \times 5}$ = $\frac{8}{35}$ = 0.229

(Here n = 8, m = 1, $x$ = 4 and t  = 3)

So Area of $\triangle$ ABE = $\frac{1}{2}$ $\times$ 4 $\times$ 0.229 = 0.458

Step 3: The probability is Pr (4 < $x$ < 7) = Area of $\triangle$ ABE - Area of $\triangle$ EDC

= 0.458 - 0.0286

Example 2:
Calculate the area for the shaded region:

Solution:
Since the total area under the curve is 1, so to calculate Pr (x > 300) subtract whole area from 1 i.e. Pr (x > 300) = 1 - Area of unshaded triangle.

Height = $f(300)$ = $\frac{2(n-x)}{(n-m)(n-t)}$ = $\frac{2 \times 500}{700 \times 300}$ = 0.00476
Area of triangle = $\frac{1}{2}$ $\times$ 200 $\times$ 0.00476 = 0.476