Penney's Game: Probability of HHT before HTT in a series of coin tosses

417 Views Asked by At

What is the probability that, in a random sequence of Heads (H) and Tails (T), HHT shows up before HTT?


By the Law of Total Probability, I believe the answer can be found by solving the following:

$P(HHT) = P(HHT|HH)P(HH) + P(HHT|HT)P(HT) + P(HHT|TH)P(TH) + P(HHT|TT)P(TT)$

HH, HT, TH, and TT ought to have a probability of $\frac{1}{4}$, which is easy to see if you draw a tree diagram.

From here, things get messy, and I think somewhere along the line I made a mistake, but I am having difficulty seeing it. I have determined that:

  1. $P(HHT|HH) = P(HHT|HHH)P(HHH|HH) + P(HHT|HHT)P(HHT|HT) = P(HHT|HH)(\frac{1}{2}) + (1)(\frac{1}{2})$

Which then simplifies into: $ P(HHT|HH) = 1$

  1. $P(HHT|HT) = P(HHT|HTH)P(H) + P(HHT|HTT)P(T) = P(HHT|HH)(\frac{1}{2}) + (0)(\frac{1}{2})$

which simplifies to $P(HHT|TH) = 2P(HHT|HT)$

  1. $P(HTT|TH) = P(HHT|THH)P(H) + P(HHT|THT)P(T) = P(HHT|HH)(\frac{1}{2}) + P(HHT|HT)(\frac{1}{2})$

which simplifies into $P(HHT)|HT) = 1$

  1. $P(HHT|TT) = P(HHT|TTH)P(H) + P(HHT|TTT)P(T) = P(HHT|TH)(\frac{1}{2}) + P(HHT|TT)(\frac{1}{2})$

which simplifies into $P(HHT|TH) = P(HHT|TH)$

However, when I put this altogether, I get an answer of $\frac{7}{8}$, which is incorrect, since I double checked my work and looked up the probability of the combination's chance of winning over HTT, and it should be $\frac{2}{3}$.

Is my approach correct in principle? Is my mistake just "sloppy maths" that arise because of how many variable I need to accurately track?

1

There are 1 best solutions below

0
On BEST ANSWER

Your method is totally valid, but as you note it involves writing out a lot of formulas which can make it harder to actually get the right answer. Here are the mistakes I see in your math:

  • In case 2, your $P(HHT|HTH)$ somehow turned into $P(HHT|HH)$ which is not valid. Later you turned it back into $P(HHT|TH)$ which is correct, so this mistake didn't cost you, but you should be careful!
  • In case 3, your LHS says $P(HTT|TH)$ but I think it's just a typo; you meant $P(HHT|TH)$. Your "which simplifies into" for this case is wrong though. Instead, I get $P(HHT|TH) = \frac 1 2 + \frac{1}{2}P(HHT|HT)$. Now you need to solve a system of equations, using your results from cases $2$ and $3$ to find $P(HHT|TH)$ and $P(HHT|HT)$.
  • Finally, in case 4 you write the conclusion $P(HHT|TH)=P(HHT|TH)$, but the correct simplified version is $P(HHT|TT) = P(HHT|TH)$.

You should watch out when using this kind of approach! Going very slowly and carefully is usually worth it, since it's much better to get the right answer in 15 minutes instead of making a mistake in 5 minutes and needing to go back through the mess of notation again to find the error.


Here's how I would solve the problem while writing out fewer formulas.

Call the target strings $A=HHT$ and $B = HTT$. All $T$s before the first $H$ are irrelevant because $A, B$ both start with $H$, so let's just assume the first flip is H.

If the second flip is also $H$, then $A$ will win next time we flip $T$, and $B$ can never win before that. So $A$ will always win in this case, which happens $\frac{1}{2}$ of the time.

If the second flip is instead $T$ then we need subcases. If the third flip is $T$ then $B$ wins; this happens $\frac 1 4$ of the time. If the third flip is instead $H$ then we're back in the same situation as we were after the first flip. This also happens $\frac 1 4$ of the time.

In summary, we have a process where $A$ wins $\frac 1 2$ of the time, $B$ wins $\frac 1 4$ of the time, and in the remaining $\frac 1 4$ of cases we have to restart the process. This gives us $$\begin{align} P[A \text{ win}] &= \frac 1 2 (1) + \frac 1 4 (0) + \frac 1 4 P[A \text{ win}] \\ \frac 3 4 P[A \text{ win}] &= \frac 1 2 \\ P[A \text{ win}] &= \boxed{\frac 2 3}. \end{align}$$

This is doing basically the same thing as your approach, but I'm using less formulas and more thinking/word explanations. Both methods work and you should use whatever you feel more confident with.