Probability & Statistics

Coupon Collection

Each cereal box holds one of N equally likely coupons. How many boxes does it take on average to collect at least one of every type?

solvedmedium1 min

There are NN distinct coupon types, and each cereal box holds one type, equally likely and independent of the others. How many boxes on average are needed to collect at least one of every type?

Reveal solutionHide solution

#Stage the hunt by how many types are held

Break the collection into stages indexed by how many distinct types are already in hand. Let XiX_i be the extra boxes needed to win the ii-th new type once i1i-1 are held. A fresh box shows a new type with probability pi=Ni+1Np_i = \tfrac{N-i+1}{N}, so XiX_i is geometric with mean E[Xi]=NNi+1\E[X_i] = \tfrac{N}{N-i+1}.

#Sum the stages

Adding the stage costs and reindexing the sum,

E[X]=i=1NNNi+1=N(1+12++1N)=NHN.(1)\E[X] = \sum_{i=1}^{N} \frac{N}{N-i+1} = N\left(1 + \frac{1}{2} + \cdots + \frac{1}{N}\right) = N H_N. \tag{1}
12345678910new type number
Winning the i-th new type takes a geometric number of boxes with success rate (N-i+1)/N, so the expected cost N/(N-i+1) climbs as the set fills. The last coupon alone averages N boxes, and the stages sum to N times the harmonic number.

The tail dominates the bill. The very last type, with only a 1N\tfrac{1}{N} chance per box, alone costs an expected NN boxes, so completing the set is far slower than filling most of it.