Worked Example: Worked Mathematical Example: Negative Binomial & Geometric
Calculate expected trials and probability of achieving the r-th success on trial n.
- Specify the function parameters, matrix entries, or confusion matrix counts.
- Apply the closed-form or iterative formula: P(Trial = n) = C(n − 1, r − 1) × p^r × (1 − p)^(n − r); ExpectedTrials = r / p.
- Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Negative Binomial & Geometric via P(Trial = n) = C(n − 1, r − 1) × p^r × (1 − p)^(n − r); ExpectedTrials = r / p.
Mathematics & Statistics · Probability Distributions & Survival Analysis
Negative Binomial & Geometric Distribution (Trials Until r-th Success) Calculator: inputs, method, and how to read the result
Calculate expected trials and probability of achieving the r-th success on trial n.
Choose inputs for the case you are checking
The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.
- Required Successes R: Target number of successes r (r = 1 is the Geometric distribution).
- Single Trial Success Prob P: Probability p of success on each independent trial (0.01 to 0.99).
- Total Trials Evaluated N: Total trial count n at which the r-th success occurs (n ≥ r).
What the calculation includes
With the default values shown, Expected Total Trials for 3 Successes is 12 trials. The calculation follows Negative Binomial & Geometric Formula; the formula and variable definitions above show how the inputs combine.
One-input check: With the other defaults held constant, changing Required Successes R from 3 r successes to 4 r successes changes Expected Total Trials for 3 Successes (12 trials) to Expected Total Trials for 4 Successes (16 trials). This is a comparison inside the calculator's stated model, not a prediction.
Where to use caution
- Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
- Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.
Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.
More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.