Probability Distribution Function and Shape
The F Distribution
The F distribution was originally derived as the ratio of two independent variables with 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( ) distribution if and only if its probability density is given by
for x > 0
f ( x ) =
0 elsewhere
where are the degrees of freedom. are positive integers.
The following code will draw the density function for the F( ) distribution for and =10, but you are encouraged to try other values of .
> restart:
> with(plots):
> nu[1]:=7; nu[2]:=10;
> f:=x->FPDF(nu[1],nu[2],x);
> plot(f(x),x=0..10, title="PDF for F(7,10)");
>
To see the effect of on the shape of the F( ) distribution, the following animation will draw a series of probability density functions as varies from 1 to 21 by increments of 1 while holding constant at 10.
> nu[1]:=1; nu[2]:=10;
> 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");
>
This next bit of code will animate a F( ) with a dynamic , holding constant at 7. will vary from 1 to 21 at intervals of 1.
> nu[1]:=7; nu[2]:=1;
> 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");
>