Generalizing the Probability Function of a coin-toss and ball-draw experiment

discrete mathematicsprobabilityprobability distributionsproblem solvingstatistics

In this exact problem: Probability of choose the same marble again

Initial Conditions

Box I: 4 red and 8 blue balls.

Box II: 5 red and 3 blue balls.

Unfair Coin: 40% Heads (Choose Box I), 60% Tails (Choose Box II).

Experiment

1. Coin-flip outcome decides which box.

2. Ball is drawn without replacement.

3. Repeat.

The answer in the linked question calculated all probabilities for a simple case of 2 experiment iterations (the event was "ball 2 is the same color as ball 1").

I am wondering if there is a way to generalize this for any number of iterations by using known distributions.

It is clear that the coin (i.e. box choice) is modeled by a binomial distribution $B(n=20, p=0.4)$, and the ball selection in each box is modeled by two distinct hypergeometric distributions $H_\mathrm{I}(N=12, K=4,k=1)$ and $H_\mathrm{II}(N=8, K=5,k=1)$.

Note: $n=20$ for the binomial distribution, since there are 20 balls to draw at most, and thus 20 experiment iterations.

It seems like a non-trivial task to generalize, as I am not sure how to put these pieces together. My question may be ill-defined even, I am unsure.

Insight and help are appreciated.

Best Answer

I think you have the wrong model for the coin toss because it is tossed only once. Otherwise, this seems started on the right track.

For Box I, the number $R$ of red balls drawn, when two are drawn at random without replacement, is hypergeometric as you say.

$$P(R = k) = \frac{{4 \choose k}{8 \choose 2-k}}{12 \choose 2},$$ for $k = 0, 1, 2.$

In R statistical software, these three probabilities can be found, using a hypergeometric PDF dhyper, as follows:

dhyper(0:2, 4, 8, 2)
[1] 0.42424242 0.48484848 0.09090909

Without software, you could compute $[1-(4/12)(8/11)].$

The two balls cannot be of the same color if $R = 1$ Thus $P(\text{Same}) = 0.5151515 = 17/33.$ Without software, you could compute $[1-2(4/12)(8/11)]$ or $(4/12)(3/11)+(8/12)(7/11)$

Similarly, the probability of getting two balls of the same color from Box II is $1 - 15/28 = 13/28 = 0.4642857.$

dhyper(0:2, 5, 3, 2)
[1] 0.1071429 0.5357143 0.3571429

Then the probability of getting two balls of the same color after the coin toss is.

$$P(\text{Same}) = P(I)P(\text{Same}|I) + P(II)P(\text{Same}|II)\\ = (.4)(17/33) + (.6)(13/28) = 0.484632.$$

I hope the general idea of combining the two hypergeometric probabilities is clear, but I'm not sure just what else you want to generalize. You would still need to specifiy in detail how many balls of each color are in each urn.

Related Question