Expected time for a coin tossing game

220 Views Asked by At

'We play a game, with a fair coin. The game stops when either two heads or two tails appear consecutively. What is the expected time until the game stops?'

Suppose we roll once every second, so the number of rolls to stop the game is the same as the amount of time the game is played for. On our first two rolls we can get one of HH, HT, TH or TT. If we get HH or TT we are done, and if we get HT or TH we are back to our initial expected time plus 2. So, $E = \frac{1}{4}2 + \frac{1}{4}2 + \frac{1}{2}(E+2) \implies E = 4$. But I should get $E=3$; where have I gone wrong?

2

There are 2 best solutions below

0
On

If we get HT or TH we are back to our initial time plus 2.

Not quite sure about this. For example if you have HTT the stopping time is $3 = 1+2$ so you count again but starting from the toss T. So it is plus 1 instead of plus 2.

0
On

One way of looking at the problem is as follow: Denote $S$ as being the number of times until you stop. We condition on the first throw so as to look only at what comes next. We have

$$ \mathbb{E}(S) = 1 + \frac{1}{2} \mathbb{E}(S | T) + \frac{1}{2} \mathbb{E}(S | H)$$

This amounts to computing $\mathbb{E}(S | T)=\mathbb{E}(S | H)$ by symmetry.

Now notice that:

$$ \mathbb{E}(S | T) = \frac{1}{2} + \frac{1}{2} (1+\mathbb{E}(S | H)) $$

And this leads to the desired answer.