Paritian

Statistics

Negative Binomial Calculator (Trials Until the r-th Success)

The chance of getting your r-th success on a given trial or within a given number of trials, and how many trials it takes on average.

Results

Chance of getting the r-th success within k trials 47.441 %
Chance the r-th success comes exactly on trial k 7.508 %
Chance you need more than k trials 52.559 %
Average number of trials needed 12.00
Standard deviation of the trials needed 6.00
How it changes
Chance the r-th success comes exactly on trial kNumber of trials you are asking about (k) 3 – 36. Chance the r-th success comes exactly on trial k: 1.5625 → 0.070042Chance the r-th success comes exactly on trial k0246810102030Number of trials you are asking about (k)

The dashed line marks the value you entered.

What this tool does

Where the binomial distribution counts successes in a fixed number of trials, the negative binomial turns it round: it counts the trials needed to reach a fixed number of successes. It answers questions such as how many sales calls to land five deals, or how many rolls before three sixes. With r = 1 it is the geometric distribution — the wait for the first success, with mean 1 ÷ p. On average you need r ÷ p trials, but the spread is wide: the chance of needing more than the average is substantial. Trials are assumed independent with a constant chance of success.

Formula

P(r-th success on trial k) = C(k − 1, r − 1) pʳ (1 − p)ᵏ⁻ʳ · P(within k) = 1 − Σⱼ₌₀^(r−1) C(k, j) pʲ (1 − p)ᵏ⁻ʲ · mean = r ÷ p

Variables

SymbolMeaningUnit
rSuccesses you need (r)—
ppChance of success on each trial%
kNumber of trials you are asking about (k)—
PCChance of getting the r-th success within k trials%
PKChance the r-th success comes exactly on trial k%
PMChance you need more than k trials%
MEAverage number of trials needed—
SDStandard deviation of the trials needed—

Worked example

  • Successes you need (r)3
  • Chance of success on each trial25 %
  • Number of trials you are asking about (k)10
  • Chance of getting the r-th success within k trials47.441 %
  • Chance the r-th success comes exactly on trial k7.508 %
  • Chance you need more than k trials52.559 %
  • Average number of trials needed12.00
  • Standard deviation of the trials needed6.00

Limitations

  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.
  • The default values are typical reference figures, not measurements of your situation. Replace them with your own data whenever you have it.