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

  • 3
    I think you _really_ ought to think about the hint!! A very substantial piece of information will emerge from that. If you use that, you get a very very quick answer.2012-09-21
  • 0
    Actually, I agree with the hint but not with the suggested answer. What is your source?2012-09-21
  • 0
    one solution manual says $1-p$, the other one says it's $\frac {15}{16}$...x_x2012-09-21
  • 0
    What is(are) the source(s)?2012-09-21
  • 1
    Neither $1-p$ nor $\frac{15}{16}$ are correct for all values of $p$. The former is correct when $p=1$ and the latter when $p=\frac12$.2012-09-21
  • 0
    source: http://www.math.bme.hu/~balazs/a3pr9f06.pdf Question/Answer #62012-09-21
  • 0
    This is the answer I have given below2012-09-21
  • 0
    @user133466 You are fully entitled to accept and/or unaccept whichever answer you want but, please, answer queries about your motives like Jean-Sébastien's above. Not doing so is detrimental to the site.2012-09-23
  • 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
    errr, no not really... do you agree that the answer is 1-p?2012-09-21
  • 0
    Not really, the 1-p indicates that if you have a T on the first throw, then you will get the sequence THHH before HHHH, as I tried to explain. But you could get $HH$ on your first two throw and still get $THHH$ first. The only way for $HHHH$ to appear before $THHH$ is to get it from the start, which has a $1/p^4$. The answer you seek is then 1-1/p^42012-09-21
  • 0
    First comment is what I'm saying, second doesn't really make sense to me...2012-09-21
  • 0
    I found another answer and added to the body of my question. What do you think of that?2012-09-21
  • 0
    Jean gave the right answer and a sound explanation. If you have that why search the internet for some other anonymous student's answer?2012-09-21
  • 0
    Jean-Sébastien: Replace 1-1/p^4 by 1-p^4 and everything is fine.2012-09-21
  • 0
    Yup, added it to answer2012-09-21
  • 0
    your answer is very insightful, but after reading them, I tend to side with the answer $1-p$ simply because we can have any gibberish after the first flip, for example, THTHTHTTH, if we want to form HHHH, we must have HHH, and because we have ensured that the first roll is not an H, we will eventually have THHH, in my suggested gibberish example, it would turn out to be THTHTHTTHHH, there we have THHH before HHHH. So $1-p$ excludes the possibility that on the first flip, we have a H, there's the answer we're looking for.2012-09-22
  • 0
    But you can also have $HHHT$ on the first $4$ flips, ensuring that $THHH$ is going to come first.2012-09-22
  • 0
    ok yes, you're correct. ill think about it a little bit more2012-09-22
  • 0
    shouldn't the answer be $1-p-p^2-p^3-p^4$ because $1-p^4$ only excluded the possibility that all of the first 4 flips are H, we can also have HTHHH, HHTHHH, HHHTHHH, therefore those probabilities need to be subtracted as well.2012-09-22
  • 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