Negative Binomial mean and variance
M = distfun_nbinstat(R,P) [M,V] = distfun_nbinstat(R,P)
a matrix of doubles, the number of successes. R belongs to the set {0,1,2,3,4,.......}
a matrix of doubles, the probability of getting success in a Bernoulli trial. P in [0,1].
a matrix of doubles, the mean
a matrix of doubles, the variance
Computes statistics from the Negative Binomial distribution.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
The Mean and Variance of the Negative Binomial Distribution is:
http://en.wikipedia.org/wiki/Negative_binomial_distribution