Statistics Toolbox    
nbinstat

Mean and variance of the negative binomial distribution.

Syntax

Description

[M,V] = nbinstat(R,P) returns the mean and variance of the negative binomial distribution with parameters R and P. Vector or matrix inputs for R and P must have the same size, which is also the size of M and V. A scalar input for R or P is expanded to a constant matrix with the same dimensions as the other input.

The mean of the negative binomial distribution with parameters r and p is rq/p, where q = 1-p. The variance is rq/p2.

Example

See Also
nbincdf, nbininv, nbinpdf, nbinrnd


 nbinrnd ncfcdf