Contact

NEGBINOMDIST in ONLYOFFICE: Legacy Negative-Binomial Point Probability

Statistical Intermediate ONLYOFFICE

Use NEGBINOMDIST with clear model inputs, independently calculated examples, exact-version source limits and compatibility guidance.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

=NEGBINOMDIST(2,3,0.5) has the independent target 0.1875. It is the probability of exactly two failures before the third success, rather than the cumulative probability of up to two failures.

Syntax

NEGBINOMDIST(number_f, number_s, probability_s)

Set up a fixed-success experiment

Create SuccessTrials with Parameter in A1 and Value in B1. Put Required successes in A2 and 3 in B2; Success probability in A3 and 0.5 in B3; Failures of interest in A4 and 2 in B4. The example models independent trials with the same success probability, stopping when the third success occurs.

The random count is failures before that third success. Two failures means the stopping trial is trial 5: three successes plus two failures. It does not mean two total trials, nor the number of successes in a fixed batch. A fixed-trial success count instead belongs to a binomial model. Independence and constant success probability are assumptions, not results supplied by the function.

Read the event before choosing the formula

The official reference has three required arguments: failure count, required successes and success probability per trial. No cumulative argument exists. Each trial is assumed independent with the same success probability, and the experiment stops at the specified success count.

The mathematical point mass is C(f+r−1,r−1)p^r(1−p)^f. Here f=2 and r=3 imply five total trials, with the last trial fixed as a success. Among the first four trials, choose positions for the other two successes in C(4,2)=6 ways. Each full sequence has probability 1/32, giving 6/32=0.1875.

Enter a complete small probability table

Put failures 0,1,2,3,4 in D2:D6. Enter =NEGBINOMDIST(D2,$B$2,$B$3) in E2 and fill through E6.

Failure count Independent point mass
0 0.125
1 0.1875
2 0.1875
3 0.15625
4 0.1171875

=SUM(E2:E4) has target 0.5 for at most two failures. =SUM(E3:E5) has target 0.53125 for one through three failures. The displayed five-row table does not sum to 1 because counts greater than four still have positive probability. Do not normalize this truncated table and then call it the original distribution.

Advanced: point probability versus tails

For more than two failures, subtract the cumulative sum through 2 from 1: target 0.5. For at least two failures, exclude only counts 0 and 1, giving 1−0.125−0.1875=0.6875. The difference is the positive mass at the integer boundary 2. This distinction matters for discrete distributions and cannot be ignored as it can for continuous endpoint inclusion.

Modern =NEGBINOM.DIST(2,3,0.5,FALSE) has the same mathematical point-mass target for these integer inputs. Its TRUE mode directly requests a cumulative result. Do not append TRUE to NEGBINOMDIST; that changes the argument count beyond its declared signature.

Expected failures are 3 and expected total trials are 6 for this model, but the table’s largest masses are at 1 and 2 failures. The mean is not necessarily the mode, and neither is a guarantee for a single experiment. If the question fixes the total number of trials instead of the stopping success, use an appropriate binomial model rather than changing the interpretation of these arguments.

Compatibility and source-boundary cautions

The legacy code checks f≥0, r≥1 and 0≤p≤1, although the help describes p strictly inside (0,1). For integer inputs, p=1 gives mass 1 at zero failures and 0 at a positive failure count. At p=0, the mass is 0 for finite failure counts with r≥1; the required successes are never attained, so ordinary stopping-time interpretation is degenerate.

Unlike the modern class, this path does not explicitly parse both counts to integers before forming its combination and powers. The raw counts remain in exponents. Do not promise that fractional arguments are truncated consistently across names, or claim full equivalence solely from matching integer examples. Keep failure and success counts integral and validate them before calculation.

The source uses direct combinations and powers. Large inputs can encounter numerical overflow, underflow or loss of accuracy; a successful small table does not establish robust huge-count behavior. Conversion errors propagate through its argument preparation. Existing array-oriented helper calls do not prove a native array-entry or spill interface. The separate NEGBINOM.DIST guide covers its cumulative mode and integer parsing.

Version, precision and verification

Checked October 18, 2026 against current official help and SDKJS tag v10.0.0.169, commit 3679e0375a758d7dc59d31337a45461be3525ed8. Introduction dates and a final supported-version endpoint are not established. Desktop Editors, Docs, mobile releases and imported files require separate compatibility checks.

Neither the ONLYOFFICE application nor its calculation engine was executed for this guide. The numerical targets are independently calculated mathematical values; code-path and error observations are manual source traces. They are not screenshots, displayed workbook results or promises of identical final digits. Use English function names and comma separators as shown, adapting separators to the editor’s locale.

Keep inputs and intermediate probabilities numeric and unrounded. Format the display rather than replacing values with rounded strings. These moderate scalar examples do not certify extreme-tail accuracy, unusual type coercion, array entry or dynamic spill. Model assumptions must be checked separately from arithmetic correctness.