<< distfun_ncx2rnd Noncentral Chi-Squared Normal >>

distfun >> distfun > Noncentral Chi-Squared > distfun_ncx2stat

distfun_ncx2stat

Noncentral Chi-Squared mean and variance

Calling Sequence

M = distfun_ncx2stat(k,delta)
[M,V] = distfun_ncx2stat(k,delta)

Parameters

k :

a matrix of doubles, the number of degrees of freedom, k>0 (can be non integer)

delta :

a matrix of doubles, the noncentrality parameter, delta>=0

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the Noncentral Chi-Squared distribution.

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

The Mean and Variance of the Geometric Distribution are

\begin{eqnarray}
M &=& k \\
V &=& 2k
\end{eqnarray}

Examples

// Test with expanded k
[m,v] = distfun_ncx2stat((1:6))
me = [ 1 2 3 4 5 6];
ve = [ 2 4 6 8 10 12];

//Accuracy test
k=[3 6 9];
[M,V] = distfun_ncx2stat ( k )
ve= [6 12 18];
me = [3 6 9];

Bibliography

http://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution

Authors


Report an issue
<< distfun_ncx2rnd Noncentral Chi-Squared Normal >>