*F* mean and variance

`[M,V] = fstat(V1,V2)`

`[M,V] = fstat(V1,V2)`

returns
the mean of and variance for the *F* distribution
with numerator degrees of freedom `V1`

and denominator
degrees of freedom `V2`

. `V1`

and `V2`

can
be vectors, matrices, or multidimensional arrays that all have the
same size, which is also the size of `M`

and `V`

.
A scalar input for `V1`

or `V2`

is
expanded to a constant arrays with the same dimensions as the other
input.

The mean of the *F* distribution for values
of *ν*_{2} greater than
2 is

$$\frac{{\nu}_{2}}{{\nu}_{2}-2}$$

The variance of the *F* distribution for values
of *ν*_{2} greater than
4 is

$$\frac{2{\nu}_{2}^{2}({\nu}_{1}+{\nu}_{2}-2)}{{\nu}_{1}{({\nu}_{2}-2)}^{2}({\nu}_{2}-4)}$$

The mean of the *F* distribution is undefined
if *ν*_{2} is less than
3. The variance is undefined for *ν*_{2} less
than 5.

`fstat`

returns `NaN`

when
the mean and variance are undefined.

[m,v] = fstat(1:5,1:5) m = NaN NaN 3.0000 2.0000 1.6667 v = NaN NaN NaN NaN 8.8889

Was this topic helpful?