Probability of HTT before HHT via the Law of Total Probability

321 Views Asked by At

Suppose you repeatedly flip a fair coin until you see the sequence HHT or the sequence HTT. What is the probability you see the sequence HTT before you see the sequence HHT?


I am attempting to understand the solution of this problem, but I'm having difficulty translating the law of total probability onto the series of coin tosses.

According to the solution, we first start with the following:

$P(A) = P(A|T)P(T) + P(A|H)P(H)$, where $A = HTT$.
$ P(A)= p(\frac{1}{2}) + r\frac{1}{2}$

This first part is straight forward to me. It states that the probability of HTT can be considered contingent on two basic initial starting scenarios: we either flip Heads or Tails as the starting condition. The probability of HTT given T is the same as starting a series of coin flips from square one, since no winning or losing conditions can begin with T, so we let it equal "p", the probability of overall success. On the other hand, the probability of HTT given an initial flip of "H" can lead to either a win or lose outcome. We use "r" to represent the probability of A given H, and then consider it further:

$P(A|H) = P(A|HT)P(T) + P(A|HH)P(H)$ $ = P(A|HT)(\frac{1}{2}) + 0(\frac{1}{2})$

$r = P(A|HT)(\frac{1}{2})$

This is where I start to lose the thread. I understand conceptually that the next step is to consider the probability of HTT as contingent on two possible outcomes: 1) the probability of HTT given we flip H and then T; and 2) the probability of HTT given we flip HH. But I don't understand how P(T) and P(H) fit in this equation. Shouldn't it be P(HT) and P(HH), respectively? I am having difficulty reframing the textbook definition of the Law of Total Probability into this situation.

Now what I do understand is that the second term, $P(A|HH)(\frac{1}{2}) = 0$. This is because as soon as we see a second heads, we know that our probability of getting HTT on the third flip is now impossible, since we can't get to HTT having HH. That leaves us to consider $P(A|HT)$.

The last part is confusing for me for the same reasons as the second part. It goes like this:

$P(A|HT) = P(A|HTT)P(T) + P(A|HTH)P(H)$ $ = 1(\frac{1}{2}) + r(\frac{1}{2})$

We can then simplify and solve for "r", where we let $P(A|HT) = r(\frac{1}{2})$, which we determined in part 2. Doing so should give us $r = \frac{1}{3}$.

$r(\frac{1}{2}) = \frac{1}{2} + \frac{r}{2}$

$r = \frac{1}{3}$

If someone can explain these issues I'm having, it would be appreciated. I've been working on a lot of these sorts of word problems lately, and I'm struggling to come up with some sort of common framework I can use to solve these sort of "turn-based-until-you-meet-some-win-condition" kind of problems.

2

There are 2 best solutions below

2
On

According to you, the equation should be: $$P(A|H)=P(A|HT)P(HT)+P(A|HH)P(HH)$$

This equation is almost correct. Notice the $A|H$ on the left side of the equation. This conditional implies that we have already assumed the first flip to be $H$. Hence, the right side of the equation must also assume this same condition. $$P(A|H)=P(A|HT)P(HT|H)+P(A|HH)P(HH|H)$$ This equation includes the condition that the first flip is $H$. Notice that the $P(HT|H)$ and $P(HH|H$) probabilities reduce to $P(T)$ and $P(H)$ respectively.

The same reasoning can be applied to the equation: $$P(A|HT)=P(A|HTT)P(HTT|HT)+P(A|HTH)P(HTH|HT)$$

Since we have already assumed the first two flips to be $HT$, $P(HTT|HT)=P(T)$ and $P(HTH|HT)=P(H)$.

0
On

HTT before HHT

  • Here is an approach giving step by step progress
  • Note that if "game" has not finished, and $HH$ has apeared, we can't permit $T$ to come next !
  • Trace movements from start, knowing that a coin toss has equal chances to fall heads or tails
  • Now frame equations starting from $s$, where no toss has taken place, naming H = a, T=b, HT = c, HH=d,
    then proceeding step by step, we get the equations

$\displaylines{s = a/2 +b/2\\a = c/2 +d/2\\b=a/2+b/2,\\c= (1/2)\cdot1 +a/2\quad\\ [Pr = 1/2\, that\, we\, reach\, our\, goal\,]\\d= (1/2)\cdot0 +d/2\\ \quad[We\, do\, not\, allow\, HHT\, to\, occur\,] }$

Solving this system of linear equations, we get $s = \dfrac13$, indicating that P(HTT before HHT) = $\dfrac13$