Skip to main content

Negative Binomial Distribution Calculator

Compute probabilities for waiting times until r successes in repeated Bernoulli trials with success probability p.

P(X = k): 0.104509

P(X ≤ k): 0.684605

P(X ≥ k): 0.315395

Mean: 4.500

Variance: 11.250

Mode: 2

Instructions

  1. Specify the number of successes you need (r).
  2. Provide the probability of success in each trial (p).
  3. Enter k, the failures observed before the r-th success.
  4. Review point and cumulative probabilities plus distribution moments.

Formula

P(X = k) = C(k + r − 1, r − 1) · pr · (1 − p)k

Mean = r(1 − p) / p

Variance = r(1 − p) / p²

X counts failures before the r-th success. For trials (successes + failures), add r to obtain the total number of trials until the r-th success.

Common Questions

How does this differ from the geometric distribution?

The geometric distribution is a special case with r = 1. The negative binomial extends this to r successes.

What if p varies between trials?

The classical negative binomial assumes constant p. For varying probabilities, other models are needed.

Can r be non-integer?

In probability theory r is typically an integer. Over-dispersion modeling in count data sometimes extends r to positive real numbers (Pascal–gamma mixture), but that requires alternate formulas.