<< distfun_betarnd Beta Exponential >>

Distribution Functions >> Beta > distfun_betastat

distfun_betastat

Beta mean and variance

Calling Sequence

M = distfun_betastat ( a , b )
[M,V] = distfun_betastat ( a , b )

Parameters

a :

a 1x1 or nxm matrix of doubles, the first shape parameter. Should be positive.

b :

a 1x1 or nxm matrix of doubles, the first shape parameter. Should be positive.

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the Beta distribution.

The mean and variance of the Beta distribution are

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

Examples

a = 1:6;
b = (1:6)^-1;
[M,V] = distfun_betastat ( a , b )
me = [..
0.5 ..
0.8 ..
0.9 ..
0.9411765..
0.9615385..
0.9729730..
]';
ve = [..
0.0833333..
0.0457143..
0.0207692..
0.0105454..
0.0059649..
0.0036693..
]';

Authors

<< distfun_betarnd Beta Exponential >>