Statistics Toolbox    
betastat

Mean and variance for the beta distribution

Syntax

Description

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

The mean of the beta distribution with parameters a and b is and the variance is

Examples

If parameters a and b are equal, the mean is 1/2.

See Also

betacdf, betafit, betainv, betalike, betapdf, betarnd


  betarnd binocdf