Quant Memo
Core

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 nn distinct coupon types, assuming each type is equally likely on every draw — the answer is nHnn H_n, where HnH_n is the harmonic sum 1+12++1n1 + \tfrac{1}{2} + \dots + \tfrac{1}{n}. 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 p1,,pnp_1, \dots, p_n differ, there's no simple closed form like nHnn H_n anymore. Instead, the expected number of draws to collect all nn types is computed using inclusion-exclusion:

E[T]=0(1i=1n(1epit))dt=S{1,,n}(1)S+1iSpi.\mathbb{E}[T] = \int_0^\infty \left( 1 - \prod_{i=1}^n \left(1 - e^{-p_i t}\right) \right) dt = \sum_{\emptyset \neq S \subseteq \{1,\dots,n\}} \frac{(-1)^{|S|+1}}{\sum_{i \in S} p_i} .

In plain terms: because rare items dominate the waiting time, the expected total draws is driven heavily by the smallest pip_i — 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 pp and 1p1-p, this simplifies to E[T]=1p+11p1\mathbb{E}[T] = \frac{1}{p} + \frac{1}{1-p} - 1. With p=0.9p = 0.9 and 1p=0.11-p = 0.1: E[T]=10.9+10.111.11+101=10.11\mathbb{E}[T] = \frac{1}{0.9} + \frac{1}{0.1} - 1 \approx 1.11 + 10 - 1 = 10.11 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 nHnn H_n formula applies to a real-world collecting problem.

Related concepts

Practice in interviews

Further reading

  • Flajolet, Gardy & Thimonier, Birthday Paradox, Coupon Collectors, Caching Algorithms
ShareTwitterLinkedIn