A statement of the coupon collector problem: suppose each box of cereal contains a coupon chosen at random from possible coupons. Let be the number of boxes of cereal that need to be purchased in order to get a complete set of all coupons. What is the expected value (or waiting time) of ? The answer is given by the formula .

This Demonstration illustrates this result for the following natural sets of "coupons": the digits , 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.

[1] B. Dawkins, "Siobhan's Problem: The Coupon Collector Revisited," The American Statistician, 45(1), 1991 pp. 76–82. doi:10.1080/00031305.1991.10475772.