Skip to main content

Foundations

Triangular Distribution

A bounded continuous distribution defined by a lower endpoint, upper endpoint, and mode. Includes the PDF, CDF, moments, sum-of-uniforms construction, and why the shape is a useful bridge between geometry and probability.

CoreTier 2Stable~35 min

Why This Matters

theorem visual

The density is literally two normalized triangles

A triangular distribution is the simplest continuous distribution with a minimum, maximum, and most-likely value.

densityacbarea under curve = 1cumulative probability1acbCDF is piecewise quadraticSymmetric case: the sum of two independent Uniform(0,1) variables has a triangular density.

parameters

is the lower endpoint, is the upper endpoint, and is the mode.

mean

The center of mass of the triangular density averages the three defining vertices.

variance

Spread shrinks when the triangle is narrow and grows when the support widens.

The triangular distribution is a useful first continuous distribution after the uniform distribution. It has a bounded support like a uniform, but it also has a mode: one value is most likely. That makes it a clean model when you know a minimum, a maximum, and a best guess, but do not want to pretend the density is flat.

It is also a good probability-mechanics example. The density is made from two straight line segments, the cumulative distribution is piecewise quadratic, and the symmetric case appears by adding two independent uniform random variables. The standalone Probability Mechanics Lab shows the finite-sample version of the same mapping idea.

Definition

Definition

Triangular Distribution

Let a<c<ba<c<b. A random variable XX has a triangular distribution with lower endpoint aa, mode cc, and upper endpoint bb if its density is

fX(x)={2(xa)(ba)(ca),axc,2(bx)(ba)(bc),c<xb,0,otherwise.f_X(x)= \begin{cases} \dfrac{2(x-a)}{(b-a)(c-a)}, & a\le x\le c,\\[6pt] \dfrac{2(b-x)}{(b-a)(b-c)}, & c<x\le b,\\[6pt] 0, & \text{otherwise.} \end{cases}

The endpoint cases c=ac=a or c=bc=b are one-sided triangular distributions and are obtained as limits.

The height at the mode is 2/(ba)2/(b-a). This makes the total area equal to one: the left and right triangular areas sum to

12(ca)2ba+12(bc)2ba=1.\frac12(c-a)\frac{2}{b-a}+\frac12(b-c)\frac{2}{b-a}=1.

CDF

Theorem

Triangular Distribution CDF

Statement

For XTri(a,c,b)X\sim\operatorname{Tri}(a,c,b),

FX(x)={0,x<a,(xa)2(ba)(ca),axc,1(bx)2(ba)(bc),c<xb,1,x>b.F_X(x)= \begin{cases} 0, & x<a,\\[4pt] \dfrac{(x-a)^2}{(b-a)(c-a)}, & a\le x\le c,\\[8pt] 1-\dfrac{(b-x)^2}{(b-a)(b-c)}, & c<x\le b,\\[8pt] 1, & x>b. \end{cases}

Intuition

The density rises linearly up to cc, so accumulated area on the left is a triangle whose area grows quadratically in xax-a. On the right, it is easier to subtract the remaining right-side triangle from one.

Proof Sketch

Integrate the density. For axca\le x\le c, FX(x)=ax2(ta)/((ba)(ca))dt=(xa)2/((ba)(ca))F_X(x)=\int_a^x 2(t-a)/((b-a)(c-a))\,dt=(x-a)^2/((b-a)(c-a)). For c<xbc<x\le b, compute the remaining tail xb2(bt)/((ba)(bc))dt=(bx)2/((ba)(bc))\int_x^b 2(b-t)/((b-a)(b-c))\,dt=(b-x)^2/((b-a)(b-c)) and subtract it from one.

Why It Matters

The CDF gives exact interval probabilities and supports inverse transform sampling. The square roots in the inverse CDF come directly from these quadratic pieces. This is the same CDF logic used by order statistics, where sorted random variables turn distribution functions into probability calculations.

Failure Mode

Do not use the left formula past cc or the right formula before cc. The density changes slope at the mode, so the CDF has two different quadratic pieces.

Moments

Theorem

Mean and Variance

Statement

If XTri(a,c,b)X\sim\operatorname{Tri}(a,c,b), then

E[X]=a+b+c3,\mathbb E[X]=\frac{a+b+c}{3},

and

Var(X)=a2+b2+c2abacbc18.\operatorname{Var}(X)=\frac{a^2+b^2+c^2-ab-ac-bc}{18}.

Intuition

The mean is the center of mass of the triangular density. Moving the mode cc pulls the center toward the more likely side, but the endpoints still matter because they define the support.

Proof Sketch

Compute abxfX(x)dx\int_a^b x f_X(x)\,dx and abx2fX(x)dx\int_a^b x^2 f_X(x)\,dx by splitting the integral at cc. Substituting into Var(X)=E[X2](E[X])2\operatorname{Var}(X)=\mathbb E[X^2]-(\mathbb E[X])^2 gives the stated formula.

Why It Matters

These formulas make the triangular distribution easy to use in quick simulation and uncertainty estimates when only rough endpoint and mode information is available. The mean and variance connect directly to the moment tools in expectation, variance, covariance, and moments.

Failure Mode

The parameter cc is the mode, not the mean. The mean equals cc only in the symmetric case c=(a+b)/2c=(a+b)/2.

Sum of Uniforms

Theorem

Sum of Two Uniforms Is Triangular

Statement

If U,VUnif(0,1)U,V\sim\operatorname{Unif}(0,1) independently and S=U+VS=U+V, then SS has density

fS(s)={s,0s1,2s,1<s2,0,otherwise.f_S(s)= \begin{cases} s, & 0\le s\le 1,\\ 2-s, & 1<s\le 2,\\ 0, & \text{otherwise.} \end{cases}

Thus STri(0,1,2)S\sim\operatorname{Tri}(0,1,2).

Intuition

For a fixed sum ss, the possible pairs (u,v)(u,v) lie on the line u+v=su+v=s inside the unit square. The length of that slice grows until s=1s=1, then shrinks.

Proof Sketch

Use convolution:

fS(s)=fU(u)fV(su)du.f_S(s)=\int_{-\infty}^{\infty}f_U(u)f_V(s-u)\,du.

The integrand is one exactly when 0u10\le u\le 1 and 0su10\le s-u\le 1. The length of that interval is ss for 0s10\le s\le 1 and 2s2-s for 1<s21<s\le 2.

Why It Matters

This construction shows how a non-flat density can arise from a simple transformation of two flat sources of randomness.

Failure Mode

The average (U+V)/2(U+V)/2 is also triangular, but its support is [0,1][0,1] and its density rescales. Always track the transformation and its Jacobian.

When to Use It

Use a triangular distribution when:

  • the quantity is bounded between a known minimum and maximum;
  • one interior value is more plausible than the rest;
  • you need a transparent simulation model rather than a fitted parametric family;
  • a uniform distribution is too flat, but a beta distribution is more flexibility than the problem justifies.

Do not use it when tails matter. The triangular distribution is bounded, so it cannot model rare extreme values outside [a,b][a,b]. For light-tailed unbounded models, start with Gaussian or sub-Gaussian assumptions. For heavier-tailed models, use sub-exponential, Pareto, Student-tt, or another tail-aware family.

Common Confusions

Watch Out

The mode is not the mean

The parameter cc is the location of the peak. The mean is (a+b+c)/3(a+b+c)/3. Only in the symmetric case does the mode equal the mean.

Watch Out

A triangular density is not a triangular sample space

The triangle is the shape of the density on the real line. The underlying sample space can be anything; the random variable pushes its probability mass into this triangular law.

Watch Out

Bounded support is an assumption

The distribution says values outside [a,b][a,b] have probability zero. If an extreme outcome is possible, the triangular model is too confident.

Exercises

ExerciseCore

Problem

Let XTri(0,1,2)X\sim\operatorname{Tri}(0,1,2). Compute E[X]\mathbb E[X] and Var(X)\operatorname{Var}(X).

ExerciseAdvanced

Problem

Derive the density of D=UVD=U-V where U,VUnif(0,1)U,V\sim\operatorname{Unif}(0,1) independently.

References

Canonical:

  • Johnson, Kotz, and Balakrishnan, Continuous Univariate Distributions, Volume 2 (1995), triangular distribution entry
  • Evans, Hastings, and Peacock, Statistical Distributions (2000), triangular distribution section
  • Casella and Berger, Statistical Inference (2002), Chapter 2

For probability mechanics:

  • Blitzstein and Hwang, Introduction to Probability (2019), Chapters 4 and 5
  • Grimmett and Stirzaker, Probability and Random Processes (2020), Chapters 3 and 4
  • Devroye, Non-Uniform Random Variate Generation (1986), Chapter 2

Last reviewed: April 22, 2026

Prerequisites

Foundations this topic depends on.

Next Topics