The table below collects the full anatomy of the negative binomial distribution into a single reference card — its parameters and support, the PMF and CDF, the mean and variance formulas, mode and median behavior, the geometric special case, and a canonical example.
| Aspect |
Formula / statement |
Note / example |
| Parameters |
r (target successes, positive integer); p (success probability, 0 < p ≤ 1) |
trials are independent with constant success probability p |
| Support |
k ∈ {r, r + 1, r + 2, ...} |
at least r trials are needed to accumulate r successes |
| PMF |
P(X = k) = C(k − 1, r − 1) · pr · (1 − p)k − r |
the k-th trial must be the r-th success; arrange r − 1 successes among the first k − 1 trials |
| CDF |
F(k) = ∑i=rk C(i − 1, r − 1) · pr · (1 − p)i − r = Ip(r, k − r + 1) |
no closed form; expressible via the regularized incomplete beta function |
| Expected value |
E[X] = r / p |
r times the geometric wait — by linearity over r independent geometric trials |
| Variance |
Var(X) = r(1 − p) / p2; σ = √(r(1 − p)) / p |
grows linearly with r; explodes as p → 0 |
| Mode and median |
mode = ⌊(r − 1)(1 − p) / p⌋ (failures form); median ≈ mean, computed numerically |
right-skewed; median typically slightly below mean |
| Special case |
NegBin(1, p) = Geom(p) |
setting r = 1 collapses to the geometric distribution |
| Canonical example |
rolling a die until three 6s: r = 3, p = 1/6 |
E[X] = 18 rolls, Var(X) = 90, σ ≈ 9.49 |