🧮 Brain Teaser
Probability
Coupon Collector Problem
2026-05-06
✏︎

The Collector's Coupon Problem

There are nn distinct types of coupons. Each time you buy a cereal box, you receive one coupon chosen uniformly at random from the nn types (independently each time).

Question: What is the expected number of boxes you must buy until you have collected at least one coupon of every type?

For concreteness, compute the answer for n=6n = 6 (like rolling a fair die until every face has appeared).

Then show that for large nn, the expected number of boxes is approximately nlnnn \ln n.

geometric distributionharmonic numbersexpectationlinearity of expectationasymptotics

Answer: Coupon Collector Problem

Key Idea / Intuition

Break the collection process into phases: after you have collected exactly kk distinct coupons, the probability that the next box gives a new coupon is nkn\frac{n-k}{n}. So the waiting time in each phase is a geometric random variable, and the total expected time is just a sum of nn geometric expectations. This sum turns out to be nn times the nn-th harmonic number, and for large nn the harmonic number grows like lnn\ln n.


Formal Proof / Solution

Setting up phases

Define Phase kk as the period during which you already have exactly k1k-1 distinct coupon types and are waiting to get the kk-th new one, for k=1,2,,nk = 1, 2, \ldots, n.

In Phase kk, the probability of drawing a new coupon on any given box is: pk=n(k1)n=nk+1n.p_k = \frac{n - (k-1)}{n} = \frac{n - k + 1}{n}.

The number of boxes needed in Phase kk is geometrically distributed with success probability pkp_k, so its expectation is: E[boxes in Phase k]=1pk=nnk+1.\mathbb{E}[\text{boxes in Phase } k] = \frac{1}{p_k} = \frac{n}{n - k + 1}.

Total expected number of boxes

Let TT be the total number of boxes. By linearity of expectation: E[T]=k=1nnnk+1=nj=1n1j=nHn,\mathbb{E}[T] = \sum_{k=1}^{n} \frac{n}{n-k+1} = n \sum_{j=1}^{n} \frac{1}{j} = n \cdot H_n,

where Hn=1+12+13++1nH_n = 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n} is the nn-th harmonic number.

Concrete answer for n=6n = 6

E[T]=6(1+12+13+14+15+16)=64920=4910=14.7.\mathbb{E}[T] = 6 \left(1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6}\right) = 6 \cdot \frac{49}{20} = \frac{49}{10} = 14.7.

So on average you need about 14.7 rolls of a fair die to see all 6 faces — perhaps more than you'd guess!

Asymptotics for large nn

Since Hn=lnn+γ+O(1/n)H_n = \ln n + \gamma + O(1/n) where γ0.5772\gamma \approx 0.5772 is the Euler–Mascheroni constant: E[T]=nHnnlnn+γn.\mathbb{E}[T] = n H_n \approx n \ln n + \gamma n.

For large nn, the dominant behavior is nlnn\boxed{n \ln n}.

Why this is beautiful

The problem looks like it might require tracking a complex Markov chain, but the phase decomposition reduces everything to a sum of independent geometric waiting times. The harmonic series HnH_n appears naturally — the same series that famously diverges, here telling us the coupon collector problem takes longer and longer (superlinearly) as nn grows.

Source: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller) — folklore / classical

Type: ProbabilitySource: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller) — folklore / classicalEdit on GitHub ↗