Probability Distribution Function and Shape

The F Distribution

The F distribution was originally derived as the ratio of two independent variables with [Maple Math] 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] ) distribution if and only if its probability density is given by

[Maple Math] for x > 0

f ( x ) =

0 elsewhere

where [Maple Math] are the degrees of freedom. [Maple Math] are positive integers.

The following code will draw the density function for the F( [Maple Math] ) distribution for [Maple Math] and [Maple Math] =10, but you are encouraged to try other values of [Maple Math] .

> restart:

> with(plots):

> nu[1]:=7; nu[2]:=10;

[Maple Math]

[Maple Math]

> f:=x->FPDF(nu[1],nu[2],x);

[Maple Math]

> plot(f(x),x=0..10, title="PDF for F(7,10)");

>

[Maple Plot]

To see the effect of [Maple Math] on the shape of the F( [Maple Math] ) distribution, the following animation will draw a series of probability density functions as [Maple Math] varies from 1 to 21 by increments of 1 while holding [Maple Math] constant at 10.

> nu[1]:=1; nu[2]:=10;

[Maple Math]

[Maple Math]

> 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]

This next bit of code will animate a F( [Maple Math] ) with a dynamic [Maple Math] , holding [Maple Math] constant at 7. [Maple Math] will vary from 1 to 21 at intervals of 1.

> nu[1]:=7; nu[2]:=1;

[Maple Math]

[Maple Math]

> 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]

>