Probability of k Successes Before r Failures in Bernoulli Trials

probabilityrandom variables

Problem

Find the probability of having $k$ successes before $r$ failures in a sequence of independent Bernoulli trials with $p$ being the probability of success.

I thought of using the Binomial distribution, the random variable $X$ is the number of successes, only this time I am interested not only in the number of successes but also in which order they are obtained. If the number of trials was $n$, then obviously I suppose $r+k \leq n$, I don't quite get the problem: the $k$ successes have to be one after the other, I mean, have to be $k$ successive successes?. I would like some explanation on the problem and suggestions of how could I calculate the probability I am being asked.

Best Answer

Interpretation A

What is the probability of observing $k$ consecutive successes followed by $r$ consecutive failures?

It's a rather simple solution: The probability of succeeding is $p$, thus succeeding $k$ times independently has probability $p^k$. Same for failing $r$ times independently: $(1-p)^r$.
In total we have $$P = p^k (1-k)^r$$


Interpretation B

What is the probability that exactly $k$ successes occur before the $r$-th failure?

We need to put these $k$ successes in order with $r-1$ failures and obtain an additional failure (the $r$-th) giving $$P = \binom{k+r-1}k p^k (1-p)^{r-1} \cdot (1-p) = \binom{k+r-1}k p^k (1-p)^r$$


Interpretation C

What is the probability that (at least) $k$ successes are observed before the $r$-th failure occurs?

This is requesting at most $r-1$ failures before $k$ successes (see @Thursdays comment). In this case we have $$P = \sum_{j=0}^{r-1} \binom{k-1+j}{k-1} p^k (1-p)^j$$ as a solution

Thanks to @DilipSarvate for the interpretation titles
Thanks to @BrianMScott and @robjohn for spotting an error in the formula for interpretation C (after all this time)

Related Question