Negative Binomial Calculator
Calculate negative binomial probabilities for the number of failures that occur before a specified number of successes. Enter the target number of successes, probability of success, and number of failures to calculate exact and cumulative probabilities plus important distribution statistics.
Enter Distribution Values
Model failures before the r-th success.
What Is the Negative Binomial Distribution?
The negative binomial distribution is a discrete probability distribution that can model the number of failures that occur before a specified number of successes is reached in a sequence of independent Bernoulli trials.
Each trial has two possible outcomes, usually called success and failure, and the probability of success is assumed to stay constant from one trial to the next.
What Does X Represent?
In this calculator, X represents the number of failures before the r-th success. For example, if r = 5 and x = 3, the calculator finds the probability that exactly three failures occur before the fifth success.
How to Use the Negative Binomial Calculator
Enter r
Enter the number of successes you want to achieve before the process stops.
Enter p and x
Provide the probability of success on each trial and the number of failures you want to evaluate.
Calculate Results
The calculator returns exact and cumulative probabilities plus the expected value, variance, standard deviation, and mode.
Negative Binomial Probability Formula
For the failures-before-r-successes definition, the probability of exactly x failures is: P(X=x) = C(x+r−1, x)pr(1−p)x .
The combination term counts the ways that the first x+r−1 trials can contain exactly r−1 successes and x failures. The final trial must then be the r-th success.
What Are p and q?
The value p represents the probability of success on each trial. The probability of failure is q = 1 − p.
Negative Binomial Mean and Variance
For the number of failures before the r-th success, the expected number of failures is: Mean = r(1−p) / p .
The variance is: Variance = r(1−p) / p² , and the standard deviation is the square root of that variance.
Expected Number of Total Trials
Because total trials equal successes plus failures, the expected number of trials required to reach r successes is: E(T) = r / p .
Negative Binomial vs Geometric Distribution
| Feature | Negative Binomial | Geometric |
|---|---|---|
| Stopping Point | r-th success | First success |
| Target Successes | r ≥ 1 | r = 1 |
| Possible Failures | 0, 1, 2, ... | 0, 1, 2, ... |
| Relationship | General case | Special case of negative binomial |
Negative Binomial vs Binomial Distribution
The binomial distribution fixes the number of trials and asks how many successes occur. The negative binomial distribution instead fixes the desired number of successes and allows the number of trials to vary.
For example, a binomial question may ask how many successes occur in 20 trials. A negative binomial question may ask how many failures occur before the fifth success.