<< distfun_gamrnd Gamma LogNormal >>

Distribution Functions >> Gamma > distfun_gamstat

distfun_gamstat

Gamma mean and variance

Calling Sequence

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

Parameters

a :

a 1x1 or nxm matrix of doubles, the shape parameter, greater or equal to zero

b :

a 1x1 or nxm matrix of doubles, the scale parameter, greater or equal to zero

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the Gamma distribution.

The mean and variance of the Gamma distribution are

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

Notice that b, the scale, is the inverse of the rate. Other computing languages (including R), use 1/b as the second parameter of the Gamma distribution.

Examples

a = 1:6;
b = 7:12;
[M,V] = distfun_gamstat ( a , b )
me = [..
7
16
27
40
55
72
]';
ve = [..
49
128
243
400
605
864
]';

Authors

<< distfun_gamrnd Gamma LogNormal >>