Sample Probability Calculations
We can calculate probabilities for the F( ) distribution using either the probability distribution function (PDF) or the cumulative distribution function (CDF). We will denote the PDF by f and the CDF by F . The CDF for the F(7,10) appears below, but you are encouraged to try other values of and .
> restart: with(plots):
> nu[1]:=7: nu[2]:=10:
> plot(FCDF(nu[1],nu[2],x),x=0..4, title="CDF for F(7,10)");
> f:=x->FPDF(nu[1],nu[2],x);
> F:=x->FCDF(nu[1],nu[2],x);
> a:=plot(f(x),x=0..10):
> b:=plot(f(x),x=0..2,color=yellow,filled=true):
> display([a,b]);
Find the value of the yellow shaded area, the area under the F(7,10) density curve to the left of 2.
> evalf(F(2));
The value of this area can also be found by using the integration command.
> evalf(int(f(x),x=0..2));
> a:=plot(f(x),x=0..10):
> b:=plot(f(x),x=1..4,color=yellow,filled=true):
> display([a,b]);
Find the value of the yellow shaded area, the area under the F(7,10) density curve between 1 and 4.
Using the CDF, we find the area to the left of 4 and then subtract the area to the left of 1.
> area1:=F(4);
> area2:=F(1);
> area_between:=area1-area2;
Using the integration command, we can also integrate the FPDF from 1 to 4.
> evalf(int(f(x),x=1..4));
> a:=plot(f(x),x=0..10,labels=[" "," "]):
> b:=plot(f(x),x=1.5..10,color=yellow,filled=true,labels=[" "," "]):
> c:=textplot([1.5,-.04,"x"],color=blue):
> d:=textplot([2,0.08,".25"],color=black):
> display([a,b,c,d]);
Find the value of x . x is known as the third quartile for the F(7, 10) distribution.
> fsolve(F(x)=.75,x);
>