Calculate probabilities for the negative binomial distribution. Models the number of failures before achieving a specified number of successes.
Last updated: March 2026
The Negative Binomial Distribution models the number of failures (k) that occur before achieving a specified number of successes (r) in a sequence of independent Bernoulli trials, each with probability p of success. It's called "negative" because it counts failures rather than successes.
This distribution is widely used in quality control, epidemiology, and reliability engineering. For example, in manufacturing, it can model how many non-defective items you'll inspect before finding a target number of defective ones. In sports, it models games until a team reaches a certain number of wins.
The probability mass function is: P(X = k) = C(k+r-1, k) × p^r × (1-p)^k, where C represents the binomial coefficient. The mean is r(1-p)/p and the variance is r(1-p)/p².
Quality Control Scenario
Binomial has a fixed number of trials and counts successes. Negative binomial has a fixed number of successes and counts failures until reaching those successes. Use negative binomial when you're waiting for a specific number of events to occur.
Quality control (inspecting until finding r defects), epidemiology (tracking disease cases until threshold), reliability engineering (failures before r-th success), sports analytics (games until team wins r times), and sequential sampling studies.
The mean r(1-p)/p is the expected number of failures before achieving r successes. For r=5, p=0.4, the mean is 7.5, meaning on average you'll see 7.5 failures before the 5th success.
Yes, but when p is very small (rare success), the distribution becomes very spread out with high variance. The mean r(1-p)/p becomes large, requiring many trials to reach r successes. This is still valid but may need large sample sizes.
Geometric distribution is a special case of negative binomial with r=1 (waiting for the first success). Negative binomial generalizes this to waiting for the r-th success.
Variance r(1-p)/p² measures the spread of possible failure counts. Higher variance means more uncertainty about k. When p is close to 0 or 1, or when r is large, variance increases, indicating more variability in outcomes.
Yes, P(X=k) is always between 0 and 1. The sum of all PMF values over k=0,1,2,... equals 1 (total probability). The peak typically occurs near the mean value.
Yes, when r is large (typically r > 5) and p is not too extreme, negative binomial can be approximated by Normal(μ=r(1-p)/p, σ²=r(1-p)/p²). Check with Q-Q plot or goodness-of-fit test.
Related Tools
Gaussian probabilities.
Z-score from probability.
Binary outcome probabilities.
Rare event frequency.
Time between events.
Equal probability distribution.