Expected number of coin flip

173 Views Asked by At

I need to calculate the expected number of coin flips needed to get two consecutive heads.

Below is my approach -

  • Expected number 1. Probability is 0 (because I need atleast 2 tosses)
  • Expected number 2. It is HH. Probability is .5^2
  • Expected number 3. It is THH. Probability is .5^3

So on.

So my total expected number will be infinite sum of 2*.5^2 + 3*.5^3 +...

Is my approach correct? If not, where am I doing wrong?

Is there any finite value of above sum?

Your pointer will be highly appreciated.

1

There are 1 best solutions below

2
On BEST ANSWER

This is a Markov Chain problem. Suppose we stop flipping once we get two consecutive heads We have the following states:

  • The last flip was tails.
  • The last flip was heads

Let $a, b$ denote the expected value of the number of steps it takes to stop flipping from each state. Here $$a = 1 + \frac{1}{2}a + \frac{1}{2}b$$ $$b = 1 + \frac{1}{2}a$$ and solving gives $a=6$ and $b=4$. From the starting state, this is equivalent to if the last flip was tails, so the expected value is $\boxed{6}$.