<< distfun_chi2rnd Chi-Squared Extreme Value >>

Distfun >> Distfun > Chi-Squared > distfun_chi2stat

distfun_chi2stat

Chi-Squared mean and variance

Calling Sequence

M = distfun_chi2stat(k)
[M,V] = distfun_chi2stat(k)

Parameters

k :

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

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the 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

Examples

// Test with expanded k
[m,v] = distfun_chi2stat((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_chi2stat ( k )
ve= [6 12 18];
me = [3 6 9];

Bibliography

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

Authors


Report an issue
<< distfun_chi2rnd Chi-Squared Extreme Value >>