| Statistics Toolbox | ![]() |
Negative binomial cumulative distribution function.
Syntax
Y = nbincdf(X,R,P)
Description
Y computes the negative binomial cdf at each of the values in = nbincdf(X,R,P)
X using the corresponding parameters in R and P. Vector or matrix inputs for X, R, and P must have the same size, which is also the size of Y. A scalar input for X, R, or P is expanded to a constant matrix with the same dimensions as the other inputs.
The motivation for the negative binomial is the case of successive trials, each having a constant probability P of success. What you want to find out is how many extra trials you must do to observe a given number R of successes.
Example
x = (0:15); p = nbincdf(x,3,0.5); stairs(x,p)
See Also
cdf, nbininv, nbinpdf, nbinrnd, nbinstat
| nansum | nbininv | ![]() |