1
$\begingroup$

This is a very challenging problem of which I'm stuck.

I have a fair coin with a probability of getting head as 0.5, and a bias coin with probability of getting head as 0.8

I grab a coin and I keep flipping it, and I keep getting heads. How many flips will it take for the probability of the coin being fair to drop < 0.1


Let our notation be:

  • P(1H) = Probability of getting heads in first flip
  • P(2H|1H) = Probability of getting heads on first flip, and heads on second flip
  • P(F) = Probability of it being a fair coin
  • P(B) = Probability of it being biased coin

I know that P(1H) = 0.5*0.5 + 0.5*0.8 = 0.65

P(F|1H) = Probability of first coin being fair if i got heads on first flip = P(1H|F)*P(F) / P(H) = (0.5*0.5)/0.65 = 0.3846

P(B|1H) = (0.8*0.5)/0.65 0.6154 given same calculations

P(2H|1H) = P(2H|1H, F|1H)*P(F|1H) + P(2H|1H, B|1H)*P(B|1H) = 0.5*0.3846 + 0.8*0.6154 = 0.6846

P(F|(2H|1H)) = P(2H|1H, F)*P(F) / P(2H|1H) = 0.5*0.5 / 0.6846 = 0.3652

So I know the probability of getting a fair coin with two flips is as follows

But i could keep going, and this expression would get more and more complicated. How on earth do i solve this?

$\endgroup$
1
  • 1
    $\begingroup$ Please format your questions so that they are read-friendly. $\endgroup$ Commented Sep 8, 2018 at 20:50

1 Answer 1

3
$\begingroup$

Let's first find P(Fair | n Heads) = $P(F|nH)$, which can be written as $$P(F|nH) = \frac{P(nH|F)P(F)}{P(nH)} = \frac{(0.5)^n(0.5)}{(0.5)^n(0.5)+(0.8)^n(0.5)}$$ This should be < 0.1, and it it achieved when $$9 < (\frac{8}{5})^n$$ which is satisfied first when $ n = 5 $.

$\endgroup$
9
  • $\begingroup$ Okay, so you are saying that P(2H) = 0.5*0.5*0.5 + 0.8*0.8*0.5. I can't understand why this is the case. $\endgroup$ Commented Sep 8, 2018 at 21:05
  • $\begingroup$ Does this mean this expression i wrote above is wrong??? P(2H|1H) = P(2H|1H, F|1H)*P(F|1H) + P(2H|1H, B|1H)*P(B|1H) Is this then supposed to be P(2H|1H) = P(2H|1H, F)*P(F) + P(2H|1H, B)*P(B) Please explain why its like this and not like what i wrote $\endgroup$ Commented Sep 8, 2018 at 21:07
  • $\begingroup$ You have two ways of getting 2 heads, either you have biased or fair coin. That is $P(2H) = P(2H|F)P(F) + P(2H|B)P(B)$ $\endgroup$
    – gunes
    Commented Sep 8, 2018 at 21:12
  • $\begingroup$ Okay, however take a look at this question: math.stackexchange.com/questions/1481433/… They say that P(2H/1H) = P(2H/1H,F)P(F/1H) + P(2H/1H,B)P(B/1H) $\endgroup$ Commented Sep 8, 2018 at 21:21
  • $\begingroup$ First of all, one should use the following notation while describing the given events: $P(A|B) = P(A,C| B) + P(A,C'|B)$, which in turn equals to $P(A|B,C)P(C|B) + P(A|B,C')P(C'|B)$, i.e. keep the occured event after | sign to impede any confusion. $\endgroup$
    – gunes
    Commented Sep 8, 2018 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .