Uniform Distribution

probability
The uniform distribution is the simplest continuous distribution. Imagine a bus that passes every 10 minutes, but you do not know the schedule. You…
Published

June 22, 2026

Bus Stop Example

The uniform distribution is the simplest continuous distribution. Imagine a bus that passes every 10 minutes, but you do not know the schedule. You walk outside and wait. How long do you wait?

Sometimes you wait 1 minute, sometimes 5, sometimes 9, sometimes 4.5, sometimes 3.52. When you look at all these numbers, they are spread fairly evenly across the interval from 0 to 10 minutes. No particular wait time is more likely than any other. That is a uniform distribution.

Call Center Example

Imagine a call center that answers sometime between 0 and 15 minutes with equal probability. If they do not answer within 15 minutes, the call disconnects.

You call them 200 times and record how long you wait each time. The wait times are spread roughly evenly across 0 to 15 minutes. No particular window of time appears more often than the rest.

What does the PDF look like? Since all values between 0 and 15 are equally likely, the PDF must be constant (flat) on that interval. The question is: what height?

Remember that the total area under the PDF must equal 1. The base of the rectangle is 15 (the length of the interval). So:

\[ \text{height} \times 15 = 1 \quad \Rightarrow \quad \text{height} = \frac{1}{15} \approx 0.067 \]

General Uniform Distribution

A continuous variable \(X\) follows a uniform distribution on the interval \([a, b]\) if all values in that interval are equally likely. It has two parameters:

  • \(a\) = beginning of the interval
  • \(b\) = end of the interval

The PDF is:

\[ f(x) = \begin{cases} \dfrac{1}{b - a} & \text{if } a \leq x \leq b \\ 0 & \text{otherwise} \end{cases} \]

We write \(X \sim \text{Uniform}(a, b)\).

The height \(\frac{1}{b-a}\) comes from the requirement that the total area equals 1. The rectangle has base \((b - a)\) and height \(\frac{1}{b-a}\), so area \(= (b-a) \times \frac{1}{b-a} = 1\).

NoteInverse Relationship

When the interval \([a, b]\) is wider, the PDF height is smaller (probability is spread over more values). When the interval is narrower, the height is taller (probability is concentrated in a smaller range). The area always stays at 1.

CDF of the Uniform Distribution

Let us derive the CDF for the simple case \(X \sim \text{Uniform}(0, 1)\). The CDF \(F(x) = P(X \leq x)\) is the area under the PDF from \(-\infty\) up to \(x\).

Case 1: \(x < 0\)

There is no area under the PDF to the left of 0 (the PDF is 0 there), so \(F(x) = 0\).

Case 2: \(0 \leq x \leq 1\)

The area is a rectangle with base \(x\) and height 1:

\[ F(x) = x \times 1 = x \]

Case 3: \(x > 1\)

All the area is already accumulated, so \(F(x) = 1\).

Putting it together:

\[ F(x) = \begin{cases} 0 & \text{if } x < 0 \\ x & \text{if } 0 \leq x \leq 1 \\ 1 & \text{if } x > 1 \end{cases} \]

The CDF is a straight line from \((0, 0)\) to \((1, 1)\), with flat segments of 0 before and 1 after.

General CDF Formula

For the general \(X \sim \text{Uniform}(a, b)\), the CDF is:

\[ F(x) = \begin{cases} 0 & \text{if } x < a \\ \dfrac{x - a}{b - a} & \text{if } a \leq x < b \\ 1 & \text{if } x \geq b \end{cases} \]

The middle piece \(\frac{x - a}{b - a}\) is the ratio of “how far \(x\) is into the interval” to “the total length of the interval.” At \(x = a\) it gives 0, and at \(x = b\) it gives 1.

Review Questions

1. A bus comes every 12 minutes and you arrive at a random time. What is the PDF of your wait time?

Your wait time \(T \sim \text{Uniform}(0, 12)\), so the PDF is \(f(t) = \frac{1}{12}\) for \(0 \leq t \leq 12\) and \(f(t) = 0\) otherwise.


1. For \(X \sim \text{Uniform}(2, 8)\), what is the height of the PDF?

\(f(x) = \frac{1}{b-a} = \frac{1}{8-2} = \frac{1}{6} \approx 0.167\)


1. For \(X \sim \text{Uniform}(0, 5)\), what is \(P(1 < X < 3)\)?

\(P(1 < X < 3) = F(3) - F(1) = \frac{3-0}{5-0} - \frac{1-0}{5-0} = \frac{3}{5} - \frac{1}{5} = \frac{2}{5} = 0.4\). Alternatively: area = height \(\times\) width = \(\frac{1}{5} \times 2 = 0.4\).


1. Why does the height of the uniform PDF increase when the interval \([a, b]\) gets smaller?

Because the total area must always equal 1. A narrower base means the height must be taller to maintain the same area. Height \(= \frac{1}{b-a}\), so as \(b - a\) decreases, the height increases.