Negative Binomial Calculator
Find the probability of a chosen number of failures before a stated number of independent successes.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Required successes | integer1..10000 |
| Successes / event count | integer0..10000 |
| Success probability | decimal(0,1] |
Understanding your result
These outputs describe the probability model and event definitions you entered. A probability is a number from 0 to 1; a probability density is not itself the probability of one exact continuous value.
Common mistakes
- Entering 25 instead of 0.25 for a probability, or assuming events are independent when the model requires that assumption.
- Confusing an exact-count probability with a cumulative probability, or replacement with sampling without replacement.
Check your calculation
- Check a zero/certain-event boundary and the stated support of the distribution against the worked example.
Calculation checks, sources and review limits
What is the chance of this many failures before a given number of successes?
Find the probability of a chosen number of failures before a stated number of independent successes.
Common uses
- Find the probability of a chosen number of failures before a stated number of independent successes.
How it works
P(K=k)=C(k+r-1,k)*p^r*(1-p)^k, K failures before r successes. Trials/draws/counts are limited to 10,000; negative-binomial r and k may each be at most 10,000. Log-factorial arithmetic avoids forming large factorials. Extremely small probabilities can underflow to zero; outputs are numerical estimates, not guarantees about real events.
Worked example
Enter Required successes: 2; Successes / event count: 1; Success probability: 0.5. The result is Pmf: 0.25.
FAQ
What is the chance of this many failures before a given number of successes?
P(K=k)=C(k+r-1,k)*p^r*(1-p)^k, K failures before r successes. Trials/draws/counts are limited to 10,000; negative-binomial r and k may each be at most 10,000. Log-factorial arithmetic avoids forming large factorials. Extremely small probabilities can underflow to zero; outputs are numerical estimates, not guarantees about real events.
What assumptions and limits apply?
Counts failures; alternate total-trials convention must not be silently mixed.