Negative Binomial PMF Calculator
Enter failures, target successes and the success probability to get the PMF.
Result
How it is calculated
The tool gives the probability of exactly k failures before the r-th success: P(X = k) = C(k + r − 1, k) · pr · (1 − p)k. Here p is the success probability of each independent trial (above 0, up to 1), r the target number of successes (at least 1) and k the failures observed (0 up to 1,000,000; more gives no result). It also reports the mean r(1 − p) / p and the standard deviation √(r(1 − p) / p²). The count k and r are rounded to whole numbers. Results are shown with six decimals for the probability and four for mean and sd. This is the failures-before-success form, so the total number of trials is k + r, not k.
Worked example
A sales rep wins a deal on 40% of calls (p = 0.4) and wants three deals (r = 3). What is the chance of exactly 4 unsuccessful calls before the third win? The count of arrangements is C(4 + 3 − 1, 4) = C(6, 4) = 15. Then 0.4³ = 0.064 and 0.6⁴ = 0.1296. Multiply: 15 × 0.064 × 0.1296 = 0.124416, about a 12.4% chance. The expected number of failures is 3 × 0.6 / 0.4 = 4.5 and the standard deviation is 3.3541.
Common mistakes
- Counting total trials as k. In this form k counts only the failures; the total number of trials is k + r, and the last trial is always a success.
- Using the number of trials in the k field. If a process needed 7 calls to get 3 wins, then k is 4, not 7.
- Entering the probability as a percentage. The field takes a value between 0 and 1, so 40% must be typed as 0.4.
- Treating the PMF as a cumulative probability. The result is the chance of exactly k failures, not k or fewer, so add several values to get a cumulative figure.
- Mixing it up with the binomial distribution. The binomial fixes the number of trials and counts successes, while here the number of successes is fixed and the number of trials varies.
About this calculator
The negative binomial distribution models the number of failures k observed before achieving a fixed number of successes r, in a sequence of independent trials each with success probability p. Its probability mass function is P(X=k) = C(k+r−1, k) · p^r · (1−p)^k, with mean μ = r(1−p)/p and variance σ² = r(1−p)/p² — a distribution that, unlike the Poisson, allows variance to exceed the mean, making it useful for “overdispersed” count data.
This calculator takes the number of failures, the target number of successes, and the per-trial success probability, and returns the PMF along with the distribution's mean and standard deviation. Statisticians and actuaries use it to model overdispersed count data such as insurance claim frequencies, and quality-control engineers use it to estimate how many defective units to expect before hitting a target number of good ones in a production run.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool returns the probability of exactly k failures, not of k or fewer. For a cumulative question such as at most 4 failures before your 3rd success, run k = 0, 1, 2, 3 and 4 in turn and add the results. A handy check is the mean it reports: the PMF peaks near that value, so a k far above the mean should give a small number. What process are you modelling, calls to close deals, defective parts, or something else?