Negative Binomial Distribution Calculator
Use our negative binomial distribution calculator to compute the probability of needing n trials to get r successes (with success probability p). Includes what the negative binomial distribution is, when to use it, the negative binomial distribution formula, and a worked example.
What Is the Negative Binomial Distribution?
The negative binomial distribution models the number of trials needed to achieve a fixed number of successes when each trial is independent and has the same probability of success (p).
A common setup is: “What is the probability that the r-th success happens on the n-th trial?” This calculator follows that exact definition.
People often use the negative binomial distribution when they care about “how many attempts until we get r successes,” rather than “how many successes in a fixed number of attempts” (which is the regular binomial distribution).
Negative Binomial Distribution Formula
If Y is the trial on which the r-th success occurs, then Y takes values n = r, r+1, r+2, ... and the probability is given by the negative binomial PMF below.
This is the most common “negative binomial distribution formula” used in probability problems.
Counts ways to arrange the first n-1 trials so there are exactly r-1 successes before the final (r-th) success on trial n.
Interpretation: the 3rd success occurs exactly on the 8th trial.
If n < r, getting r successes by trial n is impossible, so P(Y=n)=0.
Definitions
These are the key terms used in negative binomial distribution problems.
- Trial
- A single attempt/experiment with two outcomes: success or failure.
- p (probability of success)
- The probability a single trial is a success, where 0 < p < 1.
- r (number of successes)
- The target count of successes you want to reach.
- n (trial of the r-th success)
- The trial number on which the r-th success occurs (must satisfy n ≥ r).
- C(n-1, r-1)
- The combinations count used in the PMF; it counts ways to place r-1 successes in the first n-1 trials.
How to Use the Negative Binomial Calculator
- 1
Enter n (the trial number / total events when the r-th success happens).
- 2
Enter r (the number of successes you’re aiming for).
- 3
Enter p (probability of success on one trial).
- 4
Read the result for P(Y = n) and the combinations term C(n-1, r-1).
Frequently Asked Questions
It’s a distribution that models the number of trials needed to obtain r successes, assuming independent trials with constant success probability p.
Use it when you’re asking “how many trials until r successes?” or “what’s the probability the r-th success happens on trial n?”
The word “negative” doesn’t mean probabilities are negative. It refers to a different model than the (regular) binomial distribution: instead of fixing the number of trials and counting successes, you fix the number of successes and model how many trials it takes.
Typical problems ask for P(Y=n) (the r-th success occurs on trial n) or probabilities about needing at most/at least a certain number of trials to reach r successes.
It’s impossible to have r successes by trial n if n < r, so the probability P(Y=n) is 0 in that case.