I have one white ball, one yellow ball, one red ball, one black ball. I put the four balls in a nontransparent box. I pick a ball from the box to see its color and put it back to the box.
Assuming picking is random, how many times on average do I need to pick in order to see all four colors?
If I'm lucky, I only need to pick four times. If I'm out of luck, I may get red, red, red, red, red, red,....
But what is it on average?
Answer
This is known as the coupon collector's problem.
The average number of tries needed to see each of 4 colors is
$$ \frac44+\frac43+\frac42+\frac41 = 8\frac{1}{3} $$
The terms are $4/4$ for the time to take one ball; then $4/3$ for the average time it takes after the first ball until you see another code; $4/2$ for the average time it takes after the first time you see the second color until you see a third, and finally $4/1$ for the time you then have to wait until you see the last color. (These can just be added due to the additivity of expectations).
No comments:
Post a Comment