Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Estatística > cdf > cdfnbn


cumulative distribution function negative binomial distribution





six real vectors of the same size.

P,Q (Q=1-P)

The cumulation from 0 to S of the negative binomial distribution. Input range: [0,1].


The upper limit of cumulation of the binomial distribution. There are F or fewer failures before the XNth success. Input range: [0, +infinity). Search range: [0, 1E300]


The number of successes. Input range: [0, +infinity). Search range: [0, 1E300]


The probability of success in each binomial trial. Input range: [0,1]. Search range: [0,1].


1-PR Input range: [0,1]. Search range: [0,1] PR + OMPR = 1.0


Calculates any one parameter of the negative binomial distribution given values for the others.

The cumulative negative binomial distribution returns the probability that there will be F or fewer failures before the XNth success in binomial trials each of which has probability of success PR.

The individual term of the negative binomial is the probability of S failures before XN successes and is Choose ( S, XN+S-1 ) * PR^(XN) * (1-PR)^S

Formula 26.5.26 of Abramowitz and Stegun, Handbook of Mathematical Functions (1966) is used to reduce calculation of the cumulative distribution function to that of an incomplete beta.

Computation of other parameters involve a search for a value that produces the desired value of P. The search relies on the monotonicity of P with the other parameter.

From DCDFLIB: Library of Fortran Routines for Cumulative Distribution Functions, Inverses, and Other Parameters (February, 1994) Barry W. Brown, James Lovato and Kathy Russell. The University of Texas.


In the following example, we compute the probability of the event S=2 for the negative binomial distribution function with Xn=3, Pr=0.7 and Ompr=0.3.

S = 2;
Xn = 3;
Pr = 0.7;
Ompr = 0.3;
// Expected : P = 0.83692 and Q = 1-P
[P, Q] = cdfnbn("PQ", S, Xn, Pr, Ompr)

See also

  • cdfbet — cumulative distribution function Beta distribution
  • cdfbin — cumulative distribution function Binomial distribution
  • cdfchi — cumulative distribution function chi-square distribution
  • cdfchn — cumulative distribution function non-central chi-square distribution
  • cdff — cumulative distribution function Fisher distribution
  • cdffnc — cumulative distribution function non-central f-distribution
  • cdfgam — cumulative distribution function gamma distribution
  • cdfnor — cumulative distribution function normal distribution
  • cdfpoi — cumulative distribution function poisson distribution
  • cdft — cumulative distribution function Student's T distribution
Report an issue
<< cdfgam cdf cdfnor >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:58:37 CET 2018