<< distfun_gamrnd Gamma Geometric >>

distfun >> distfun > 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 matrix of doubles, the shape parameter, a>0.

b :

a matrix of doubles, the scale parameter, b>0.

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

\begin{eqnarray}
M &=& a b \\
V &=& a b^2
\end{eqnarray}

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 = 7:12;
[M,V] = distfun_gamstat ( a , b )
me = [..
7
16
27
40
55
72
]'
ve = [..
49
128
243
400
605
864
]'

Authors


Report an issue
<< distfun_gamrnd Gamma Geometric >>