Tutorials › VEE Mathematical Statistics › Translating Negative Binomial Formulas Between Conventions

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

Translating Negative Binomial Formulas Between Conventions

Translate negative binomial formulas and events reliably by tracking the fixed number of successes and the shift between the two counts.

Intermediate 11 min read

What You'll Learn

  • Distinguish the number of trials through the target success from the failures before it.
  • Convert supports and exact event values using the fixed-success count.
  • Rewrite the negative binomial probability mass function in either convention.
  • Translate means and variances without changing the underlying model.
  • Avoid common indexing errors when converting inequalities and probabilities.

Why Negative Binomial Conventions Need Translation

A negative binomial random variable can count either the total number of trials needed to obtain a fixed number of successes or the number of failures before that final success. Both variables describe the same sequence of Bernoulli trials, but their possible values and probability formulas use different indices. Confusing the two can shift an event by the target number of successes.

Assume throughout that trials are independent, each trial has the same success probability \(p\), and \(0<p<1\). Fix a positive integer \(r\), the required number of successes, and write \(q=1-p\). The trials-count variable includes the final success; the failures-count variable does not.

Definition: Let \(T\) be the trial number on which the \(r\)th success occurs, and let \(K\) be the number of failures before that success. Under the same sequence of trials, $$ T=K+r,\qquad K=T-r. $$ Thus \(T\) has support \(r,r+1,r+2,\ldots\), while \(K\) has support \(0,1,2,\ldots\).

The parameter \(r\) is the same in both conventions, as is the success probability \(p\). Only the quantity being counted changes. Some references use the name “negative binomial” for one convention, others for the other, and software parameterizations may differ. Always identify the variable from its support and definition rather than relying on the distribution name alone.

Translating the Probability Mass Function

For \(T=t\), the final trial must be a success. Among the preceding \(t-1\) trials, exactly \(r-1\) must be successes and \(t-r\) must be failures. Therefore

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

For \(K=k\), there are \(r+k-1\) trials before the final success. Exactly \(r-1\) of those are successes and \(k\) are failures. Substituting \(t=k+r\) in the trials-count formula gives

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

The binomial coefficients agree under the substitution because \(\binom{(k+r)-1}{r-1}=\binom{k+r-1}{r-1}\). The powers agree as well: \(t-r=k\). These equalities are the direct reason that the two formulas describe the same probability for corresponding values.

Translation rule: To convert a probability involving \(T\) to one involving \(K\), replace every trial count \(t\) by \(k+r\), or equivalently replace \(k\) by \(t-r\). Keep \(r\), \(p\), and the underlying event fixed.

Worked Example: Convert an Exact Completion Probability

A laboratory test is repeated independently, with probability \(p=0.4\) of a positive result on each test. The process stops at the third positive result. Find the probability that the third positive occurs on test 7, and express the same event using the failures-count variable.

Method. Set \(r=3\), \(p=0.4\), and \(q=1-p=0.6\). The trials-count event is \(T=7\). Since \(K=T-r\), the matching failures-count event is \(K=7-3=4\).

Using trials-count notation, there must be two positive results among the first six tests, followed by a positive result on test 7. Thus

$$ P(T=7)=\binom{6}{2}(0.4)^3(0.6)^4 =15(0.064)(0.1296) =15(0.0082944) =0.124416. $$

Using failures-count notation gives the same calculation:

$$ P(K=4)=\binom{4+3-1}{3-1}(0.4)^3(0.6)^4 =\binom{6}{2}(0.4)^3(0.6)^4 =0.124416. $$

The two expressions agree, as required. The probability is \(0.1244\) to four decimal places. Common mistake avoided: \(T=7\) does not correspond to \(K=7\); it corresponds to four failures because the three positive tests are also included in the total of seven tests.

Translating Means and Variances

The count relationship also translates moments. For a negative binomial model with \(r\) required successes and success probability \(p\), the standard moments are

$$ E[K]=\frac{rq}{p},\qquad \operatorname{Var}(K)=\frac{rq}{p^2}, $$

and, because \(T=K+r\),

$$ E[T]=\frac{r}{p},\qquad \operatorname{Var}(T)=\frac{rq}{p^2}. $$

These are two descriptions of the same model, not two different sources of variability. Adding the fixed number \(r\) changes the mean by \(r\), but does not change the variance.

1
Start with the variable relationship.
Write \(T=K+r\). The shift is the fixed number of successes required, not a random quantity.
2
Translate the mean.
Linearity of expectation gives \(E[T]=E[K+r]=E[K]+r=rq/p+r=r(q+p)/p=r/p\), since \(q+p=1\).
3
Translate the variance.
Adding a constant does not change variance: \(\operatorname{Var}(T)=\operatorname{Var}(K+r)=\operatorname{Var}(K)=rq/p^2\).

The equal variances are a useful check on a conversion. A proposed trials-count mean smaller than \(r\) is impossible, because at least \(r\) trials are needed. In contrast, the failures-count mean can be less than \(r\), since it counts only failures.

Worked Example: Translate Moments From Failures to Trials

A claims-audit process independently flags each reviewed file with probability \(p=0.25\). The audit stops when four files have been flagged. Find the mean and variance of the number of failures before stopping, then convert the mean to the expected total number of files reviewed.

Method. Here \(r=4\), \(p=0.25\), and \(q=0.75\). The failures-count mean is

$$ E[K]=\frac{rq}{p} =\frac{4(0.75)}{0.25} =\frac{3}{0.25} =12. $$

Its variance is

$$ \operatorname{Var}(K)=\frac{rq}{p^2} =\frac{4(0.75)}{(0.25)^2} =\frac{3}{0.0625} =48. $$

The total number of files is \(T=K+r\), so

$$ E[T]=E[K]+r=12+4=16,\qquad \operatorname{Var}(T)=\operatorname{Var}(K)=48. $$

The expected total is also \(r/p=4/0.25=16\), which checks the translation. The mean number of failures is 12 files, while the mean number of reviewed files is 16; the variance is 48 under either convention. Common mistake avoided: reporting 12 as the expected total confuses failures with all trials.

Translating Events, Not Just Formulas

An event must be shifted consistently along with the variable. For any integer \(t\), the relationship \(T=K+r\) gives

$$ \{T=t\}=\{K=t-r\},\qquad \{T\le t\}=\{K\le t-r\},\qquad \{T\ge t\}=\{K\ge t-r\}. $$

The inequalities keep their direction because the conversion adds or subtracts a constant. Their bounds change, however. For example, “no more than 8 trials” when \(r=3\) means \(K\le 5\), not \(K\le 8\). Any translated bound outside the support must also be interpreted carefully: \(K\) cannot be negative, and \(T\) cannot be less than \(r\).

Worked Example: Translate a Cumulative Event

A sensor independently records a successful calibration with probability \(p=0.2\) on each attempt. Calibration ends at the second success. Find the probability that calibration is complete by attempt 4, first using trials-count notation and then failures-count notation.

Method. Let \(r=2\), \(p=0.2\), and \(q=0.8\). The trials-count event \(T\le4\) is equivalent to \(K\le4-2=2\). Thus sum the masses for \(K=0,1,2\), or equivalently for \(T=2,3,4\).

In failures-count notation,

$$ \begin{aligned} P(K\le2) &=P(K=0)+P(K=1)+P(K=2)\\ &=\binom{1}{1}(0.2)^2(0.8)^0 +\binom{2}{1}(0.2)^2(0.8)^1 +\binom{3}{1}(0.2)^2(0.8)^2\\ &=0.04+2(0.04)(0.8)+3(0.04)(0.64)\\ &=0.04+0.064+0.0768\\ &=0.1808. \end{aligned} $$

The corresponding trials-count terms are \(P(T=2)=0.04\), \(P(T=3)=0.064\), and \(P(T=4)=0.0768\); their sum is also \(0.1808\). The answer is \(0.1808\) to four decimal places. Common mistake avoided: translating \(T\le4\) as \(K\le4\) would include events requiring more than four attempts. The correct upper bound is \(4-r=2\).

Common Convention Errors

SituationCorrect translationTypical error
Exact completion on trial \(t\)\(K=t-r\)Using \(K=t\)
At most \(t\) trials\(K\le t-r\)Keeping the same upper bound
Mean number of trials\(r/p\)Using the failures mean \(rq/p\)
Variance in either convention\(rq/p^2\)Adding \(r\) to the variance

Before calculating, write down what the random variable counts and its support. Then state the event in that variable’s own words. This simple check catches the most consequential trap: a formula may look familiar while its index belongs to the other convention.

Key takeaway: For a fixed target of \(r\) successes, the trials count and failures count differ by exactly \(r\): \(T=K+r\). Translate exact values and event bounds with that shift, translate means by adding or subtracting \(r\), and leave the variance unchanged.

Check Your Understanding

For each problem, identify the convention before evaluating the requested probability or moment.

  1. A process stops at the third success, with success probability \(0.5\) on each independent trial. Translate “completion on trial 8” into a failures-count event and find its probability. (Answer: \(K=5\); \(P(K=5)=0.0820\).)
  2. A device succeeds independently on each attempt with probability \(0.2\), and testing stops at the second success. Find the probability that exactly three failures occur before stopping, writing the equivalent trials-count event. (Answer: \(T=5\); probability \(0.0819\).)
  3. A review ends after four successes, with success probability \(0.4\) per independent review. Find the expected number of failures, expected total reviews, and variance in either convention. (Answer: \(E[K]=6\), \(E[T]=10\), and variance \(15\).)
  4. With \(r=3\) and \(p=0.25\), translate “the third success occurs by trial 3” into a failures-count event and find its probability. (Answer: \(K\le0\), so the probability is \(0.0156\).)
  5. A sequence has independent trials with success probability \(0.5\) and stops at the second success. Find the probability that the stopping trial is exactly 6, using the failures-count formula. (Answer: \(K=4\); probability \(0.0781\).)
Clinical Biostats