WOLFRAM|DEMONSTRATIONS PROJECT

Randomness Test in Coupon Collecting

​
irrational number
π


ϕ
log(2)
log(3)
2
3
5
π approximation
355
113
104348
33215
208341
66317
312689
99532
833719
265381
1146408
364913
4272943
1360120
number of digits
2000
5000
10000
20000
50000
100000
200000
expected mean coupon waiting time: 29.2897
observed mean coupon waiting time: 29.6518
chi-square p-value: 0.630756
This is the coupon collector problem: suppose each package contains a coupon and that there are a certain number of different kinds of coupons. How many packages do you expect to have to open in order to form a complete collection?
The coupon collector randomness test is similar. For example, the packages are the digits of
π
, and the coupons are the digits 0 to 9. How many digits do you expect to have to check before collecting all 10 digits?
This is the first coupon waiting time.
Repeat this process to obtain a sequence of coupon waiting times and compare the mean and distribution of these observed coupon waiting times to their theoretical mean and distribution.
This Demonstration illustrates the coupon collector problem randomness test for initial sequences of digits of famous irrational numbers and rational approximations of
π
. The observed waiting time frequencies are given by the bar chart, and the theoretical frequencies are shown by the solid curve.