Suppose a task needs three successful attempts, each attempt succeeds with probability independently of the others, and you stop as soon as the third success arrives. Now the number of successes is fixed and the number of attempts is random, the reverse of the binomial setup. How likely is it that exactly five attempts are needed, how many should you expect, and how likely is it that you finish within five? This lesson answers each question by fixing the final success, splitting the wait into geometric pieces and rewriting a deadline as a binomial count.
Key terms
Stopping rule
Definition In a sequence of trials, a stopping rule decides after each trial whether to stop, using only the outcomes observed so far. A binomial experiment stops after a fixed number of trials whatever the outcomes, so the number of trials is fixed and the number of successes is random. The negative binomial experiment stops as soon as the number of successes reaches a fixed positive integer , so the number of successes is fixed at and the number of trials is random.
In plain words A stopping rule is the instruction for when the experiment ends. The binomial fixes the trials and counts successes, and the negative binomial fixes the successes and counts trials. The rule also decides which sequences can appear as a complete record.
Example Take and write S for a success and F for a failure. The record S, F, S, S ends after trial , because the third success has just occurred, and the recorded count is . The sequence S, S, S, F, F is a possible outcome of five binomial trials, but it is not a complete record under this stopping rule, because the experiment ends after the third trial.
Negative binomial distribution
Definition Let be a positive integer and . Trials are independent, each a success with probability , and the waiting time for the th success, , is the number of trials up to and including the th success. The event happens exactly when trial is a success and the first trials contain exactly successes. Choosing the positions of those earlier successes gives
for every integer , and for every other real . This is the negative binomial distribution with parameters and in the trial-count convention, and its support is when . For the coefficient is and the formula is the geometric PMF. When the formula, with the usual convention , gives with certainty, so the support is . The value is excluded, because then the target is reached with probability .
In plain words The last trial is forced to be a success. All the freedom lies in where the other successes fall among the earlier trials, and every such arrangement has successes and failures, so every arrangement has the same probability.
Example With and , the event needs a success on trial and exactly two successes among trials to . There are arrangements, each with probability , so
Using in place of gives , the binomial probability of exactly three successes in five trials. That count also includes sequences such as S, S, S, F, F, in which the third success comes before trial .
Failure-count form
Definition With the same and , let be the number of failures before the th success. Then , its support is when and when , and substituting in the trial-count formula gives
for every integer . Some references define the negative binomial distribution by this form. Shifting by the constant lowers the mean by and leaves the variance unchanged, so quote a probability or a mean together with its convention.
In plain words Both forms describe the same experiment. The trial count includes the successes and the failure count leaves them out, so the two records always differ by exactly .
Example With and , five trials in total means two failures, so , the same number as . The mean failure count is while the mean trial count is , and both counts have variance . A reported mean of and a reported mean of can describe the same model.
Sum of geometric waiting times
Definition Let be the number of trials up to and including the first success, and for let be the number of further trials after the th success up to and including the th. Then . For positive integers , the event that for every fixes the outcome of each of the first trials, so with its probability is
This product of geometric masses shows that are independent and each is geometric with parameter . Expectations add, and variances of independent variables add, so
The failure count has and the same variance.
In plain words Waiting for the th success is waits for a first success, one after another. Each block starts fresh because the trials are independent with one constant . For and the total wait does not forget its past the way a geometric wait does, since what remains depends on how many successes have already occurred. Once that number is known, the rest of the wait is a fresh negative binomial wait for the successes still needed.
Example With and , each block has mean and variance . So and , a standard deviation of about trials. A mean that is not a whole number is still an average of whole-number waits. If the first two trials are both successes, one success is still needed and the expected remaining wait is trials. If both are failures, three are still needed and the expected remaining wait is trials.
Deadline probability as a binomial tail
Definition Let be the waiting time for the th success, and for a positive integer let be the number of successes among the first trials of the same sequence, so . The th success has occurred by trial exactly when the first trials contain at least successes. Hence
For the sum is empty and the probability is . The model is the whole sequence of independent trials, and stopping at the th success only means that later trials are not needed. Both events depend only on the first trials. The complement gives .
In plain words A deadline question about a waiting time is a counting question about a fixed number of trials. Finishing by trial and having at least successes in the first trials are one event described in two ways.
Example With , and , finishing by trial means at least three successes in five trials. The binomial probabilities of three, four and five successes are , and , so
Adding negative binomial masses gives the same value, since . The deadline probability is larger than because it also includes finishing on trial or trial .
Check yourself
- Independent trials each succeed with probability , and counts the trials up to and including the second success. Find .
Show the answer
Trial must be a success, and exactly one of trials to must succeed. There are arrangements, S, F, F, S and F, S, F, S and F, F, S, S, each with probability . So .
- In the same model, find , and the probability of finishing by trial .
Show the answer
With and , the mean is and the variance is
Finishing by trial means at least two successes in three trials. The binomial probabilities of two and three successes are and , so . As a check, and also add to .
- A student computes in the same model as . What does this number count, and why is it too large?
Show the answer
The number is the binomial probability of exactly two successes in four fixed trials. Of the six sequences with two successes, three end with a success and have . The other three, S, S, F, F and S, F, S, F and F, S, S, F, end with a failure, so their second success came on trial or and the experiment would already have stopped. Removing them leaves . The stopping rule requires the last trial to be a success, so only the earlier success positions are chosen, with rather than .