Negative Binomial Distribution Calculator
Free negative binomial calculator. Trials until r successes. PMF, CDF, mean, variance. Dice, sales,
Why This Statistical Analysis Matters
Why: Statistical calculator for analysis.
How: Enter inputs and compute results.
Negative Binomial — Trials Until r-th Success
Generalizes geometric distribution. How many dice rolls until your 3rd six? Sales calls until 5th sale? PMF, CDF, mean r/p.
Real-World Scenarios — Click to Load
Calculation Mode
Inputs
PMF Bar Chart — P(X=k)
CDF Step Chart — P(X≤k)
Calculation Breakdown
For educational and informational purposes only. Verify with a qualified professional.
Key Takeaways
- • X = number of trials until the r-th success. Generalizes geometric (r=1).
- • PMF: P(X=k) = C(k-1, r-1) × p^r × (1-p)^(k-r) for k ≥ r
- • Mean = r/p, Variance = r(1-p)/p² — more trials when p is small
- • CDF: P(X ≤ k) = Σ P(X=i) for i=r..k
- • When r is large, normal approximation: mean r/p, variance r(1-p)/p²
Did You Know?
How It Works
Trials Until r-th Success
Independent Bernoulli trials (success prob p). Count total trials X until exactly r successes. X ≥ r always.
Combinatorial Factor
C(k-1, r-1) counts ways to arrange r-1 successes among first k-1 trials, with k-th trial being r-th success.
Geometric as Special Case
When r=1, we get geometric — trials until first success. C(k-1,0)=1, so P(X=k) = (1-p)^(k-1) × p.
Mean and Variance
Mean = r/p (expected trials). Variance = r(1-p)/p². Lower p → more trials; higher r → more trials.
Normal Approximation
When r is large, X ≈ normal with mean r/p and variance r(1-p)/p².
Expert Tips
NegBin vs Binomial
Binomial: fixed n trials, count successes. NegBin: fixed r successes, count trials.
Overdispersion
NegBin used when data is overdispersed (variance > mean) vs Poisson.
r=1 is Geometric
Geometric is the special case — use for "first success" only.
Alternative Parameterization
Some texts use "failures before r successes" — different but related formulation.
Distribution Comparison
| Distribution | What we count | Fixed | Parameters |
|---|---|---|---|
| Binomial | Successes in n trials | n (trials) | n, p |
| Negative Binomial | Trials until r successes | r (successes) | r, p |
| Geometric | Trials until 1st success | r=1 | p |
Frequently Asked Questions
Binomial vs negative binomial?
Binomial: fixed n trials, count successes. Negative binomial: fixed r successes, count trials until we get them.
When is r=1?
r=1 gives the geometric distribution — trials until the first success. It's the special case of negative binomial.
Why "negative" binomial?
The name comes from the generalized binomial coefficient C(-r, k) in an alternative formulation. Models "waiting" for r successes.
What does mean r/p mean?
Expected trials to get r successes. If p=0.5, expect 2 trials per success, so r successes need ~2r trials on average.
When can I use normal approximation?
When r is large (e.g., r ≥ 10), distribution ≈ normal with mean r/p and variance r(1-p)/p².
How to interpret P(X=k)?
Probability that exactly k trials are needed to achieve the r-th success. (k-1)th trial had r-1 successes, k-th is r-th.
Can p be 0 or 1?
No. p=0 means no success ever; p=1 means X=r always. Formulas assume 0 < p < 1.
"Number of failures" parameterization?
Y = X - r = failures before r successes. P(Y=f) = C(f+r-1, f) p^r (1-p)^f. Same distribution, different framing.
Negative Binomial by the Numbers
Official Data Sources
Disclaimer: This calculator provides negative binomial probabilities for educational and professional reference. Assumes independent Bernoulli trials with constant p. Verify against established statistical software for critical applications.
Related Calculators
Poisson Distribution Calculator
Calculate P(X=k), P(X≤k), P(X≥k), and P(a≤X≤b) for the Poisson distribution with parameter λ. Models count of events in a fixed interval.
StatisticsGeometric Distribution Calculator
Calculate probabilities for the geometric distribution — the number of trials until the first success. PMF, CDF, survival function, and memoryless property.
StatisticsHypergeometric Distribution Calculator
Calculate hypergeometric probabilities for sampling without replacement. P(X=k), mean, variance, PMF bar chart, CDF step chart, and binomial approximation...
StatisticsLognormal Distribution Calculator
Calculate PDF, CDF, mean, mode, variance, and percentiles for the lognormal distribution. If ln(X) ~ N(μ, σ²), then X is lognormal. Income, house prices...
StatisticsRayleigh Distribution Calculator
Calculate PDF, CDF, mean, mode, variance for the Rayleigh distribution. Models magnitude of 2D Gaussian vectors — used in wireless communications, wind...
StatisticsUniform Distribution Calculator
Calculate PDF, CDF, mean, variance, and probabilities for continuous Uniform(a,b) and discrete Uniform{a,...,b} distributions. Fair die, random numbers...
Statistics