Negative Binomial Probability Calculator

Analyze failures before target successes with flexible outputs. Compare exact, cumulative, and interval results clearly. Chart patterns and export reports for confident probability review.

Calculator Inputs

Enter the target number of successes, the probability of success on each trial, and the failure count you want to evaluate.

The calculator stops when this success count is reached.
Use a decimal between 0 and 1.
This value drives exact, cumulative, and tail results.
The highlighted result changes with this selection.
Used for P(a ≤ X ≤ b).
If lower than start, the values are swapped.
Controls the length of the plotted probability curve.
Applies to displayed numeric outputs.
Reset Calculator

Example Data Table

Sample scenario: target successes r = 4 and success probability p = 0.55.

Failures (x) Total Trials P(X = x) P(X ≤ x)
0 4 0.091506 0.091506
1 5 0.164711 0.256218
2 6 0.185300 0.441518
3 7 0.166770 0.608288
4 8 0.131331 0.739619
5 9 0.094559 0.834178

Formula Used

Random variable definition
X = number of failures before the rth success, where each trial has success probability p.
Exact probability mass function
P(X = k) = C(k + r - 1, k) × (1 - p)k × pr
Cumulative probability
P(X ≤ k) = Σ P(X = i), for i = 0 to k
Tail probability
P(X ≥ k) = 1 - P(X ≤ k - 1)
Interval probability
P(a ≤ X ≤ b) = P(X ≤ b) - P(X ≤ a - 1)
Moments
Mean = r(1 - p) / p
Variance = r(1 - p) / p2
Mode = floor(((r - 1)(1 - p)) / p), for r > 1

The combination term counts how many valid trial sequences can contain exactly k failures before the final required success appears.

How to Use This Calculator

  1. Enter the target number of successes you want to reach.
  2. Enter the success probability for one trial as a decimal.
  3. Enter the observed failure count to test exact, cumulative, and tail probabilities.
  4. Set an interval start and end if you want range probability.
  5. Choose the primary calculation focus for the highlighted result card.
  6. Set chart maximum failures to control the number of plotted points.
  7. Choose decimal places for output formatting.
  8. Click Calculate Probability to show results above the form.
  9. Use the CSV or PDF buttons to export the current result set.

FAQs

1) What does this calculator measure?

It measures probabilities for the number of failures that occur before a chosen number of successes is reached in repeated independent trials.

2) What is the meaning of r in the formula?

r is the target count of successes. The process continues until that success count is achieved, and the calculator studies failures recorded before it.

3) What does p represent?

p is the probability of success on one trial. It must be greater than 0 and less than 1 for the distribution to work properly.

4) Why are exact and cumulative probabilities different?

Exact probability refers to one failure count only. Cumulative probability adds all probabilities from zero failures up to the selected count.

5) What does the tail probability mean here?

Tail probability shows the chance of observing at least the selected number of failures before the required success count is reached.

6) Can I use percentages instead of decimals for p?

Convert percentages to decimals first. For example, 35% should be entered as 0.35, and 82% should be entered as 0.82.

7) What is the chart showing?

The bars show the probability of each exact failure count. The line shows how those probabilities accumulate as failure counts increase.

8) When is the negative binomial model useful?

It is useful when you repeat independent trials until a fixed number of successes occurs, such as quality checks, sales calls, clinical responses, or game outcomes.

Related Calculators

Markov Chain One-Step Transition CalculatorExpected Value and Variance Calculatorfind z given the sample proportion and sample size calculatorroulette probability calculatorblackjack probability calculatorempirical probability calculatorpoker hand probabilitydiscrete probability calculatortheoretical probability calculatorbayesian probability calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.