# 1 Fair Coin, 1 Biased Coin. Keep getting heads. How many flips until probability of it being fair < 0.1

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?

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$.
• 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)$ Commented Sep 8, 2018 at 21:12
• 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. Commented Sep 8, 2018 at 21:26