Problem
Two coins are in a hat. The coins look alike, but one coin is fair (with probability 1/2 of Heads), while the other coin is biased, with probability 1/4 of Heads. One of the coins is randomly pulled from the hat, without knowing which of the two it is. Call the chosen coin “Coin C”.
(a) Coin C is tossed twice, showing Heads both times. Given this information, what is the probability that Coin C is the fair coin?
My answer 1.
Bias: 1/4 * 1/4 = 1/16
Fair: 1/2 * 1/2 = 1/4
Fair/(Bias + Fair) = 4/5
My answer 2. following bayes'
$$ P(F| 2H) = \frac{P(2H | F) P(F)}{P(2H)} \\ = \frac{2}{5} $$
Which one is the correct?
The second method is more general. But both methods give the same result. The different result you give for method 2, is due to some computation error (for me). We have : $$ P(2H) = P(F)P(2H|F) + P(not F)P(2H| not F) = \frac{1}{2}\frac{1}{4} + \frac{1}{2}\frac{1}{16} = \frac{5}{32} $$ So Bayes' formula gives : $$ P(F|2H)=\frac{P(2H|F)P(F)}{P(2H)} =\frac{\frac{1}{4}\frac{1}{2}}{\frac{5}{32}} = \frac{4}{5} $$
So we have the same result after two computations