Course contentsShow
← Mathematics
Lesson 2896 of 3,12157. Common DistributionsFree lesson

Mean and Variance of Uniform Distributions

Calculate expectation and variance for continuous uniform random variables using integration.

Mean and Variance of Uniform Distributions

What you'll learn: How to calculate the expectation and variance of continuous uniform random variables using integration.

The Core Idea

For a continuous uniform distribution on the interval [a, b], we use the PDF and integration to find the mean and variance. Since the distribution is "flat" (constant probability density), the mean sits exactly at the midpoint, and the variance measures spread uniformly around that center.

Computing the Mean

The expectation formula for continuous random variables is:

E[X] = ∫ x · f(x) dx

For a uniform distribution on [a, b], where f(x) = 1/(b - a):

E[X] = ∫ₐᵇ x · (1/(b - a)) dx = (1/(b - a)) · [x²/2]ₐᵇ

After evaluating, this simplifies to:

E[X] = (a + b)/2

This is intuitive: the mean is the midpoint of the interval.

Computing the Variance

Using the shortcut formula Var(X) = E[X²] - (E[X])², we first find E[X²]:

E[X²] = ∫ₐᵇ x² · (1/(b - a)) dx = (1/(b - a)) · [x³/3]ₐᵇ = (b³ - a³)/(3(b - a))

This simplifies to (a² + ab + b²)/3.

Subtracting (E[X])² = [(a + b)/2]² and simplifying yields:

Var(X) = (b - a)²/12

The variance depends only on the width of the interval—the wider the spread, the greater the variance. The standard deviation is (b - a)/√12.

Example Analogy

Think of a uniform distribution on [0, 10] like a perfectly flat shelf. The mean at 5 is the balance point, and the variance (100/12 ≈ 8.33) measures how far values typically deviate from that center.

Key Takeaway: For a uniform distribution on [a, b], the mean is (a + b)/2 and the variance is (b - a)²/12, both derived through straightforward integration of the PDF.