WOLFRAM|DEMONSTRATIONS PROJECT

Simulating the Coupon Collector Problem

​
seed
11
type of coupons
digits
suits
cards
dice
coupons:
0
1
2
3
4
5
6
7
8
9
expected number of boxes: 29.3
observed number of boxes: 40
collected coupons
3
7
3
2
2
7
5
7
7
3
2
6
2
5
5
6
9
7
3
6
3
1
4
4
9
2
8
8
7
9
1
3
2
8
9
5
3
6
5
0
distribution
0
1
1
2
2
2
2
2
​
3
3
3
3
3
​
4
4
5
5
5
5
5
​
6
6
6
6
7
7
7
7
7
​
8
8
8
9
9
9
9
A statement of the coupon collector problem: suppose each box of cereal contains a coupon chosen at random from
n
possible coupons. Let
W
be the number of boxes of cereal that need to be purchased in order to get a complete set of all
n
coupons. What is the expected value (or waiting time) of
W
? The answer is given by the formula
n(1+1/2+…+1/n)
.
This Demonstration illustrates this result for the following natural sets of "coupons": the digits
0,…,9
, the four suits of a playing card deck, the 13 cards in a single suit and the six sides of a standard die. It generates a random sequence of coupons from the selected set until a complete set of coupons has been collected. The total number of coupons that have been collected is then compared with the expected value.