Tutorials › Statistical Theory I - Probability and Distribution Theory › Negative-Binomial Counts Before a Fixed Success

Geometric and Count Distributions · Tutorial 128 of 994

Negative-Binomial Counts Before a Fixed Success

Learn how to define a negative-binomial count from repeated Bernoulli trials and read its success target, success probability, and support.

Beginner 9 min read

What You'll Learn

  • Define the count of failures observed before the rth success.
  • Identify the roles of r and p in the repeated-trial model.
  • Determine the possible values of the count, including the boundary case p = 1.
  • Translate between the failure count and the trial number of the rth success.
  • Avoid confusing failures counted with the total number of trials.

Introduction

A binomial count asks how many successes occur in a fixed number of trials. A negative-binomial count reverses which quantity is fixed: the process continues until a specified number of successes has occurred, and the random variable records how many failures accumulated along the way. This distinction is useful whenever observation naturally stops at a target event, such as the third successful assay or the fifth completed sale.

The key is to state exactly what is counted. In this tutorial, the negative-binomial variable counts failures before the \(r\)th success. It does not count the success trials, and it does not count all trials through the stopping point. Those related quantities can be translated into one another, but they are not the same variable.

The Repeated-Trial Model and Definition

Suppose trials are performed sequentially. On each trial there are two outcomes, called success and failure. Assume the trials are independent and that each trial has the same success probability \(p\), where \(0<p\leq 1\). Let \(r\) be a fixed positive integer. The process stops as soon as the \(r\)th success occurs.

Definition: Let \(X\) be the number of failures observed before the \(r\)th success in a sequence of independent Bernoulli trials, each with success probability \(p\), where \(r\in\{1,2,3,\ldots\}\) and \(0<p\leq1\). Then \(X\) is a negative-binomial count under the failures-before-the-\(r\)th-success convention. The parameter \(r\) is the required number of successes; \(p\) is the success probability on each trial.

The definition specifies both the experiment and the quantity recorded. The independent, constant-probability trial assumption matters: it describes a repeated Bernoulli model, not merely any sequence in which outcomes happen to be labelled success or failure. If \(p=0\), the target success never occurs, so there is no finite count before the \(r\)th success. That is why \(p=0\) is excluded.

The process has a random stopping time: its total number of trials is not fixed in advance. The number of successes at the stopping point, however, is fixed at exactly \(r\). The count \(X\) records only failures. If \(T_r\) denotes the trial number on which the \(r\)th success occurs, then every stopped sequence contains \(r\) successes and \(X\) failures, so its total length is \(r+X\).

Result: Whenever the \(r\)th success occurs after a finite number of trials, the total trial count and the failure count satisfy \(T_r=r+X\), or equivalently \(X=T_r-r\).

This identity is a count of outcomes, not a probability calculation. It explains why a reported total number of trials must be reduced by \(r\) to obtain the variable defined here. For example, if the second success occurs on trial 5, exactly two of those five trials were successes, so the remaining three were failures.

Support and What the Parameters Mean

The support describes the values a random variable can take with positive probability. Since failures cannot be counted in negative amounts, \(X\) cannot be negative. There is also no fixed upper limit: one can have any finite number of failures before eventually reaching the \(r\)th success, provided \(0<p<1\).

Theorem: For \(r\) a positive integer and \(0<p<1\), the support of the failures-before-the-\(r\)th-success count is \(\{0,1,2,\ldots\}\). If \(p=1\), every trial is a success and the support is the singleton \(\{0\}\).

To verify the theorem, first observe that \(X\) is a count of failures, so it can only take nonnegative integer values. For any integer \(k\geq0\), consider a sequence with \(r-1\) successes and \(k\) failures in its first \(r+k-1\) trials, followed by a success on trial \(r+k\). This sequence has exactly \(r\) successes by its last trial, and the last success is the \(r\)th one. There are exactly \(k\) failures before it. When \(0<p<1\), each specified success has probability \(p>0\) and each specified failure has probability \(1-p>0\). Independence therefore gives this particular finite sequence positive probability. Thus every \(k\geq0\) is attainable with positive probability. When \(p=1\), every trial succeeds, so the \(r\)th success occurs on trial \(r\) and there are zero failures. This proves the support statement. \(\square\)

The parameter \(r\) fixes the success target, not the number of trials. Raising \(r\) means the process must continue until more successes have occurred. The parameter \(p\) describes the success chance on each trial, not the probability that the whole experiment eventually has a particular count; calculating such probabilities is a separate step. In particular, a small \(p\) makes a failure more likely on any one trial, while \(r\) specifies how many successes must nevertheless be obtained before stopping.

Worked Examples

Worked Example: Counting Failures in an Observed Sequence

A testing process stops at the second successful test. The observed outcomes through stopping are failure, success, failure, failure, success. Find the failure count \(X\) and the stopping trial \(T_2\).

There are two successes in the sequence, and the final outcome is the second success. The failures occur on trials 1, 3, and 4, so there are three failures. The sequence has five trials in total. Thus \(X=3\) and \(T_2=5\).

The count identity checks the answer: \(T_2-r=5-2=3=X\). The successes account for two trials and the failures account for three, for a total of five. In particular, this sequence contains three failures, not two.

Worked Example: Converting a Stopping Trial to a Failure Count

A sales representative continues making calls until the fourth sale. Suppose the fourth sale occurs on call 10. Under a model in which calls are independent and each has the same probability \(p\) of producing a sale, what value did the failure-count variable take?

Here the required number of successes is \(r=4\), and the stopping trial is \(T_4=10\). Exactly four calls produced sales by the stopping point. Every other call before or at that point was a failure, so

$$ X=T_4-r=10-4=6. $$

The count is six unsuccessful calls before the fourth sale. It is not 10: that number counts all calls, including the four successful calls.

Worked Example: Identifying the Target and Support

A laboratory repeats an assay until it has observed three positive results. Each assay is independent and has the same positive-result probability \(p=0.2\). Define the negative-binomial count and state its support.

A positive result is a success, so \(r=3\), and \(p=0.2\) is the success probability on each trial. The random variable \(X\) is the number of negative results observed before the third positive result. Since \(0<0.2<1\), the support is

$$ \{0,1,2,3,\ldots\}. $$

For instance, \(X=0\) corresponds to the first three assays all being positive. The value \(X=2\) is possible if two negative results occur before the third positive result. There is no largest possible value: any finite number of negative results can occur before three positive ones. No probability for these values is needed to identify the variable or its support.

Worked Example: The Special Case of a First Success

Suppose a sequence of independent trials with success probability \(p=0.4\) continues until the first success. What does the failures-before-the-target variable count, and what are its possible values?

The target is one success, so \(r=1\). The variable \(X\) counts failures before that first success. If the first trial succeeds, \(X=0\). If the first success occurs on trial 4, then the first three outcomes were failures and \(X=3\). Because \(0<0.4<1\), every nonnegative integer is possible, so the support is \(\{0,1,2,\ldots\}\).

This is the same kind of waiting process used to define a geometric count. The negative-binomial definition extends the target from one success to \(r\) successes; it retains the same failures-before-successes counting convention.

Why This Definition Is Useful

The negative-binomial count models a stopping rule based on reaching a fixed number of successes. Examples include the number of unsuccessful attempts before a specified number of successful connections, the number of non-events before a fixed event count, or the number of failed specimens before a target number of positive tests. In each case, one must decide whether the scientific question concerns failures, successes, or total attempts. Naming the variable precisely prevents those quantities from being conflated.

The repeated-trial assumptions also provide a modeling check. If success chances change across trials, or outcomes are dependent, the count may still be defined descriptively, but it does not follow the independent, equal-\(p\) negative-binomial model stated here. The model requires more than merely counting failures until a target is reached.

Common Mistakes

  • Counting the target successes as failures. The process stops at the \(r\)th success; those \(r\) successes are not part of \(X\).
  • Using the total number of trials as the failure count. If stopping occurs on trial \(T_r\), subtract the \(r\) successful trials: \(X=T_r-r\).
  • Assuming \(r\) is the number of trials. It is the fixed number of successes required. The total number of trials is random.
  • Giving a finite maximum to the support. For \(0<p<1\), every nonnegative integer can occur; there is no finite upper bound.
  • Ignoring the trial assumptions. The model described here uses independent trials with one common success probability \(p\).
Key takeaway: In the failures-before-the-\(r\)th-success convention, \(r\) is a fixed positive success target, \(p\) is the common success probability, and \(X\) counts only failures. When \(0<p<1\), \(X\) has support \(\{0,1,2,\ldots\}\), and the total trial count is \(T_r=r+X\).

Check Your Understanding

Answer each question by identifying the counted quantity and applying the definition.

  1. A process stops at its third success on trial 8. How many failures occurred before stopping?
  2. For \(r=2\) and \(0<p<1\), what is the support of the failures-before-the-\(r\)th-success count?
  3. Explain why the number of trials is not the same variable as the number of failures before the target success.
  4. If \(p=1\), what value does the failure count take, and why?
  5. Name two assumptions about the trials in the model definition.