# What's the probability that a hat has only white coins left?

A hat has 4 coins that are each either black or white. I randomly grab 2 coins one at a time and find them to be both black. What's the probability that the 2 coins still in the hat are white?

I am trying to use Baye's theorem for this question, but I am not too sure what to condition on. We don't know the probability of a coin being black or white, right?

-
You need a prior probability on the number of white/black coins in the hat. The conjugate prior in this case would be the Beta-Binomial distribution, since the likelihood is hypergeometric. – Jonathan Christensen Dec 31 '12 at 23:45
Hint: there are $16$ possibilities for the coins, $WWWW, WWWB, WWBW,WWBB, ...., BBBB$. You know that the one of the four sequences $BBWW, BBWB, BBBW, BBBB$ has occurred since you have observed $BB\cdot\cdot$. So, the (conditional) probability is the ratio of the probability of $BBWW$ to the probability of $\{BBWW,BBWB,BBBW,BBBB\}$ which probabilities, as you say, are not specified. But you could state the result for equally likely outcomes... – Dilip Sarwate Dec 31 '12 at 23:53

If the prior probability of having $0\le i \le 4$ black coins in the hat is $p_i \equiv P[N_b=i]$, then the probability of drawing $BB$ is $P[BB]=p_4 + p_3 / 2 + p_2 / 6$. Using Bayes' theorem, the probability that two white coins remain after drawing $BB$ is: $$P[N_b=2 \;|\; BB] = \frac{P[BB \;|\; N_b=2]P[N_b=2]}{P[BB]}=\frac{p_2/6}{p_4+p_3/2+p_2/6}=\frac{p_2}{p_2+3p_3+6p_4}.$$ One "neutral" prior distribution might be $p_0=p_1=p_2=p_3=p_4=1/5$; in this case the posterior probability that two white coins remain is $1/10$. Another natural prior would be the binomial distribution, where $p_0=p_4=1/16$, $p_1=p_3=1/4$, and $p_2=3/8$. In that case the posterior probability would be $1/4$.

-

Assuming that there is an equal probability that the coins are white or black (which I believe the question implies), and that the color of each coin is independent of each other, then there's a $\frac{1}{4}$ chance that they are both white.

If you attempt to apply Bayes' law here, then you would have the same probability, because both events are independent of each other.

$$P(A|B) = \frac{P(B | A) P(A)}{P(B)}$$ $$P(A|B) = \frac{P(B)P(A)}{P(B)}$$ $$P(A|B) = P(A)$$

But perhaps the question is asking this: Assume the probability of a coin being either white or black. Given that the first two coins are black, what is the probability that the next two are white?

I think that the first result is more likely what they are asking, since there's many ways to do the second one. Regardless, there are some methods with the second one detailed here: http://en.wikipedia.org/wiki/Checking_whether_a_coin_is_fair

If you follow that, you could say that there is a $0%$ chance there are two whites remaining, because clearly, there's a 100% chance of getting black.

However, you could also say there is a $\frac{3}{4}$ chance of the coin being black, because the expected value is equal to 3/4. Then there is a $\dfrac{1}{16}$ chance.

-

Here's my attempt (someone tell me if you see anything wrong, please): $$P(\mathrm{All\ Black}|\mathrm{First\ Two\ Black})=\frac{P(\mathrm{First\ Two\ Black}|\mathrm{All\ Black})P(\mathrm{All\ Black})}{P(\mathrm{First\ Two\ Black})}$$ Let $p$ be the probability that when each of the 4 coins were being chosen to be put in the hat, a black coin is selected. $$P(\mathrm{All\ Black}|\mathrm{First\ Two\ Black}) =\frac{1 \cdot p^4}{P(\mathrm{First\ Two\ Black})} \\ = \frac{p^4}{P(\mathrm{First\ Two\ Black|2\ coins\ are\ Black})P(\mathrm{2\ coins\ are\ Black})+P(\mathrm{First\ Two\ Black|3\ coins\ are\ Black})P(\mathrm{3\ coins\ are\ Black}) + P(\mathrm{First\ Two\ Black|4\ coins\ are\ Black})P(\mathrm{4\ coins\ are\ Black})}$$ By the rule of Total probabilties (clearly at least 2 coins in the hate were black). Then: $$P(\mathrm{All\ Black}|\mathrm{First\ Two\ Black}) = \frac{p^4}{\frac{1}{6}p^2 +\frac{1}{2}p^3 + p^4 } \\ = \frac{6p^2}{1 +3p + 6p^2 }$$ Tell me if it would be helpful if I elaborated on some of the steps.

-