TOPICS
Search

Triangular Distribution


TriangularDistribution

The triangular distribution is a continuous distribution defined on the range x in [a,b] with probability density function

 P(x)={(2(x-a))/((b-a)(c-a))   for a<=x<=c; (2(b-x))/((b-a)(b-c))   for c<x<=b
(1)

and distribution function

 D(x)={((x-a)^2)/((b-a)(c-a))   for a<=x<=c; 1-((b-x)^2)/((b-a)(b-c))   for c<x<=b,
(2)

where c in [a,b] is the mode.

The sum S=X+Y of two independent random variables, each with a uniform distribution on [0,1], has the symmetric triangular distribution on [0,2]. The map from (x,y) to (x,s)=(x,x+y) has Jacobian determinant 1. Thus the probability density function of S at s is the length in the x coordinate of the diagonal slice x+y=s through the unit square. The inequalities 0<=x<=1 and 0<=s-x<=1 give

 max(0,s-1)<=x<=min(1,s),
(3)

so the density is s on [0,1], 2-s on [1,2], and zero outside [0,2] (3Blue1Brown 2023).

The symmetric triangular distribution on [a,b] is implemented in the Wolfram Language as TriangularDistribution[a, b], and the triangular distribution on [a,b] with mode c as TriangularDistribution[a, b, c].

The mean is

 mu=1/3(a+b+c),
(4)

the raw moments are

mu_2^'=1/6(a^2+b^2+c^2+ab+ac+bc)
(5)
mu_3^'=1/(10)(a^3+b^3+c^3+a^2b+a^2c+b^2a+b^2c+c^2a+c^2b+abc),
(6)

and the central moments are

mu_2=1/(18)(a^2+b^2+c^2-ab-ac-bc)
(7)
mu_3=-1/(270)(a+b-2c)(a+c-2b)(b+c-2a)
(8)
mu_4=1/(135)(a^2+b^2+c^2-ab-ac-bc)^2.
(9)

It has skewness and kurtosis excess given by

gamma_1=(sqrt(2)(a+b-2c)(2a-b-c)(a-2b+c))/(5(a^2+b^2+c^2-ab-ac-bc)^(3/2))
(10)
gamma_2=-3/5.
(11)

Among probability density functions that are affine on [a,b] and zero outside it, a constant density gives the uniform distribution, and a density vanishing at an endpoint gives a triangular distribution with mode at the opposite endpoint. After rescaling to [-1,1], the density is P(x)=(1+tx)/2 with -1<=t<=1. Its skewness gamma_1=2t(5t^2-9)/[5(3-t^2)^(3/2)] decreases with t, so |gamma_1|<=2sqrt(2)/5, with equality only for the two endpoint modes.


See also

Triangle Function, Uniform Distribution

Explore with Wolfram|Alpha

References

3Blue1Brown. "Convolutions | Why X+Y in Probability Is a Beautiful Mess" YouTube. Jun. 27, 2023. https://www.youtube.com/watch?v=IaSGqQa5O-M.Evans, M.; Hastings, N.; and Peacock, B. "Triangular Distribution." Ch. 40 in Statistical Distributions, 3rd ed. New York: Wiley, pp. 187-188, 2000.

Referenced on Wolfram|Alpha

Triangular Distribution

Cite this as:

Weisstein, Eric W. "Triangular Distribution." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/TriangularDistribution.html

Subject classifications