Compute mean and variance of the negative binomial distribution.
n and p must be of common size or one of them must be scalar
n = 1:4; p = 0.2:0.2:0.8; [m, v] = nbinstat (n, p)
[m, v] = nbinstat (n, 0.5)
Package: statistics