0
$\begingroup$

Suppose I have two unfair coins A and B. The probability of A landing on heads is 0.6 and the probability of B landing on heads is 0.5. Suppose now that one coin is picked at random (with a 0.5 probability) and flipped 10 times, giving the result HHHHTHHHHH. What is the probability that coin A was used?

I am most interested in the reasoning behind how to get to the answer.

This questions comes as a result of reading this article on the expected maximisation algorithm.

$\endgroup$
  • 2
    $\begingroup$ Why is B not called a fair coin? $\endgroup$ – Dilip Sarwate Jan 11 '17 at 14:01
  • $\begingroup$ Yeah it is, just left it that way for conciseness, maybe should have made that clear $\endgroup$ – dippynark Jan 14 '17 at 10:49
2
$\begingroup$

You can solve this by the application of Bayes' theorem.

You are given the probability of choosing coins $A$ and $B$:

$$P(A) = P(B) = \frac{1}{2}$$

You are also given the probability of getting a head, given that you have chosen coin $A$ or $B$:

$$P(H|A) = \frac{6}{10} \quad P(H|B) = \frac{1}{2}$$

Therefore you can compute the probability of getting 10 heads with either coin.

$$P(10 H|A) = \left(\frac{6}{10}\right)^{10} \quad P(10 H|B) = \left(\frac{1}{2}\right)^{10}$$

You are interested in the probability that coin A was used, given that 10 heads were observed, i.e. $P(A|10H)$. Using Bayes' theorem:

$$P(A|10H) = \frac{P(10H|A)P(A)}{P(10H)}$$

The marginal probability $P(10H)$ is the weighted sum of probabilies of getting 10 Heads across the two coins: $$P(10H)=P(10H|A)P(A)+P(10H|B)P(B)$$

Therefore:

$$\frac{P(10H|A)P(A)}{P(10H|A)P(A)+P(10H|B)P(B)}$$

And since in this example $P(A) = P(B)$

$$P(A|10H)=\frac{P(10H|A)}{P(10H|A)+P(10H|B)}= \frac{\left(\frac{6}{10}\right)^{10}}{\left(\frac{6}{10}\right)^{10} + \left(\frac{1}{2}\right)^{10}} \approx 0.861$$

$\endgroup$
  • $\begingroup$ Perfect, the question was actually for 1T and 9H (I wrote it a bit confusingly I think) but your answer is general enough to answer any case, thank you very much $\endgroup$ – dippynark Jan 11 '17 at 10:19
  • $\begingroup$ Yes to get $P(9H,1T)$ just substitute this where you see $P(10H)$ i.e. $P(10H|A)$ becomes $P(9H,1T|A)$ $\endgroup$ – Morgan Ball Jan 11 '17 at 10:51
  • 1
    $\begingroup$ @Dippynark This may be redundant, but do note that there is only one way of flipping heads ten out of ten flips (HHHHHHHHHH), but that the other possible sequences e.g. flipping tails once, are more frequent: flipping tails once and heads nine times can occur in ten possible sequences. In short, take note of this when substituting the $P(10H|A)$ for $P(9H,1T|A)$ $\endgroup$ – IWS Jan 11 '17 at 12:08
  • $\begingroup$ Cheers, yeah I just multiplied by the choose function C(10,1) $\endgroup$ – dippynark Jan 14 '17 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.