Tutorials › Statistical Theory I - Probability and Distribution Theory › Negative-Binomial Parameterizations for Failures and Trials

Geometric and Count Distributions · Tutorial 130 of 994

Negative-Binomial Parameterizations for Failures and Trials

Translate between the two common negative-binomial random variables and calculate their probabilities, supports, and means without confusing failures with total trials.

Beginner 9 min read

What You'll Learn

  • Define the failure-count and trial-number versions of the negative-binomial distribution
  • Translate values, supports, and events between the two parameterizations
  • Write the probability mass function in either convention
  • Calculate and compare the means of both random variables
  • Recognize common errors involving the shift by the target number of successes

Why There Are Two Negative-Binomial Counts

A sequence of Bernoulli trials can be counted in two natural ways: one can count the failures before a specified success, or count the trial on which that success occurs. These describe the same sequence, but the random variables have different supports and their numerical values differ by a fixed shift. Keeping the two conventions distinct is essential when interpreting a probability or reporting a mean.

Assume throughout that trials are independent, each has the same success probability \(p\), and \(0<p<1\). Let \(q=1-p\), and let \(r\) be a fixed positive integer. The target is the \(r\)th success.

Definition: Let \(K\) be the number of failures before the \(r\)th success, and let \(T\) be the trial number on which the \(r\)th success occurs. Both are negative-binomial random variables under common conventions. Their exact relationship is \(T=K+r\).

The relationship follows because the first \(r\) successes require at least \(r\) trials, while every additional trial before the target success is a failure. Thus \(K\) can be zero, but \(T\) cannot be smaller than \(r\).

Supports and Probability Formulas

For the failure-count convention, \(K\) takes values \(k=0,1,2,\ldots\). For \(K=k\), the final trial must be a success, and among the preceding \(k+r-1\) trials there must be exactly \(r-1\) successes and \(k\) failures. Therefore the probability mass function is

$$ P(K=k)=\binom{k+r-1}{r-1}p^r q^k,\qquad k=0,1,2,\ldots. $$

For the trial-number convention, \(T\) takes values \(n=r,r+1,r+2,\ldots\). The last of the \(n\) trials must be a success, and the first \(n-1\) trials must contain \(r-1\) successes. Hence

$$ P(T=n)=\binom{n-1}{r-1}p^r q^{n-r},\qquad n=r,r+1,r+2,\ldots. $$

These formulas are the same probability written with different indices. Substitute \(k=n-r\) into the formula for \(K\):

$$ \binom{k+r-1}{r-1}p^r q^k = \binom{n-1}{r-1}p^r q^{n-r}. $$

The support changes along with the index: \(k\geq 0\) corresponds to \(n=k+r\geq r\). A value in one convention cannot be used as if it were already a value in the other.

ConventionRandom variableSupportProbability at a support value
Failures before the \(r\)th success\(K\)\(k=0,1,2,\ldots\)\(\binom{k+r-1}{r-1}p^r q^k\)
Trial number of the \(r\)th success\(T\)\(n=r,r+1,\ldots\)\(\binom{n-1}{r-1}p^r q^{n-r}\)

Worked Example: Translating a Probability Between Conventions

Suppose \(r=3\) and \(p=0.4\), so \(q=0.6\). Find the probability that there are exactly five failures before the third success, and express the same event using the trial-number convention.

Five failures before the third success means \(K=5\). The third success must therefore occur on trial \(5+3=8\), so the same event is \(T=8\).

Using the failure-count formula,

$$ P(K=5)=\binom{5+3-1}{3-1}(0.4)^3(0.6)^5 =\binom{7}{2}(0.064)(0.07776) =21(0.00497664) =0.10450944. $$

Using the trial-number formula gives the same result:

$$ P(T=8)=\binom{8-1}{3-1}(0.4)^3(0.6)^{8-3} =\binom{7}{2}(0.064)(0.07776) =0.10450944. $$

The matching probabilities verify the translation: \(K=5\) and \(T=8\) are two descriptions of the same event.

Translating Events, Not Just Single Values

The mapping \(T=K+r\) applies to any event about one of these counts. For example, the event \(K\leq a\), for a nonnegative integer \(a\), is equivalent to \(T\leq a+r\). Similarly, \(K\geq a\) is equivalent to \(T\geq a+r\). The probability does not change when the event is translated; only the numerical cutoff changes.

Worked Example: Translating a Cumulative Event

A process has success probability \(p=0.25\), and the goal is the second success, so \(r=2\). Find the probability that the second success occurs by trial 4.

The event \(T\leq 4\) is equivalent to \(K\leq 4-2=2\). The possible values are \(K=0,1,2\), so

$$ P(T\leq 4)=P(K\leq 2) =\sum_{k=0}^{2}\binom{k+1}{1}(0.25)^2(0.75)^k. $$

Evaluating each term,

$$ P(T\leq 4) =(0.0625)(1+2(0.75)+3(0.75)^2) =0.0625(1+1.5+1.6875) =0.26171875. $$

Equivalently, sum the trial-number probabilities for \(T=2,3,4\). Their failure counts are \(0,1,2\), respectively, so this is exactly the same sum. The event has been shifted by two because the target is the second success.

Means Under the Two Conventions

The expected number of trials includes the \(r\) successful trials, whereas the failure count does not. Their means are

$$ E[K]=\frac{rq}{p}=\frac{r(1-p)}{p}, \qquad E[T]=\frac{r}{p}. $$

The relationship between the means follows directly from \(T=K+r\). The failure-count mean can also be derived from its probability mass function; doing so makes clear which convention the formula refers to.

Theorem: If \(K\) counts the failures before the \(r\)th success in independent Bernoulli trials with success probability \(0<p<1\), then \(E[K]=rq/p\). For \(T=K+r\), the mean is \(E[T]=r/p\).

Proof. Using the probability mass function of \(K\), and noting that the \(k=0\) term contributes zero,

$$ E[K]=\sum_{k=1}^{\infty} k\binom{k+r-1}{r-1}p^r q^k. $$

For \(k\geq 1\), the binomial coefficients satisfy

$$ k\binom{k+r-1}{r-1}=r\binom{k+r-1}{r}. $$

Set \(j=k-1\). Substitution gives

$$ E[K] =rp^r q\sum_{j=0}^{\infty}\binom{j+r}{r}q^j. $$

For \(0\leq q<1\), the binomial series for a positive integer \(r\) is

$$ \sum_{j=0}^{\infty}\binom{j+r}{r}q^j=(1-q)^{-(r+1)}. $$

This identity follows by differentiating the geometric series \(r\) times within its radius of convergence and simplifying. Since \(1-q=p\), it follows that

$$ E[K]=rp^r q p^{-(r+1)}=\frac{rq}{p}. $$

Finally, expectation is linear and \(T=K+r\), so

$$ E[T]=E[K+r]=E[K]+r=\frac{rq}{p}+r =\frac{r(q+p)}{p}=\frac{r}{p}. $$

The series converges because \(0<q<1\), so the expectation calculation is finite. \(\square\)

Worked Example: Comparing the Two Means

Let \(r=2\) and \(p=0.25\). The mean number of failures before the second success is

$$ E[K]=\frac{2(1-0.25)}{0.25} =\frac{2(0.75)}{0.25} =\frac{1.5}{0.25} =6. $$

The mean trial number of the second success is

$$ E[T]=\frac{2}{0.25}=8. $$

The difference is \(8-6=2=r\), as required by \(T=K+2\). These are averages, not values that must occur in a particular run: the number of failures is an integer, even though its mean is 6 in this example.

Common Mistakes and Why the Distinction Matters

The most frequent error is to use the probability formula for one convention while inserting a value from the other. For instance, if \(r=3\) and the third success occurs on trial 8, the number of failures is \(8-3=5\), not 8. The correct probability can be written as either \(P(T=8)\) or \(P(K=5)\), but not as \(P(K=8)\).

  • Starting the failure count at \(r\). The support of \(K\) begins at zero: the first \(r\) trials could all be successes. The trial number \(T\), by contrast, begins at \(r\).
  • Forgetting the final success. In the trial-number formula, the exponent of \(q\) is \(n-r\), the number of failures, not \(n\). The last trial is a success.
  • Using the wrong mean. \(r(1-p)/p\) is the mean number of failures; \(r/p\) is the mean trial number. Their difference is exactly \(r\).

When reading a negative-binomial model, identify what the random variable counts before interpreting its support, probability, or mean. The parameter pair \((r,p)\) alone does not resolve the convention: the variable definition does. Once that definition is clear, the conversion \(T=K+r\) translates values and events consistently.

Check Your Understanding

Use \(q=1-p\) and the relationship between the two counts to answer these questions.

  1. If \(r=4\) and the fourth success occurs on trial 9, how many failures occurred before it?
  2. State the support of the failure-count variable \(K\) and the trial-number variable \(T\).
  3. Write the probability that the \(r\)th success occurs on trial \(n\), including the allowable values of \(n\).
  4. For \(r=3\) and \(p=0.5\), calculate \(E[K]\) and \(E[T]\). Check their difference.
  5. Explain why the event \(K\leq 5\) is equivalent to \(T\leq 5+r\).