Statistics Toolbox    
binostat

Mean and variance for the binomial distribution

Syntax

Description

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

The mean of the binomial distribution with parameters n and p is np. The variance is npq, where q = 1-p.

Examples

See Also

binocdf, binofit, binoinv, binopdf, binornd


  binornd bootstrp