Mathematics.

probability distributions

Uniform Distribution

Probability20 minDifficulty3 out of 10

You should know: continuous probability distributions

Overview

The continuous uniform distribution on an interval [a,b] assigns equal probability density to every point in the interval, meaning any subinterval of a given length is equally likely regardless of where it sits within [a,b]. Its probability density function is f(x) = 1/(b-a) for a ≤ x ≤ b and 0 elsewhere, reflecting 'no value is more likely than any other' within the range. The mean is the midpoint (a+b)/2, and the variance is (b-a)²/12. The uniform distribution is fundamental in simulation, since most random number generators produce values that approximate Uniform(0,1), which can then be transformed into samples from other distributions.

Intuition

Picture spinning an idealized fair wheel marked continuously from a to b — no notch is more likely to be landed on than any other. The density is perfectly flat (a horizontal line) across the interval, so the probability of landing in any subinterval depends ONLY on its length, not its position. A 2-unit-wide slice near the left edge is exactly as likely as a 2-unit-wide slice near the right edge or the middle. This 'flatness' is what makes the uniform distribution the natural building block for computer-generated randomness — it's the blank canvas from which other distributions are constructed.

Formal Definition

Definition

For a continuous random variable X uniformly distributed on [a,b]:

f(x)=1bafor axbf(x) = \frac{1}{b-a} \quad \text{for } a \le x \le b
Probability density function
E[X]=a+b2E[X] = \frac{a+b}{2}
Mean
Var(X)=(ba)212\operatorname{Var}(X) = \frac{(b-a)^2}{12}
Variance
P(cXd)=dcba(acdb)P(c \le X \le d) = \frac{d-c}{b-a} \quad (a \le c \le d \le b)
Probability of a subinterval

Worked Examples

  1. Apply the mean formula.

    E[X]=2+102=6E[X] = \frac{2+10}{2} = 6
  2. Apply the variance formula.

    Var(X)=(102)212=6412=163\operatorname{Var}(X) = \frac{(10-2)^2}{12} = \frac{64}{12} = \frac{16}{3}

Answer: E[X] = 6, Var(X) = 16/3 ≈ 5.33.

Practice Problems

Difficulty 3/10

X is uniform on [0,1] (the standard uniform distribution). Find E[X] and Var(X).

Difficulty 4/10

X is uniform on [10, 30]. Find P(X > 25).

Difficulty 5/10

A subway train arrives every 12 minutes, and your arrival time is uniform over that 12-minute window (i.e., your wait time is uniform on [0,12]). Find your expected wait time and the probability you wait less than 3 minutes.

Quiz

The PDF of a uniform distribution on [a,b] is:
For a uniform distribution on [a,b], the probability of landing in a subinterval depends on:
The mean of a uniform distribution on [a,b] is:

Summary

  • The uniform distribution on [a,b] has constant density f(x) = 1/(b-a), meaning every point is equally likely.
  • Mean is the midpoint (a+b)/2; variance is (b-a)²/12.
  • It underlies computer random number generation, since Uniform(0,1) samples can be transformed into samples from other distributions.

References