In: Math
A bag contains 12 balls of the same shape and size.
Of these, 9 balls are blue, and the remaining 3 balls are red.
Suppose that you do the following iterative random experiment: In each iteration, 5 balls are removed randomly (without replacement) from the bag, in such a way that any 5 balls in the bag are equally likely to be the 5 balls that are removed. After doing this, you check whether among the 5 removed balls there are exactly 2 red balls. If so, then you STOP. Otherwise, you replace the 5 balls back into the bag, shake the bag up (to make sure it is randomly mixed again), and repeat the same experiment: random sample 5 balls from the bag, and check whether you have taken out exactly 2 red balls.
You repeat this until the process STOPs (i.e., when the 5 removed balls in some iteration contain exactly 2 red balls among them).
What is the expected number of times that you will sample 5 balls from this bag, in the above random experiment?
Number of ways to select 5 balls from the bag = 12C5 = 12! / (12-5)! * 5! = (12 * 11 * 10 * 9 * 8) / (5 * 4 * 3 * 2 * 1)
= 792
Number of ways to select 2 red balls from the 3 balls in the bag = 3C2 = 3! / (3-2)! * 2! = 3
Number of ways to select 3 blue balls from the 9 balls in the bag = 9C3 = 9! / (9-3)! * 3! = (9 * 8 * 7) / (3 * 2 * 1) = 84
Probability to get 3 blue balls and 2 red balls on any given iteration = (Number of ways to select 2 red balls from the 3 balls in the bag * Number of ways to select 3 blue balls from the 9 balls in the bag ) / Number of ways to select 5 balls from the bag
= (3 * 84) / 792
= 0.3182
We are carrying the process until we get 3 blue balls and 2 red balls on any given iteration with probability = 0.3182
Thus, the number of times that you will sample 5 balls from this bag will follow Geometric distribution with the parameter p = 0.3182.
Expected number of times that you will sample 5 balls from this bag = 1/p = 1/0.3182 = 3.14