Overview

The negative binomial distribution counts how many failures happen before you reach a set number of successes, such as calls made before the third sale.

Enter the number of failures k, the target successes r and the success probability per trial.

Worked examples

InputsResult
Failures Before r-th Success (k)6Target Successes (r)4Success Probability (%)40P(Failures = 6 before success #4): 0.1CDF P(Failures <= 6): 0.62
Show 2 more examples
Failures Before r-th Success (k)2Target Successes (r)1Success Probability (%)50P(Failures = 2 before success #1): 0.13CDF P(Failures <= 2): 0.88
Failures Before r-th Success (k)10Target Successes (r)3Success Probability (%)20P(Failures = 10 before success #3): 0.06CDF P(Failures <= 10): 0.5

P(Failures = 6 before success #4) by success probability

With the calculator's starting values, the P(Failures = 6 before success #4) is 0.1. The table shows how it changes with the success probability.

Success Probability (%)P(Failures = 6 before success #4)
20%0.04
25%0.06
30%0.08
35%0.1
40%starting value0.1
45%0.1
50%0.08
55%0.06
60%0.04

Other inputs: Failures Before r-th Success: 6 k · Target Successes: 4 r. Change them in the calculator above for your own numbers.

How it works

The chance of exactly k failures before the r-th success is C(k + r − 1, k) × (1 − p)^k × p^r. The CDF adds up the chances from 0 to k failures. With r = 1, it becomes the geometric distribution.

The formula

P(K = k) = C(k + r − 1, k) × (1 − p)^k × p^r

Practical tips

  • At 40% success, the chance of exactly 6 failures before the 4th success is about 0.10.
  • The mean number of failures is r × (1 − p) ÷ p, here 6.
  • Some textbooks count total trials instead of failures. Add r to convert.

Frequently asked questions

How is it different from binomial?

Binomial fixes the number of trials. Negative binomial fixes the number of successes.

Is it used for count data?

Yes. It models over-dispersed counts better than the Poisson.

What if r = 1?

It's the geometric distribution.