## F Distribution

### Definition

The pdf for the F distribution is

`$y=f\left(x|{\nu }_{1},{\nu }_{2}\right)=\frac{\Gamma \left[\frac{\left({\nu }_{1}+{\nu }_{2}\right)}{2}\right]}{\Gamma \left(\frac{{\nu }_{1}}{2}\right)\Gamma \left(\frac{{\nu }_{2}}{2}\right)}{\left(\frac{{\nu }_{1}}{{\nu }_{2}}\right)}^{\frac{{\nu }_{1}}{2}}\frac{{x}^{\frac{{\nu }_{1}-2}{2}}}{{\left[1+\left(\frac{{\nu }_{1}}{{\nu }_{2}}\right)x\right]}^{\frac{{\nu }_{1}+{\nu }_{2}}{2}}}$`

where Γ( · ) is the Gamma function.

### Background

The F distribution has a natural relationship with the chi-square distribution. If χ1 and χ2 are both chi-square with ν1 and ν2 degrees of freedom respectively, then the statistic F below is F-distributed.

`$F\left({\nu }_{1},{\nu }_{2}\right)=\frac{{\chi }_{1}}{{\nu }_{1}}}{{\chi }_{2}}{{\nu }_{2}}}$`

The two parameters, ν1 and ν2, are the numerator and denominator degrees of freedom. That is, ν1 and ν2 are the number of independent pieces of information used to calculate χ1 and χ2, respectively.

### Examples

#### Compute the F Distribution pdf

Compute the pdf of an F distribution with 5 numerator degrees of freedom and 3 denominator degrees of freedom.

```x = 0:0.01:10; y = fpdf(x,5,3);```

Plot the pdf.

```figure; plot(x,y)``` The plot shows that the F distribution exists on positive real numbers and is skewed to the right.