Why the Count Convention Matters
The negative-binomial distribution is used with more than one counting convention. A random variable may count failures before a specified number of successes, or it may count all trials up to and including the final success. These variables differ by a fixed shift. Stating the convention is essential when combining counts, interpreting support, or calculating probabilities.
This tutorial uses the failures-before-successes convention. Under it, independent negative-binomial counts with the same success probability add by summing their shape parameters. The result follows naturally from viewing each count as a sum of geometric failure counts, and it can also be verified directly with probability generating functions.
The parameter \(r\) is called the shape here: it is the number of successes to be observed, and is a positive integer. The parameter \(p\) is the success probability on each trial. Trials are assumed independent and have the same success probability. In particular, the definition does not mean that \(X\) counts \(r\) failures.
From Geometric Counts to the Negative-Binomial Mass Function
Imagine recording the failures before the first success, then the failures between the first and second successes, and continuing through the failures before the \(r\)th success. Each interval has a geometric failure count. Under independent Bernoulli trials, these \(r\) counts are independent and each has the geometric distribution just defined.
To see the formula, fix a total of \(k\) failures. A possible allocation among the \(r\) intervals is a vector \((g_1,\ldots,g_r)\) of nonnegative integers with \(g_1+\cdots+g_r=k\). For any one such vector, independence gives $$ P(G_1=g_1,\ldots,G_r=g_r) =\prod_{j=1}^r p q^{g_j} =p^r q^k. $$ The number of such vectors is \(\binom{k+r-1}{r-1}\), by the stars-and-bars count of ways to distribute \(k\) identical failures among \(r\) intervals. Adding the equal probabilities over all these allocations gives the stated mass function. This also explains why the exponent of \(q\) is \(k\), while the exponent of \(p\) is \(r\): the observed sequence contains \(k\) failures and exactly \(r\) successes.
Worked Example: One Geometric Failure Count
A geometric failure count is the special case \(r=1\). If each trial succeeds with probability \(p=0.3\), then \(q=0.7\), and the number \(G\) of failures before the first success has $$ P(G=k)=0.3(0.7)^k,\qquad k=0,1,2,\ldots. $$
For example, zero failures means an immediate success, so \(P(G=0)=0.3\). Exactly two failures followed by a success has probability $$ P(G=2)=0.3(0.7)^2=0.3(0.49)=0.147. $$ The formula for the sum of \(r\) geometric counts gives the same result when \(r=1\), since \(\binom{2}{0}=1\). The support begins at zero because the required success can occur on the first trial.
The Additivity Theorem
The key condition is that every count uses the same success probability. The shape parameters may differ; they record how many successes are required in the corresponding count.
A probability generating function gives a concise proof. For a nonnegative integer-valued random variable \(X\), its probability generating function is \(G_X(z)=E[z^X]\) for \(|z|\leq 1\), where at \(z=0\) the value is understood by the usual power-series convention. Independence makes the generating function of a sum the product of the individual generating functions.
The last equality is the power-series expansion of \((1-qz)^{-r}\). Its coefficient of \(z^k\) is \(\binom{k+r-1}{r-1}q^k\), as can also be seen by multiplying \(r\) geometric series: a coefficient of degree \(k\) counts the nonnegative integer \(r\)-tuples summing to \(k\).
For \(X_i\sim\operatorname{NB}(r_i,p)\), \(G_{X_i}(z)=\left(\frac{p}{1-qz}\right)^{r_i}\), with \(q=1-p\).
For \(S=X_1+\cdots+X_m\), \(G_S(z)=\prod_{i=1}^m G_{X_i}(z)\).
All factors have the same \(p/(1-qz)\), so \(G_S(z)=\left(\frac{p}{1-qz}\right)^{\sum_i r_i}\).
This is the generating function of \(\operatorname{NB}(\sum_i r_i,p)\). Equality of the power-series coefficients gives equality of the probability mass functions.
For completeness, the product step follows directly from independence: for \(|z|<1\), \(z^S=\prod_i z^{X_i}\), and therefore \(E[z^S]=\prod_i E[z^{X_i}]\). The resulting power series has the negative-binomial coefficients with shape \(R=\sum_i r_i\), namely \(\binom{k+R-1}{R-1}p^R q^k\). Since probability generating functions are power series whose coefficients are the probabilities, equality of their coefficients establishes the theorem. \(\square\)
The same conclusion has a direct counting interpretation. Each \(X_i\) can be generated by accumulating geometric failure counts until \(r_i\) successes have occurred. Concatenating the independent trial sequences gives a sequence of Bernoulli trials with success probability \(p\); across all the sequences, the total number of required successes is \(R=\sum_i r_i\). The combined failure count therefore follows the definition of \(\operatorname{NB}(R,p)\). The generating-function proof makes the distributional calculation explicit, while this interpretation clarifies why the shape parameters add.
Worked Example: Adding Counts with Shapes Two and Three
Let \(X_1\sim\operatorname{NB}(2,0.6)\) and \(X_2\sim\operatorname{NB}(3,0.6)\) be independent. Both variables count failures before the indicated number of successes. Since the common success probability is \(0.6\), their sum \(S=X_1+X_2\) has shape \(2+3=5\): $$ S\sim\operatorname{NB}(5,0.6). $$
For instance, the probability of no failures in total is $$ P(S=0)=\binom{0+5-1}{5-1}(0.6)^5(0.4)^0 =1(0.07776)(1)=0.07776. $$ For exactly two failures, the number of allocations of the two failures among five success intervals is \(\binom{6}{4}=15\). Hence $$ P(S=2)=\binom{6}{4}(0.6)^5(0.4)^2 =15(0.07776)(0.16)=0.186624. $$ The probability is less than one, and the computation uses five successes and two failures, as required by the convention.
Worked Example: Three Independent Counts
Suppose \(X_1,X_2,X_3\) are independent with distributions \(\operatorname{NB}(1,0.8)\), \(\operatorname{NB}(2,0.8)\), and \(\operatorname{NB}(3,0.8)\). Each uses \(q=0.2\). The sum \(S=X_1+X_2+X_3\) has shape \(1+2+3=6\), so $$ S\sim\operatorname{NB}(6,0.8). $$
To calculate the probability of exactly one failure in the total count, substitute \(k=1\) and \(r=6\): $$ P(S=1)=\binom{1+6-1}{6-1}(0.8)^6(0.2) =6(0.262144)(0.2)=0.3145728. $$ There are six possible locations for the single failure among the six success intervals; each allocation has probability \((0.8)^6(0.2)\). Thus the coefficient 6 has a direct interpretation as well as arising from the mass-function formula.
Changing to the Trials-Count Convention
If \(X\sim\operatorname{NB}(r,p)\) counts failures before the \(r\)th success, then the total number \(T\) of trials through and including that success is $$ T=X+r. $$ The shift is by \(r\), not by one, because the completed sequence contains \(r\) successes in addition to the \(X\) failures.
Worked Example: Translating a Trials Count
Suppose \(X\sim\operatorname{NB}(3,0.5)\) counts failures before the third success. The total number of trials is \(T=X+3\), so \(T\) takes values \(3,4,5,\ldots\). The event that the third success occurs on trial 5 is exactly \(X=2\), with two failures among the first four trials followed by a success.
Its probability is $$ P(T=5)=P(X=2) =\binom{2+3-1}{3-1}(0.5)^3(0.5)^2 =\binom{4}{2}(0.5)^5 =6\left(\frac{1}{32}\right) =\frac{3}{16}. $$ For independent counts \(T_i=X_i+r_i\) with common \(p\), the sum of trials counts is \(\sum_i T_i=\sum_i X_i+\sum_i r_i\). Thus the failure counts add with shape \(\sum_i r_i\), while the trial totals retain the corresponding fixed shifts.
Common Pitfalls and Why the Condition Matters
- Mixing the conventions. Under the convention used here, \(\operatorname{NB}(r,p)\) can equal zero. A trials count through the \(r\)th success cannot be smaller than \(r\); it is the failure count plus \(r\).
- Adding the wrong parameter. Add the shapes \(r_i\), not the success probabilities. The success probability remains the shared \(p\).
- Ignoring independence. The product rule for generating functions of a sum requires independence. Without it, the marginal distributions alone do not determine the distribution of the sum.
- Applying the rule to different success probabilities. If the \(p_i\) differ, the generating functions have different factors \(p_i/(1-(1-p_i)z)\); they do not combine into the negative-binomial form in this theorem.
The shared-\(p\) requirement is structural, not cosmetic. For example, if \(X_1\sim\operatorname{NB}(1,0.5)\) and \(X_2\sim\operatorname{NB}(1,0.75)\) are independent, then $$ P(X_1+X_2=0)=P(X_1=0)P(X_2=0)=(0.5)(0.75)=0.375. $$ A negative-binomial law with shape two would have zero-count probability \(p^2\). Matching \(p^2=0.375\) would require a particular value of \(p\), but matching the probability of one failure as well is not guaranteed; the common-\(p\) theorem makes no claim in this setting. The sum should not be declared negative-binomial merely because both summands are negative-binomial.
Check Your Understanding
Use the failures-before-successes convention unless a question says otherwise.
- For \(X\sim\operatorname{NB}(4,0.2)\), what does \(X\) count, and what is its smallest possible value?
- Independent \(X_1\sim\operatorname{NB}(2,0.7)\) and \(X_2\sim\operatorname{NB}(5,0.7)\) are added. State the distribution of their sum and identify the condition that permits the conclusion.
- For \(S\sim\operatorname{NB}(4,0.6)\), calculate \(P(S=1)\) using the mass function.
- If \(X\sim\operatorname{NB}(r,p)\) is a failure count, express the total trials through the \(r\)th success in terms of \(X\) and \(r\).
- Why does the additivity theorem not apply directly to independent negative-binomial variables with different success probabilities?