Probability Distribution Function and Shape
The F Distribution
The F distribution was originally derived as the ratio of two independent variables with 
![[Maple Math]](images/F1.gif) distributions, each divided by its respective degrees of freedom, which is why the parameters of the F distribution are called degrees of freedom as well.  The F distribution often arises in the comparison of the variances of two normal populations.  The F distribution is also known as the variance-ratio distribution.
 distributions, each divided by its respective degrees of freedom, which is why the parameters of the F distribution are called degrees of freedom as well.  The F distribution often arises in the comparison of the variances of two normal populations.  The F distribution is also known as the variance-ratio distribution.
A random variable has a F(
![[Maple Math]](images/F2.gif) ) distribution if and only if its probability density is given by
) distribution if and only if its probability density is given by
                  
![[Maple Math]](images/F3.gif) for 
x 
> 0
 for 
x 
> 0 
f ( x ) =
0 elsewhere
where 
![[Maple Math]](images/F4.gif) are the degrees of freedom.
 are the degrees of freedom.  
![[Maple Math]](images/F5.gif) are positive integers.
 are positive integers.
The following code will draw the density function for the F(
![[Maple Math]](images/F6.gif) ) distribution for
) distribution for 
![[Maple Math]](images/F7.gif) and
and 
![[Maple Math]](images/F8.gif) =10, but you are encouraged to try other values of
=10, but you are encouraged to try other values of  
![[Maple Math]](images/F9.gif) .
.  
> restart:
> with(plots):
> nu[1]:=7; nu[2]:=10;
![[Maple Math]](images/F10.gif) 
![[Maple Math]](images/F11.gif) 
> f:=x->FPDF(nu[1],nu[2],x);
![[Maple Math]](images/F12.gif) 
> plot(f(x),x=0..10, title="PDF for F(7,10)");
>
![[Maple Plot]](images/F13.gif) 
To see the effect of 
![[Maple Math]](images/F14.gif) on the shape of the F(
 on the shape of the F(
![[Maple Math]](images/F15.gif) ) distribution, the following animation will draw a series of probability density functions as
) distribution, the following animation will draw a series of probability density functions as 
![[Maple Math]](images/F16.gif) varies from 1 to 21 by increments of 1 while holding
 varies from 1 to 21 by increments of 1 while holding 
![[Maple Math]](images/F17.gif) constant at 10.
 constant at 10.  
> nu[1]:=1; nu[2]:=10;
![[Maple Math]](images/F18.gif) 
![[Maple Math]](images/F19.gif) 
> for n from 0 to 20 do
> density[n]:=plot(FPDF(nu[1]+n,nu[2],x),x=0..7):
> num:=convert(nu[1]+n,string):
> tracker[n]:=textplot([5,0.6,`nu[1] is `.num],color=blue):
> P[n]:=display({density[n],tracker[n]}):
> od:
> display([seq(P[n], n=0..20)], insequence=true, title="nu[1] is increasing");
>
![[Maple Plot]](images/F20.gif) 
This next bit of code will animate a F(
![[Maple Math]](images/F21.gif) ) with a dynamic
) with a dynamic 
![[Maple Math]](images/F22.gif) , holding
, holding 
![[Maple Math]](images/F23.gif) constant at 7.
 constant at 7.  
![[Maple Math]](images/F24.gif) will vary from 1 to 21 at intervals of 1.
 will vary from 1 to 21 at intervals of 1.  
> nu[1]:=7; nu[2]:=1;
![[Maple Math]](images/F25.gif) 
![[Maple Math]](images/F26.gif) 
> for n from 0 to 20 do
> density[n]:=plot(FPDF(nu[1],nu[2]+n,x),x=0..7):
> num:=convert(nu[2]+n,string):
> tracker[n]:=textplot([5,0.4,`nu[2] is `.num],color=blue):
> P[n]:=display({density[n],tracker[n]}):
> od:
> display([seq(P[n], n=0..20)], insequence=true,title="nu[2] is increasing");
![[Maple Plot]](images/F27.gif) 
>