Coupon Collecting With Unequal Odds
An extension of the classic coupon collector problem to the more realistic case where the different items being collected aren't equally likely to turn up, which changes both the expected time to collect a full set and how to compute it.
Prerequisites: The Coupon-Collector Problem
The classic coupon collector problem asks how many random draws (with replacement) it takes to collect all distinct coupon types, assuming each type is equally likely on every draw — the answer is , where is the harmonic sum . In reality, many collecting problems — cereal-box prizes, or waiting for every stock in an index to trade at least once in a given window — have unequal probabilities: some items are common, others rare.
When probabilities differ, there's no simple closed form like anymore. Instead, the expected number of draws to collect all types is computed using inclusion-exclusion:
In plain terms: because rare items dominate the waiting time, the expected total draws is driven heavily by the smallest — the rarest item essentially sets a floor on how long you'll wait, much more than the common items do.
For just two coupon types with probabilities and , this simplifies to . With and : draws — dominated almost entirely by waiting for the rare 10%-probability item.
When coupon probabilities are unequal, the expected time to collect a full set has no simple closed form and is driven disproportionately by the rarest item — a fact worth recognizing before assuming the equal-probability formula applies to a real-world collecting problem.
Practice in interviews
Further reading
- Flajolet, Gardy & Thimonier, Birthday Paradox, Coupon Collectors, Caching Algorithms