Interactive Negative Binomial Calculator
Assumption: K is the number of failures observed before the r-th success, with success probability p on each independent trial.
Use this tool to compute exact and cumulative probabilities for the negative binomial distribution. It is useful in reliability analysis, quality control, A/B testing, and any scenario where you count failures until a fixed number of successes is reached.
What is the negative binomial distribution?
The negative binomial distribution models the number of failures before reaching a specified number of successes in repeated independent Bernoulli trials. Each trial has two outcomes (success/failure), and the success probability remains constant from trial to trial.
Parameterization used on this page
- r: required number of successes (positive integer)
- p: probability of success on each trial (0 < p ≤ 1)
- K: random variable for the number of failures before the r-th success
How to use the calculator
- Choose the probability type: exact, cumulative up to k, or upper-tail from k.
- Enter r, the number of successes you want to reach.
- Enter p, the success probability on each trial.
- Enter k, the failure count of interest.
- Click Calculate.
Worked example
Suppose a sales rep closes a deal with probability 0.25 each call. You want to know the probability of exactly 6 failed calls before the 3rd closed deal:
- r = 3
- p = 0.25
- k = 6
The calculator returns P(K = 6), plus summary statistics like expected failures and expected total calls.
When this distribution is appropriate
- Repeated, independent trials
- Constant success probability across trials
- You stop after a fixed number of successes
- You care about the number of failures (or total trials) needed
Common mistakes to avoid
- Confusing binomial with negative binomial (fixed number of trials vs fixed number of successes).
- Using non-integer values for r or k.
- Using p outside the range (0, 1].
- Applying this model when trial outcomes are not independent.
Quick FAQ
Is this the same as the geometric distribution?
The geometric distribution is a special case of the negative binomial with r = 1.
What does “at most k failures” mean?
It means P(K ≤ k), which sums exact probabilities from 0 through k.
What does “at least k failures” mean?
It means P(K ≥ k), the probability of needing k or more failures before reaching r successes.