You are trying to complete a sticker album. The album has different stickers, and every random pack you buy contains one sticker, chosen uniformly at random from the possibilities. How many packs, on average, do you need to buy before you have collected at least one of each?
This is the coupon collector’s problem, one of the oldest and most useful problems in probability theory. The answer has a clean closed form, an even cleaner asymptotic form, and a moral that is familiar to anyone who has ever tried to complete a Panini World Cup album: the last few items take far longer than the first few. This article is about that asymmetry, the math behind it, and why the same formula appears in surprising places.
The expected number of draws
Let be the random number of draws needed to collect all distinct items. The trick to computing is to break the wait into stages. Stage begins the moment you collect your -th distinct item, and ends when you collect your -th distinct item. Let be the length of stage , so .
During stage , you already have distinct items, so the probability that any single draw gives you a new one is
The number of draws until the next new item is a geometric random variable with success probability , whose expected value is . So
Summing over all stages:
where is the -th harmonic number. The expected number of packs needed to complete the album is exactly times the -th harmonic number — a clean and memorable formula.
For large the harmonic number has the asymptotic expansion , where is the Euler–Mascheroni constant, so
Substituting: for a six-sided die (), the expected number of rolls to see every face at least once is . For an album of stickers, you should expect about pack purchases. For an album of stickers — about the size of a typical World Cup album — the expected number balloons to roughly packs.
The slow finish
The most striking feature of the formula is hidden in the sum. Look again at the contribution from each stage:
When (you have nothing yet, every draw is new), this is just . When (you have one item), this is . The first few stages each take essentially one draw. But when (you are missing only one item), the expected wait is . The expected wait grows from to as the album fills up, and the very last item alone takes, on average, the same number of draws as the first half of the album combined.
For a six-sided die: getting your first new face takes roll, your second takes rolls on average, the third takes , the fourth , the fifth , and the sixth . The sixth face alone accounts for of the total expected rolls.
This is the mathematical reason it always feels like the last sticker takes forever. It really does take forever, relative to all the previous ones put together. The plot below shows how the expected total grows with the number of distinct items .
The curve climbs in a recognisably shape. For stickers the expected total is just under packs; for stickers it would be roughly . Doubling the number of stickers more than doubles the expected work, by exactly the logarithmic factor.
A second view: indicator variables
There is an even slicker proof. For each item , let be the number of draws between the moment item is first drawn and the moment all items have been collected — counting only draws while item is the “still-missing” one. By a clever counting, the total number of draws equals exactly as above, and the calculation rolls through identically.
Both perspectives illuminate why is the right scaling. The harmonic sum grows logarithmically because has the same growth as . Multiplying by the factor — the size of the alphabet from which you are sampling — gives the rate.
How much do the numbers vary?
The expectation tells you the average, but how much does the actual number of packs vary from one collector to another? The variance of is
using the famous Basel-problem identity in the limit. The standard deviation is therefore of order — comparable in size to the mean for moderate , but much smaller than the mean for large (where the mean is , dominating the linear standard deviation).
So while individual results spread by about around the mean, the relative spread shrinks like . For , the mean is around packs and the standard deviation is about — you can be reasonably confident that you will spend somewhere between and packs.
Why it matters
The coupon collector’s formula is the simplest illustration of a phenomenon — the long tail of completion — that appears throughout applied probability. The same scaling controls the running time of randomised algorithms with “balls and bins” structure, the convergence time of certain Markov chains, the number of random samples needed to cover all parts of a configuration space in Monte Carlo simulation, and the expected complexity of certain graph traversal algorithms.
In software testing, the coupon collector’s problem models how long random input generation takes to exercise every possible code path; the formula explains why fuzz testing requires far more time than naïve estimates suggest. In biology, the expected time to collect every gene through random mutation has the same shape. In machine learning, the expected number of training samples needed to encounter every class at least once in a multi-class classification problem follows the same law.
The deeper lesson is about the price of completeness. Going from done to done is dramatically harder than going from to — by a logarithmic factor, in a way that the harmonic sum makes precise. The mathematics matches the lived experience of every sticker collector since the practice was invented in the nineteenth century. The last sticker really is the hardest. And by the time you finally find it, you will have spent about as long on it as on the entire first half of the album, exactly as the harmonic numbers predict.
Frequently asked
Where does the name 'coupon collector' come from?
From a 19th-century marketing practice. Companies would include collectible coupons or trade cards inside product packaging — cigarette cards, gum cards, tea cards — and consumers would buy more units of the product trying to complete a set. The mathematical question of how many purchases it takes was first analysed by de Moivre and Laplace in the 18th century, then revisited by many mathematicians since. The name stuck even though the modern version of the problem is more often phrased in terms of dice rolls, Panini football stickers, or memory testing.
Why is the last item so hard to find?
Because once you have collected n−1 of the n distinct items, only 1 of every n random items is new to you — the rest are duplicates. So the expected number of additional draws to get the last item is n. By comparison, when you have collected only n/2 items, half of every draw is new, so the wait per new item is just 2. The wait grows from 1 at the start to n at the end, and the final stretch dominates the total. About half of all your draws will be spent acquiring the final few items.
What is the precise expectation formula?
If there are n distinct items, each appearing independently and uniformly at random in each draw, the expected number of draws to collect all of them is E[T] = n · H_n, where H_n = 1 + 1/2 + 1/3 + ⋯ + 1/n is the n-th harmonic number. For large n this is approximately n·ln(n) + γ·n + 1/2, where γ ≈ 0.5772 is the Euler–Mascheroni constant. The variance is approximately π²n²/6, so the typical fluctuation around E[T] is on the order of n.
Where else does the formula n·ln(n) show up?
Everywhere harmonic numbers appear. The expected depth of a randomly built binary search tree is also Θ(log n), with the constants related to H_n. The running time of quicksort with random pivots is Θ(n·log(n)), again with the proportionality constant being a sum of reciprocals. In algorithm analysis the harmonic-number formula is so common that the resulting Θ(n·log(n)) running time is often considered a natural complexity class on its own. The fact that the coupon collector's expected wait is also n·log(n) is part of this same family of phenomena.