NEGBINOMDIST in WPS Spreadsheet: Failures Before a Target Success
Calculate the probability of a fixed number of failures before a target success, with explicit trial ordering and a combinatorial check.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
NEGBINOMDIST returns the probability of exactly a specified number of failures before a specified target number of successes is reached. The success probability stays constant across independent trials. The total number of trials varies; the target success count stays fixed.
Syntax and clean input domain
=NEGBINOMDIST(number_f, number_s, probability_s)
Number_f counts failures, number_s is the positive target success count, and probability_s is the probability of success on one trial. These examples use small nonnegative integer failures, positive integer target successes and probabilities strictly between zero and one.
The WPS lesson contains an incomplete probability-error inequality. No endpoint error or acceptance claim is inferred from it. Although it describes truncating counts, the examples use actual integers and avoid fractional-count behavior.
Original example and counting argument
Suppose each independent trial succeeds with probability 0.5, and stop when the third success occurs. To have exactly two failures before that third success, the final trial must be a success. Among the first four trials, choose positions for the two earlier successes: there are C(4, 2)=6 possibilities.
Each complete five-trial sequence has probability 0.5^3*0.5^2=1/32. Thus the independent probability is 6/32=0.1875.
- Put 2 in A2, 3 in A3 and 0.5 in A4.
- Use
=NEGBINOMDIST(A2,A3,A4)in B2. - Label the result “exactly two failures before the third success,” not “at most two failures” or “two successes in three trials.”
The formula image generalizes the argument as C(f+r−1,r−1)*p^r*(1−p)^f.
Independent controls
| Formula | Expected point probability |
|---|---|
=NEGBINOMDIST(0,3,0.5) |
0.125 |
=NEGBINOMDIST(1,3,0.5) |
0.1875 |
=NEGBINOMDIST(2,3,0.5) |
0.1875 |
=NEGBINOMDIST(3,3,0.5) |
0.15625 |
=NEGBINOMDIST(2,2,0.25) |
0.10546875 |
=NEGBINOMDIST(1,2,0.75) |
0.28125 |
Zero failures before three successes means three successes in a row, giving 0.5 cubed. It does not mean zero trials.
Build a bounded cumulative question
For the third-success example, adding the masses for zero, one and two failures gives 0.125+0.1875+0.1875=0.5. This is the probability of reaching the third success with no more than two failures. The displayed legacy signature has no cumulative flag; this sum is an independently derived combination of point probabilities.
Do not confuse failures with total trials. Exactly two failures before the third success means five trials, with the final one constrained to succeed. A binomial model instead fixes the total trial count and counts successes without that stopping condition.
Source check and limitations
The official demonstration =NEGBINOMDIST(2,4,0.7) displays 0.21609, matching 100.7^40.3^2. This corroborates the formula and argument order.
The source discusses invalid counts and nonnumeric arguments, but original controls avoid all malformed-input rules and the incomplete probability boundary. No modern dotted alias or cumulative extension is assumed. Independence and constant probability are model assumptions, not properties the function can test. See PROB when probabilities are supplied directly for a finite discrete set rather than generated by this stopping-time model.
Availability and evidence scope
The official WPS lesson is dated 2019-06-25 and explicitly labels WPS Office for Windows Personal. Its numeric build is unspecified. This documents the function by that date; it does not establish first introduction, the last functioning build, other-platform parity or a retirement/deprecation history.
The complete lesson and its formula images and walkthrough were inspected on October 18, 2026. Original examples are documentation-derived independent calculations, not WPS or other spreadsheet-engine executions. Numeric reference values do not certify application precision or statistical model suitability.