How to use the coupon collector calculator
- Enter how many different items the set holds. Each draw is assumed to give any one of them with the same chance.
- Leave items to collect blank to collect the whole set, or type a smaller number to stop when you have that many different ones.
- Set the confidence level to see how many draws are enough with that probability, and optionally type the number of draws you can afford to get the chance of finishing.
- Use the stage table to see how the last items slow everything down.
Formula
expected draws = n x (1/n + 1/(n-1) + ... + 1/(n - k + 1))
variance = sum over i from 0 to k-1 of n x i / (n - i)^2
expected different items after m draws = n x (1 - (1 - 1/n)^m)
After i different items, the next draw is new with chance (n - i) / n, so the wait for it averages n / (n - i) draws. The stages are independent, so their means and variances add. The draws for a confidence level follow the exact chance of having k items after each draw.
Collecting a set of 50
For n = 50 and k = 50, the expected number of draws is 224.96 with a standard deviation of 61.95. The exact calculation shows that 341 draws are needed before the chance of owning all 50 reaches 95%. After 100 draws you would expect 43.37 different items.
For a smaller goal, collecting 5 different items from a set of 10 takes 6.46 draws on average (variance 2.1593), and 8 draws are enough with 90% confidence, because the chance of finishing within 8 draws is 0.9072.
Why the last items take longest
The first item is certain, and the second needs a little over one draw when the set is large. The last needs about n draws, because only one of n items is still missing. For a set of 50, the last 10 items alone take about 146 of the 225 expected draws. This is why collecting a full set from random packs is so much slower than people expect.
The expected value is close to n times the natural logarithm of n plus 0.5772 n for large sets. That is a summary of the exact sum used here.
Where the model stops being true
Real sets seldom give every item the same chance. Rare items, uneven print runs and trades change the numbers, and the wait is then longer than shown. The model also assumes draws are independent, as with sampling with replacement. If each pack contains several different items, or you can trade, the result is an upper bound, not an estimate. For other chance questions, see the Probability Calculator or the Birthday Paradox Calculator.
More probability and statistics tools
To model other chance processes and data, try the Markov Chain Calculator, Cronbach's Alpha Calculator and Curve Fit Calculator.
Assumptions and limits
- Every item is equally likely on every draw.
- Draws are independent, as if each item is put back before the next draw.
- The set has up to 1,000 different items, and the stop is a count of different items.
- The confidence figure is exact and is searched up to a limit well beyond the expected number of draws.
Frequently asked questions
Does the expected number tell me how many draws I will need?
It is an average over many attempts. Any single attempt can be well above or below it; the standard deviation and the 95% figure show how far it can go.
Why is the 95% figure so much higher than the expected number?
The distribution has a long right tail: a few attempts take much longer because one item stays missing. The 95% draws figure includes those slow attempts.
What if I collect only some of the items?
Enter the number you want under items to collect. The stages stop at that number, so the expected draws drop sharply compared with completing the set.
How is this different from the birthday problem?
The birthday problem asks when two draws first match. The collector problem asks when every item has appeared at least once, which takes many more draws.