Coupon collector's problem

In probability theory, the coupon collector's problem refers to mathematical analysis of "collect all coupons and win" contests.

It asks the following question: if each box of a given product (e.g., breakfast cereals) contains a coupon, and there are n different types of coupons, what is the probability that more than t boxes need to be bought to collect all n coupons?

An alternative statement is: given n coupons, how many coupons do you expect you need to draw with replacement before having drawn each coupon at least once?

The mathematical analysis of the problem reveals that the expected number of trials needed grows as

( n log ⁡ ( n ) )

[a] For example, when n = 50 it takes about 225[b] trials on average to collect all 50 coupons.

By definition of Stirling numbers of the second kind, the probability that exactly T draws are needed is

By manipulating the generating function of the Stirling numbers, we can explicitly calculate all moments of T:

In general, the k-th moment is

is the derivative operator

, which can be explicitly evaluated to

Let time T be the number of draws needed to collect all n coupons, and let ti be the time to collect the i-th coupon after i − 1 coupons have been collected.

Think of T and ti as random variables.

Observe that the probability of collecting a new coupon is

has geometric distribution with expectation

By the linearity of expectations we have: Here Hn is the n-th harmonic number.

Using the asymptotics of the harmonic numbers, we obtain: where

γ ≈ 0.5772156649

Using the Markov inequality to bound the desired probability: The above can be modified slightly to handle the case when we've already collected some of the coupons.

Let k be the number of coupons already collected, then: And when

then we get the original result.

Using the independence of random variables ti, we obtain: since

(see Basel problem).

Bound the desired probability using the Chebyshev inequality: A stronger tail estimate for the upper tail be obtained as follows.

denote the event that the

-th coupon was not picked in the first

r = β n log ⁡ n

( − β n log ⁡ n )

Via a union bound over the

coupons, we obtain

Graph of number of coupons, n vs the expected number of trials (i.e., time) needed to collect them all E ( T )