Negative Binomial Calculator Formula
Understand the math behind the negative binomial calculator. Each variable explained with a worked example.
Formulas Used
P(X = k)
probability = coeff * pow(p, r) * pow(1 - p, k - r)Expected Trials
expected = r / pVariance
variance_val = r * (1 - p) / pow(p, 2)Variables
| Variable | Description | Default |
|---|---|---|
r | Target Successes (r) | 3 |
k | Total Trials (k) | 8 |
p | Success Probability (p) | 0.4 |
coeff | Derived value= factorial(k - 1) / (factorial(r - 1) * factorial(k - r)) | calculated |
How It Works
How to Calculate Negative Binomial Probability
Formula
P(X = k) = C(k-1, r-1) * p^r * (1-p)^(k-r)
The negative binomial distribution models the number of trials needed to achieve exactly r successes. The last trial must be a success (the r-th), and the preceding k-1 trials must contain exactly r-1 successes. The expected number of trials is r/p.
Worked Example
A salesperson closes 40% of pitches. What is the probability that the 3rd sale happens on the 8th pitch?
r = 3k = 8p = 0.4
- 01Need r=3 successes on trial k=8
- 02C(7,2) = 21
- 03p^r = 0.4^3 = 0.064
- 04(1-p)^(k-r) = 0.6^5 = 0.07776
- 05P(X=8) = 21 * 0.064 * 0.07776 ≈ 0.10450
- 06Expected trials = 3 / 0.4 = 7.5
Ready to run the numbers?
Open Negative Binomial Calculator