Probability
2. Discrete Distributions
Discrete Uniform

Uniform Distribution (Discrete)

🟰

The Discrete Uniform Distribution describes a scenario where there is a finite, distinct set of possible outcomes, and every single one of those outcomes is equally likely to occur.

Core Concepts

If a random variable XX follows a Discrete Uniform Distribution between a minimum integer aa and a maximum integer bb, we write:

XU{a,b}X \sim \mathcal{U}\{a, b\}

Where:

  • aa is the minimum possible integer value.
  • bb is the maximum possible integer value.
  • n=ba+1n = b - a + 1 is the total number of possible outcomes.

Probability Mass Function (PMF)

Because every outcome is equally likely, the probability of any specific outcome xx is simply 11 divided by the total number of possible outcomes (nn).

P(X=x)={1nfor x=a,a+1,,b0otherwiseP(X = x) = \begin{cases} \frac{1}{n} & \text{for } x = a, a+1, \dots, b \\ 0 & \text{otherwise} \end{cases}

Cumulative Distribution Function (CDF)

The probability that the outcome is less than or equal to xx grows linearly step-by-step:

F(x)=xa+1nfor axbF(x) = \frac{x - a + 1}{n} \quad \text{for } a \le x \le b

Key Metrics

  • Expected Value (Mean): E[X]=a+b2E[X] = \frac{a + b}{2} (Exactly in the middle)
  • Variance: Var(X)=n2112\text{Var}(X) = \frac{n^2 - 1}{12}

Real-World Examples

  1. Rolling a Fair Die: A standard 6-sided die follows U{1,6}\mathcal{U}\{1, 6\}. The probability of rolling any specific number is exactly 16\frac{1}{6}.
  2. Drawing a Card: Drawing a single card from a well-shuffled standard deck of 52 cards (ignoring suits).
  3. Lottery Balls: Selecting a numbered ping-pong ball from a rotating lottery drum.

Interactive Visualization

Use the sliders below to adjust the minimum (aa) and maximum (bb) possible integer outcomes. Notice how the discrete bars always remain the exact same height as each other, and that height automatically adjusts so the sum of all bars perfectly equals 1.0.

Discrete Uniform Distribution

Each integer outcome in [a, b] has the same probability.

Minimum (a)
1
Maximum (b)
6

Test Your Knowledge

Example: Discrete Uniform Variance

A fair 6-sided die is rolled. Values a=1a=1 and b=6b=6. What is the Expected Value and Variance of the roll?

View Step-by-Step Solution

Expected Value: a+b2=1+62=3.5\frac{a+b}{2} = \frac{1+6}{2} = 3.5

Variance: (ba+1)2112\frac{(b-a+1)^2 - 1}{12} (61+1)2112=62112=35122.917\frac{(6-1+1)^2 - 1}{12} = \frac{6^2 - 1}{12} = \frac{35}{12} \approx 2.917