[Math] the probability that a run of $n$ consecutive successes occurs before a run of $m$ consecutive failures

probability

This example comes from the book "A First Course in Probability" by Sheldon Ross, Chapter 3, Section 3.5, Example 5C, Page 95. The example is given a solution but there is a part that I don't really understand. I hope someone can explain the logic to me.

The original question is as follow:

Independent trials, each resulting in a success with probability $p$ or a failure with probability $q = (1-p)$, are performed. We are interested in computing the probability that a run of $n$ consecutive successes occurs and before a run of $m$ consecutive failures. We are given the solution as follow:

Solution.: Let E be the event that a run of $n$ consecutive successes occurs before a run of $m$ consecutive failures. To obtain P(E), we start by conditioning on the outcomes of the first trial. That is letting H denote the event that the first trial results in a success, we obtain $$P(E) = pP(E|H)+qP(E|\bar H)$$ Now, given that the first trial was successful, one way we can get a run of $n$ successes before a run of $m$ failures would be to have the next $n-1$ trials all result in successes. So, let us condition on whether or not that occurs. That is, letting F be the event that trials 2 through n all are successes, we obtain $$P(E|H) = P(E|FH)P(F|H)+ P(E|\bar{F}H)P(\bar{F}|H)$$ On the one hand, clearly, P(E|FH) = 1; on the other hand, if the event $\bar{F}H$ occurs, then the first trial would result in a success, but there would be a failure some time during the next $n-1$ trials. However, when this failure occurs, it would wipe out all of the previous successes, and the situation would be exactly as if we started out with a failure. Hence, $$P(E|\bar{F}H) = P(E|\bar{H})$$
Pause !! This is the part where I don't really understand. I agree that when this failure occurs, it would wipe out all of the previous successes. But the situation for E to occur shouldn't be exactly the same as if we started out with a failure because if $F$ is the event that trials $2$ to $n$ are successes, then $\bar{F}$ is the event where not all $2$ to $n$ trials are successes. That being said, the last next $n-1$ trials could be successes. As an example, if the last two of $n-1$ trials is a failure then a success; then the situation for E to occur should be exactly the same as $P(E|H)$. So, can someone explain to me why $P(E|\bar{F}H) = P(E|\bar{H})$ ?

Best Answer

Since we are looking at an infinite number of trials, after removing a finite prefix of trials, we still have an infinite number of trials. Therefore, we can simply ignore this prefix for the probability of $E$ (even the conditions for $E$ would already be fulfilled by the prefix) and therefore $P(E) = P(E \mid B)$ for any event $B$ that restricts the outcomes of the trials only for a finite prefix.

This hopefully answers your question, but the partial solution you gave above seems rather complicated to me. Thankfully, I was able to find a pdf version of the book via Google. There, the author gives a rather complicated probability for $P(E)$ (not included in your question). That surprised me, because intuitively I thought, $P(E) = 1$.

Thinking about that in more detail, I am now convinced that, indeed, $P(E) = 1$: Let $A$ be the event, that we consecutively have $n$ successes and $m$ failures in $n + m$ trials. Clearly, $P(A) ≠ 0$, because $P(A) = p^n ⋅ q^m$ (assuming $0 < p < 1$).

Now let us iterate these $n + m$ trials and let $E'$ be the event that event $A$ occurs in the first block of $n + m$ trials, or in the second block of $n + m$ trials, or in the third block, etc. Since $P(A) ≠ 0$ and therefore $P(\overline{A}) ≠ 1$ it is easy to see that $P(\overline{E'}) = 0$, since we are looking at an infinite number of trials. Therefore we have $P(E') = 1$.

Since $E' ⊆ E$, it follows that also $P(E) = 1$.

For short: In an infinite sequence of trials you are able to find any finite pattern with probability $1$.

Therefore I suspect that there is a mistake in the solution in the book – unless I made a mistake myself or misunderstood the problem.

Related Question