StatGardenREF. DESK
Calculators/Statistics/Negative binomial probability
Statistics

Negative binomial probability calculator

Chance that the rth success happens on exactly the kth independent trial.

What this calculator does

Negative binomial probability works out chance that the rth success happens on exactly the kth independent trial. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

FormulaP(X=k) = C(k−1, r−1)·pʳ·(1−p)ᵏ⁻ʳ; mean = r/p, variance = r(1−p)/p²

The inputs explained

FieldWhat to enter
Successes needed (r)A number. Starts at 3.
Success probability per trial (%)A number, measured in %. Starts at 40.
Trial of the rth success (k)A number. Starts at 8.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with successes needed (r)

Every other input is held at the calculator’s starting values while successes needed (r) varies. Select any row to load that scenario into the calculator.

How the answer changes with successes needed (r)
Successes needed (r)P(rth success on trial k)P(rth success by trial k)Expected trial of the rth success
1.55.23%89.4%5.00
2.255.23%89.4%5.00
310.5%68.5%7.50
4.57.74%17.4%12.50
63.10%4.98%15.00
9Need k ≥ r ≥ 1 and 0 < p ≤ 1N/AN/A