Probability in flipping a coin 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 

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$.
 A: 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$
A: 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$
