Tutorials › VEE Mathematical Statistics › Decomposing a Negative Binomial Wait Into Geometric Stages

VEE Mathematical Statistics · Geometric and Negative Binomial Models · Tutorial 117 of 880

Decomposing a Negative Binomial Wait Into Geometric Stages

Learn how independent geometric waiting stages combine to produce a negative binomial completion time.

Intermediate 10 min read

What You'll Learn

  • Define each stage wait as the number of trials from one success through the next.
  • Show why stage waits are independent under a fixed-probability Bernoulli model.
  • Derive the negative binomial probability function by counting stage-wait compositions.
  • Distinguish one specified sequence of stage waits from all sequences with the same total.
  • Calculate exact and cumulative completion probabilities using the decomposition.

Why Decompose a Negative Binomial Wait?

Waiting for several successes can be viewed as a sequence of smaller waits: first wait for one success, then wait from that success to the next, and continue until the required number has occurred. Under a fixed-probability independent-trials model, each stage has a geometric distribution, and the stages are independent. Their sum is the total time to complete the required number of successes.

This decomposition gives a direct route from the geometric model to the negative binomial distribution. It also helps distinguish two different questions: the probability of one particular pattern of stage waits, and the probability of any stage-wait pattern with a specified total.

Definition: Suppose trials are independent, each with the same success probability \(p\), where \(0<p<1\), and let \(q=1-p\). For a target of \(r\) successes, define \(G_j\) to be the number of trials from the \((j-1)\)st success through the \(j\)th success, counting the trial of the \(j\)th success. For \(j=1\), \(G_1\) counts trials from the start through the first success. Each \(G_j\) takes values \(1,2,3,\ldots\). The total completion time is \(W_r=G_1+\cdots+G_r\).

A stage wait of \(k\) means that its first \(k-1\) trials are failures and its \(k\)th trial is a success. Thus, for each \(j\), \(P(G_j=k)=q^{k-1}p\). The key point is that the trials belonging to successive stages are separate portions of the original sequence; the probability of any specified collection of stage lengths factors into the product of their geometric probabilities.

Why the Stages Are Independent

The independence can be checked by considering a particular set of positive integers \(k_1,\ldots,k_r\). The event \(G_1=k_1,\ldots,G_r=k_r\) specifies a failure-success pattern in each stage: \(k_j-1\) failures followed by a success. Across all stages, this specifies \(\sum_{j=1}^r(k_j-1)\) failures and \(r\) successes in a particular order.

$$ P(G_1=k_1,\ldots,G_r=k_r) =\prod_{j=1}^{r}q^{k_j-1}p =\prod_{j=1}^{r}P(G_j=k_j). $$

This factorization for every possible positive-integer tuple is the defining joint-probability condition for independence. It relies on the original trials being independent and having the same success probability \(p\). If the success probability changes over time, or if outcomes on different trials are dependent, these stage waits need not be independent geometric variables with one common parameter.

Worked Example: One Specified Sequence of Stage Waits

A hypothetical inspection process has independent trials, each identifying a defect with probability \(p=0.4\). Let \(G_1,G_2,G_3\) be the stage waits until three defects have been identified. Find the probability that the three stage waits are exactly \(2,1,3\), and compare it with the probability that the third defect is identified on trial 6.

Model and method. Each trial is a success with probability \(p=0.4\), so the failure probability is \(q=1-0.4=0.6\). The stage waits are independent geometric variables. The specified stage pattern has two failures before the first success, no failures before the second, and two failures before the third.

Therefore, using the product of the stage probabilities,

$$ P(G_1=2,G_2=1,G_3=3) =(0.6)(0.4)(0.4)(0.6^2)(0.4) =0.6^3(0.4)^3 =0.013824. $$

The total of these stage waits is \(2+1+3=6\), so this is one particular way for the third defect to be identified on trial 6. But it is not the only way. To find the probability of completion on trial 6, count all positive triples summing to 6. There are \(\binom{5}{2}=10\) such triples, and each has three successes and three failures, so each has probability \(0.4^3(0.6)^3=0.013824\). Hence

$$ P(W_3=6)=10(0.013824)=0.13824\approx 0.1382. $$

Check. The completion-time probability is ten times the probability of the one specified stage pattern, as there are ten possible positive triples. The common mistake avoided here is treating one stage pattern as if it represented every way to finish on trial 6.

Deriving the Negative Binomial Probability Function

For the total \(W_r\) to equal \(n\), the stage waits must be positive integers whose sum is \(n\). Equivalently, the first \(n-1\) trials contain exactly \(r-1\) successes, and trial \(n\) is a success. Each eligible sequence has \(r\) successes and \(n-r\) failures, so its probability is \(p^r q^{n-r}\).

It remains to count those sequences. Among the first \(n-1\) trials, choose the locations of the \(r-1\) successes; the remaining locations are failures. There are \(\binom{n-1}{r-1}\) choices. This count is also the number of ways to split \(n\) trials into \(r\) positive stage lengths: place \(r-1\) dividers in the \(n-1\) gaps between consecutive trials. Multiplying the number of possible sequences by the probability of each gives the result.

Theorem: Under independent Bernoulli trials with common success probability \(p\), the total number \(W_r\) of trials needed to obtain \(r\) successes has probability function
$$ P(W_r=n)=\binom{n-1}{r-1}p^r(1-p)^{n-r}, \qquad n=r,r+1,r+2,\ldots. $$

The support begins at \(r\), because at least one trial is required for each success. For \(n<r\), completion is impossible and the probability is zero. The binomial coefficient counts locations for the first \(r-1\) successes among the first \(n-1\) trials; the \(r\)th success must occur on trial \(n\). This is the convention in which the negative binomial variable counts trials through the \(r\)th success, not just failures before it.

1
Specify the model.
Check that trials are independent and each has the same success probability \(p\).
2
Define the stage waits.
Count each wait from the previous success through the next success, including the success trial.
3
Translate the event.
For an exact total \(n\), find positive stage lengths summing to \(n\), or use the equivalent requirement that trial \(n\) is a success.
4
Count and weight.
There are \(\binom{n-1}{r-1}\) eligible patterns, each with probability \(p^r(1-p)^{n-r}\).

Worked Example: Three Successes Completed on Trial 5

In a hypothetical series of independent screenings, each screening detects the target condition with probability \(p=0.6\). Find the probability that the third detection occurs exactly on screening 5. Also explain how many stage-wait patterns contribute.

Model and method. Here \(r=3\), \(n=5\), and \(q=1-0.6=0.4\). Since the third detection must be on trial 5, the first four trials must contain exactly two detections. Choose the two detection locations among those four trials:

$$ \binom{4}{2}=6. $$

Each of these six patterns has three detections overall, including the required detection on trial 5, and two failures. Its probability is

$$ (0.6)^3(0.4)^2 =0.216(0.16) =0.03456. $$

Thus the probability of the event is

$$ P(W_3=5)=6(0.03456)=0.20736\approx 0.2074. $$

The same count comes from the stage decomposition: positive triples summing to 5 are \((1,1,3)\), \((1,2,2)\), \((1,3,1)\), \((2,1,2)\), \((2,2,1)\), and \((3,1,1)\). Each has three successes and two failures, so each contributes \(0.03456\).

Check. Six patterns times \(0.03456\) gives \(0.20736\), which rounds to \(0.2074\) to four decimal places. A frequent error is to use \(0.6^2(0.4)^3\), reversing the success and failure counts; the event contains three successes and only two failures.

Using Stage Probabilities for Cumulative Events

The decomposition also supports cumulative questions. For example, completion by trial \(m\) means that the sum of the stage waits is at most \(m\). One approach is to add the exact-total probabilities for \(n=r,\ldots,m\). Another is to enumerate the positive stage-wait tuples whose sum is at most \(m\). Both methods must include every eligible total and no impossible total below \(r\).

Worked Example: Completing Two Stages by a Deadline

A hypothetical system completes a stage successfully on each independent test with probability \(p=0.25\). Two successful stages are required. Find the probability that both are complete by the end of test 4.

Model and method. Let \(W_2=G_1+G_2\), with independent geometric stage waits, \(p=0.25\), and \(q=0.75\). Completion by test 4 is the disjoint union of \(W_2=2\), \(W_2=3\), and \(W_2=4\).

For \(n=2\),

$$ P(W_2=2)=\binom{1}{1}(0.25)^2(0.75)^0=0.0625. $$

For \(n=3\),

$$ P(W_2=3)=\binom{2}{1}(0.25)^2(0.75)^1 =2(0.0625)(0.75) =0.09375. $$

For \(n=4\),

$$ P(W_2=4)=\binom{3}{1}(0.25)^2(0.75)^2 =3(0.0625)(0.5625) =0.10546875. $$

Add the disjoint exact-completion probabilities:

$$ P(W_2\leq 4) =0.0625+0.09375+0.10546875 =0.26171875 \approx 0.2617. $$

Check. The result includes all possible completion times from the earliest possible time, 2, through the deadline, 4. The common mistake avoided is using only the exact-trial-4 probability when the question asks for completion by trial 4.

What the Decomposition Does—and Does Not—Assume

The geometric-stage representation is useful because it separates a multi-success waiting time into repeated first-success waits. It explains both the negative binomial coefficient and the factor \(p^r(1-p)^{n-r}\): each completion pattern has \(r\) successes and \(n-r\) failures, while the coefficient counts the possible placements of the first \(r-1\) successes.

The model assumptions matter. If each trial has a different success probability, a stage wait is generally not geometric with one common \(p\). If outcomes are dependent, the joint stage probability may not factor into a product. In either case, the negative binomial formula derived here does not automatically apply.

  • Do not confuse the supports. Each stage wait is positive, so \(G_j\in\{1,2,\ldots\}\); the total \(W_r\) starts at \(r\).
  • Count successes and failures before assigning powers. At total \(n\), there are \(r\) successes and \(n-r\) failures.
  • Separate one pattern from all patterns. A specified stage-wait tuple has probability \(p^r q^{n-r}\); the exact-total probability multiplies that by the number of eligible tuples.
  • Read the stopping rule carefully. “On trial \(n\)” is an exact event, whereas “by trial \(n\)” includes all possible completion times up to \(n\).

These checks make the decomposition a practical tool for both derivation and calculation. They are aligned with the SOA VEE Mathematical Statistics syllabus, where identifying the stopping rule and matching a probability function to its support are essential parts of discrete-distribution problems.

Key takeaway: Under independent trials with a constant success probability, the waits between successive successes are independent geometric variables. Their sum is the trial count through the \(r\)th success, with exact-total probability \(\binom{n-1}{r-1}p^r(1-p)^{n-r}\).

Check Your Understanding

For each problem, use the fixed-probability independent-trials model stated in the question. Probabilities are rounded to four decimal places.

  1. A hypothetical calibration succeeds independently on each attempt with probability \(0.3\). Let \(G_1\) and \(G_2\) be the waits for the first and second successes. Find \(P(G_1=2,G_2=3)\). (Answer: 0.0309)
  2. Each independent test has success probability \(0.2\). Find the probability that the fourth success occurs exactly on test 7. (Answer: 0.0164)
  3. Each trial succeeds independently with probability \(0.6\). How many stage-wait patterns correspond to the third success occurring on trial 5, and what is the probability of that event? (Answer: 6 patterns; 0.2074)
  4. A hypothetical diagnostic has independent success probability \(0.5\) per trial. Find the probability of obtaining three successes by the end of trial 5. (Answer: 0.5000)
  5. Two successful verifications are required, and each independent verification trial succeeds with probability \(0.25\). Find the probability that the second success occurs exactly on trial 6. (Answer: 0.0989)
Clinical Biostats