<< distfun_frnd F Gamma >>

Distfun >> Distfun > F > distfun_fstat

distfun_fstat

F-Distribution mean and variance

Calling Sequence

M = distfun_fstat(v1,v2)
[M,V] = distfun_fstat(v1,v2)

Parameters

v1 :

a matrix of doubles, numerator degrees of freedom, v1>0 (can be non integer).

v2 :

a matrix of doubles, denominator degrees of freedom, v2>0 (can be non integer).

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the F-distribution.

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

The mean of the F distribution is

if v2>0, and M is set to %nan otherwise.

The variance of the F distribution is

if v2>4, and V is set to %nan otherwise.

Examples

// Test with scalar v1 and v2
[M,V] = distfun_fstat(7,5)
Me = 1.666666666666666741D+00
Ve = 7.936507936507936734D+00

// Test with expanded v1 and v2
[M,V] = distfun_fstat(1:5,1:5)
Me = [%nan  %nan  3.0000  2.0000  1.6667]
Ve = [%nan  %nan  %nan  %nan  8.8889]

Bibliography

http://en.wikipedia.org/wiki/F-distribution

Authors


Report an issue
<< distfun_frnd F Gamma >>