<< distfun_logurnd LogUniform Multinomial >>

distfun >> distfun > LogUniform > distfun_logustat

distfun_logustat

LogUniform mean and variance

Calling Sequence

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

Parameters

a:

a matrix of doubles, the minimum of the underlying uniform variable.

b:

a matrix of doubles, the maximum of the underlying uniform variable. b>a.

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the LogUniform distribution.

The mean and variance of the LogUniform distribution are

\begin{eqnarray}
M&=&\frac{\exp(b)-\exp(a)}{b-a} \\
V&=&\frac{1}{2} \frac{\exp(b)^2-\exp(a)^2}{b-a}-M^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 = 2:7;
[M,V]=distfun_logustat(a,b)

// Check random samples
R=distfun_logurnd(10000,1,3,5);
[mean(R),M]
[variance(R),V]

Authors


Report an issue
<< distfun_logurnd LogUniform Multinomial >>