1

I am trying to build on the intuition from this answer to determine the number of coin tosses in order to obtain the pattern $T-H-H$. I did ask a similar question here but feel like I was overreaching and wasn't able to understand the answers provided unfortunately. So, I've gone with an easier question here and have given my logic.

My thinking: If $e$ is the expected number of throws, then:

$$e=\frac{1}{2}(e+1)+\frac{1}{4}(e+1)+\frac{1}{8}(e+2)+\frac{1}{8}(3).$$

where there first term on the Right Hand Side is as a result of obtaining a H on the first throw. The 2nd term is when T-T is obtained and hence effectively 1 throw is wasted and the third term is when T-H-T is obtained and hence two throws have been wasted. However, I get $e = 11$ when it is meant to be 8 and so I just wanted to figure out the issue in my logic. Also, please could someone just correct my logic and not provide another method, as I feel this is the fastest method to do this question.

Thank You

Jojo
  • 1,013
  • Re the e+1 term, when TT is obtained, indeed 1 throw is wasted but the remaining time to produce THH is strictly less than e since one already has a T to work with. To sum up it is not possible to write down directly e in terms of e alone. – Did Sep 14 '15 at 19:36
  • The solution is to consider, not only e the mean number of tries to produce THH starting from nothing, but also f the mean number of tries to produce THH starting from T and g the mean number of tries to produce THH starting from TH (yes, the empty word, T and TH are the prefixes of THH). Then e=1+e/2+f/2, f=1+f/2+g/2 and g=1+f/2, leading to e=8. Note that the mean number of tries to produce THT is 10, not 8. – Did Sep 14 '15 at 19:41

1 Answers1

2

The problem is that it's not right that "effectively one throw is wasted" (and likewise for "two throws have been wasted"). In the second term, you're using the probability for two throws and counting only one of them towards the required number, on the basis that the second T isn't wasted but can form part of an upcoming THH. But the second T isn't just not wasted, it's progress – the expected number of remaining throws at this point isn't just $e-1$, but even less.

Applying your approach to the simpler problem of the expected number of throws to get two Hs, we could say that if you get a T you need $e+1$, and if you get an H it's "not wasted" so you need $e$, so we'd get

$$ e=\frac12(e+1)+\frac12e\;, $$

which has no solutions. The correct expectation conditioned on a throw of H is $2$ with probability $\frac12$ and $e+2$ with probability $\frac12$, so

$$ e=\frac12(e+1)+\frac12\left(\frac12\cdot2+\frac12(e+2)\right)=\frac34e+\frac32\;, $$

so $e=6$. Thus the actual expectation conditioned on a throw of H is $\frac12\cdot2+\frac12(e+2)=4$, whereas your approach yields $e$, which is $6$.

Here's a (hopefully) correct calculation, as far as possible in the spirit of your approach, as outlined by Did in a comment: $e$ is the expected number of throws when you're starting from scratch, $f$ when you already have a T and g when you already have TH. Then

$$ e=1+\frac e2+\frac f2\;,\\ f=1+\frac f2+\frac g2\;,\\ g=1+\frac f2 + \frac02\;. $$

The last two equations yield $g=4$ and $f=6$, and then the first yields $e=8$.

joriki
  • 238,052
  • 1
    Great explanation. Thanks a lot. – Jojo Sep 14 '15 at 20:01
  • Hi joriki - The expected throws to get 2 consecutive H is 6. The reasoning goes as follows: e = 1/2(e+1) + 1/4(e+2) +1/4(2). First term when T comes in first throw, Second term when HT comes and third term is when HH comes. What you calculated is expected throws to get HT (or TH) – Rahul May 02 '16 at 17:57
  • @Rahul: Thanks for the correction. I fixed the answer. – joriki May 02 '16 at 18:09
  • Can you explain the last 3 equations construction please. I would re-write last equations as follows e = 1/2(1+e) + 1/2(1+f) [1st term when next throw is H, 2nd term when T; and each take one throw and has probability 1/2]. Now 2nd equation as f = (g+1)/2 + (f+1)/2 [1st term for H and 2nd for T and both equally likely]. Finally 3rd equation as g = (1)/2 + (f+1)/2 [1st term for H and 2nd for T and both equally likely] – Rahul May 02 '16 at 18:31
  • @Rahul: Those are exactly my three equations. You just split the $1$ over the two cases whereas I said the $1$ throw is incurred no matter what its result is so I put it in front and then just added half of the additional throws for each case. – joriki May 02 '16 at 18:38
  • @joriki. That makes sense. I was trying to interpret 0/2 in your last equation. – Rahul May 02 '16 at 19:44