- Coupon collector's problem
In probability theory, the coupon collector's problem describes the "collect all coupons and win" contests. It asks the following question: Suppose that there are n coupons, from which coupons are being collected with replacement. What is the probability that more than t sample trials are needed 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 Θ(nlog(n)). For example, when n = 50 it takes about 225 trials to collect all 50 coupons.
Understanding the problem
The key to solving the problem is understanding that it takes very little time to collect the first few coupons. On the other hand, it takes a long time to collect the last few coupons. In fact, for 50 coupons, it takes on average 50 trials to collect the very last coupon after the other 49 coupons have been collected. This is why the expected time to collect all coupons is much longer than 50. The idea now is to split the total time into 50 intervals where the expected time can be calculated.
Calculating the expectation
Let T be the time 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 given i − 1 coupons is pi = (n − i + 1)/n. Therefore, ti has geometric distribution with expectation 1/pi. By the linearity of expectations we have:
Here Hn is the harmonic number. Using the asymptotics of the harmonic numbers, we obtain:
where is the Euler–Mascheroni constant.
Now one can use the Markov inequality to bound the desired probability:
Calculating the variance
Using the independence of random variables ti, we obtain:
Now one can use the Chebyshev inequality to bound the desired probability:
A different upper bound can be derived from the following observation. Let denote the event that the i-th coupon was not picked in the first r trials. Then
Thus, for r = βnlog n, we have .
Connection to probability generating functions
Another combinatorial technique can also be used to resolve the problem: Coupon collector's problem (generating function approach).
Extensions and generalizations
- Erdős and Rényi proved the limit theorem for the distribution of T. This result is a further extension of previous bounds.
- Newman and Shepp found a generalization of the coupon collector's problem when k copies of each coupon needs to be collected. Let Tk be the first time k copies of each coupons are collected. They showed that the expectation in this case satisfies:
- Here k is fixed. When k = 1 we get the above formula for the expectation.
- Common generalization, also due to Erdős and Rényi:
- Blom, Gunnar; Holst, Lars; Sandell, Dennis (1994), "7.5 Coupon collecting I, 7.6 Coupon collecting II, and 15.4 Coupon collecting III", Problems and Snapshots from the World of Probability, New York: Springer-Verlag, pp. 85–87, 191, ISBN 0-387-94161-4, MR1265713, http://books.google.com/books?id=KCsSWFMq2u0C&pg=PA85 .
- Dawkins, Brian (1991), "Siobhan's problem: the coupon collector revisited", The American Statistician 45 (1): 76–82, JSTOR 2685247 .
- Erdős, P.; Rényi, A. (1961), "On a classical problem of probability theory", Magyar Tud. Akad. Mat. Kutató Int. Közl. 6: 215–220, MR0150807, http://www.renyi.hu/~p_erdos/1961-09.pdf .
- Newman, Donald J.; Shepp, Lawrence (1960), "The double dixie cup problem", American Mathematical Monthly 67: 58–61, doi:10.2307/2308930, MR0120672
- Flajolet, Philippe; Gardy, Danièle; Thimonier, Loÿs (1992), "Birthday paradox, coupon collectors, caching algorithms and self-organizing search", Discrete Applied Mathematics 39 (3): 207–229, doi:10.1016/0166-218X(92)90177-C, MR1189469, http://algo.inria.fr/flajolet/Publications/alloc2.ps.gz .
- Isaac, Richard (1995), "8.4 The coupon collector's problem solved", The Pleasures of Probability, Undergraduate Texts in Mathematics, New York: Springer-Verlag, pp. 80–82, ISBN 0-387-94415-X, MR1329545, http://books.google.com/books?id=a_2vsIx4FQMC&pg=PA80 .
- Motwani, Rajeev; Raghavan, Prabhakar (1995), "3.6. The Coupon Collector's Problem", Randomized algorithms, Cambridge: Cambridge University Press, pp. 57–63, MR1344451, http://books.google.com/books?id=QKVY4mDivBEC&pg=PA57 .
Wikimedia Foundation. 2010.