Statistics Toolbox    
nbinpdf

Negative binomial probability density function.

Syntax

Description

Y = nbinpdf(X,R,P) returns the negative binomial pdf at each of the values in 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. Note that the density function is zero unless the values in X are integers.

The negative binomial pdf is

The negative binomial pdf models consecutive trials, each having a constant probability P of success. The parameter R is the number of successes required before stopping.

Example

See Also
nbincdf, nbininv, nbinrnd, nbinstat, pdf


 nbininv nbinrnd