Noncentral F-distribution

In probability theory and statistics, the noncentral F-distribution is a continuous probability distribution that is a generalization of the (ordinary) F-distribution. It describes the distribution of the quotient (X/n1)/(Y/n2), where the numerator X has a noncentral chi-square distribution with n1 degrees of freedom and the denominator Y has a central chi-square distribution n2 degrees of freedom. It is also required that X and Y are statistically independent of each other.

It is the distribution of the test statistic in analysis of variance problems when the null hypothesis is false. One uses the noncentral F-distribution to find the power function of such a test.

Occurrence and Specification of the Noncentral F-distribution
If $$X$$ is a noncentral chi-square random variable with noncentrality parameter $$\lambda$$ and $$\nu_1$$ degrees of freedom, and $$Y$$ is a chi-square random variable with $$\nu_2$$ degrees of freedom that's statistically independent of $$X$$, then

F=\frac{X/\nu_1}{Y/\nu_2} $$ is a noncentral F-distributed random variable. The probability density function for the noncentral F-distribution is

p(f) =\sum\limits_{k=0}^\infty\frac{e^{-\lambda/2}(\lambda/2)^k}{ B\left(\frac{\nu_2}{2},\frac{\nu_1}{2}+k\right) k!} \left(\frac{\nu_1}{\nu_2}\right)^{\frac{\nu_1}{2}+k} \left(\frac{\nu_2}{\nu_2+\nu_1f}\right)^{\frac{\nu_1+\nu_2}{2}+k}f^{\nu_1/2-1+k} $$ when $$f\ge0$$ and zero otherwise. The degrees of freedom $$\nu_1$$ and $$\nu_2$$ are positive. The noncentrailty parameter $$\lambda$$ is nonnegative. The term $$B(x,y)$$ is the beta function, where

B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}. $$

The mean and variance of the noncentral F-distribution are

\mbox{E}\left[F\right]= \begin{cases} \frac{\nu_2(\nu_1+\lambda)}{\nu_1(\nu_2-2)} &\nu_2>2\\ \mbox{Does not exist} &\nu_2\le2\\ \end{cases} $$ and

\mbox{Var}\left[F\right]= \begin{cases} 2\frac{(\nu_1+\lambda)^2+(\nu_1+2\lambda)(\nu_2-2)}{(\nu_2-2)^2(\nu_2-4)}\left(\frac{\nu_2}{\nu_1}\right)^2 &\nu_2>4\\ \mbox{Does not exist} &\nu_2\le4\\ \end{cases}. $$

Special cases
When $$ \lambda=0 $$, the noncentral F-distribution becomes the F-distribution.

Related distributions
$$ Z $$ has a noncentral chi-square distribution if $$ Z=\lim_{\nu_2\to\infty}\nu_1F $$ where $$ F $$ has a noncentral F-distribution.

Implementations
The noncentral F-distribution is implemented in the R programming language (e.g., pf function), in MATLAB (ncfcdf, ncfinv, ncfpdf, ncfrnd and ncfstat functions in the statistics toolbox) and in Mathematica (NoncentralFRatioDistribution function).