6
$\begingroup$

Independent flips of a coin that lands on heads with probability p are made.

What is the probability that the pattern T, H, H, H occurs before the pattern H, H, H, H?

Hint: How can the pattern H, H, H, H occur first?

my approach is $\sum_{n=0}^\infty (1-p^4)^n(1-p)^3$ then i get $\frac {(1-p)p^3}{1-(1-p^4)}$

However, the suggested answer is

enter image description here

Am I wrong? What is the rationale behind the suggested answers?

Another answer I found online is: Our first observation is that for any 0 < p < 1 we will eventually see the pattern (H, H, H, H). Suppose that the first such pattern starts at the nth flip. If n > 1, then the n − 1th flip cannot be H since then the first (H, H, H, H) pattern would have started before the nth flip. Hence in this case the n − 1th flip is necessarily T, and starting with the n − 1th flip we see the pattern (T, H, H, H, H). In that sequence, (T, H, H, H) appears before (H, H, H, H). Summarizing, (H, H, H, H) can only appear before (T, H, H, H) if it starts immediately at the n = 1st flip, that is if all four first flips are heads. The probability of that is $p^4$.

  • 0
    @did the answer is accepted, when i unaccepted the answer, I added questions in the comment beneath the answer, and Jean provided answers to my questions, so i reaccepted his answer.2012-09-24

2 Answers 2

4

In order to get $4$ consecutive Heads, you need to get $3$ consecutive Heads. However, getting $3$ consecutive heads ensure the first sequence if the last throw before the $3$ H was $T$, and the second one if it was $H$. So unless your $3$ H appears on start, you know you are done. Now the Only way for $HHHH$ to occur before THHH is to start with $4$ consecutive H. Can you see why that is?

Added

We are going to prove that if you have a T in your first 4 throws, then THHH will appear first. Indeed, as mentionned above, getting four consecutive $H$ requires to get $3$ consecutive $H$ first. Suppose you have found your first $HHHH$ sequence somewhere in your string. Look at the throw before the first $H$. Either it is a $T$, in which case the sequence $THHH$ appeared first, or there is no throw because the first $H$ was your first throw. (It can't be a $H$ otherwise your $HHHH$ sequence would not be the first one to occur.) So the only way for $HHHH$ to come first is to start with it, which has probability $p^4$. So the answer you seek is $1-p^4$

  • 0
    $p^4$ is the probability that $HHHH$ comes first, which can only occur if the $4$st first throws are $H$. This can be done with probability $p^4$. So the probability that $THHH$ comes first is $1-p^4$2012-09-22
0

Here is a rigorous proof as to why the answer is $1-p^4$

Let E=event that pattern THHH occurs before HHHH and A=event that next 3 flips are heads

$P(E)=P(E|T)P(T)+P(E|H)P(H)$

$P(E|T)=P(E|T\cap A)P(A)+P(E|T\cap A^c)P(A^c)$

$P(E|T)=p^3+P(E|T)(1-p^3)$

$\Rightarrow P(E|T)=1$

Doing something similar for $P(E|H)$, we get $P(E|H)=P(E|T)(1-p^3)$

$\Rightarrow P(E)=1-p^4$

  • 0
    Why is P(E|T) = P(E|T and not A)?2016-10-27