In: Statistics and Probability
Suppose that we flip a fair coin until either it comes up tails twice or we have flipped it six times. What is the expected number of times we flip the coin?
Let n be the number flips
then, we have to start from n =2 because we need to tails, so tails on first flip then tails on second flip
so, we will start from n = 2
Expected number of flips required to come up with two tailes before flipping it for 6 time =
[(n-1)/2^n)]
So, the expected number = n*probability
For n=2, expected number is n*[(n-1)/2^n)] = 2*[(2-1)/2^2] = 2/4
similarly for 3,4 and 5, we can write
For n=3, expected number is n*[(n-1)/2^n)] = 3*[(3-1)/2^3] = 3*(2/8)
For n=4, expected number is n*[(n-1)/2^n)] = 4*[(4-1)/2^4] = 4*(3/16)
For n=5, expected number is n*[(n-1)/2^n)] = 5*[(5-1)/2^5] = 5*(4/32)
Now, for the 6th flip, we have to stop
so, Probability of flips for 6th time = 1 - Probability of 2nd, 3rd, 4th and 5th flip = 1 - [1/4+2/8+3/16+4/32] = 1 - 13/16
so, probability of flip for 6th time = 3/16
expected number of flips for the 6th time to get two tails = 6*(3/16)
so, the total expected number of times we flip the coin = 2/4 + 3*(2/8)+ 4*(3/16)+5*(4/32)+6*(3/16) = 15/4
or we can write it as 3.75
so, the required answer is 3.75 or 15/4 flips