This is a very short page. Like other brand name distributions, the F distribution has its set of functions that handle probability look-up
pf
does the cumulative distribution function
(c. d. f.),
the p
standing for probability.
qf
does the the inverse c. d. f,
the q
standing for quantile.
df
does the probability density function
(p. d. f.),
the d
standing for density.
rf
generates random variates having the F distribution,
the r
standing for random.
Similar functions for other distributions and the general use of such functions is explained on the web page about probability distributions in R.
Here we just cover two simple uses.
Given an observed value of a test statistic tobs
that is supposed
(under the null hypothesis) to be F distributed with df1
numerator
degrees of freedom and df2
denominator degrees of freedom,
the P-value for
pf(tobs, df1, df2)
1 - pf(tobs, df1, df2)
plow <- pf(tobs, df1, df2) 2 * min(plow, 1 - plow)
In example 8.7.2 in DeGroot and Schervish, the (obviously made up)
observed
value of the test statistic
(they call it V) is 3.0,
the numerator degrees of freedom is 5,
and the denominator degrees of freedom is 20.
The following R statement does the (upper-tailed) look-up
And the result 0.03520134
agrees with that given
by the book.
The critical value or values corresponding to a significance
level alpha
for an F distribution
with df1
numerator
degrees of freedom and df2
denominator degrees of freedom
for
qf(alpha, df1, df2)
qf(1 - alpha, df1, df2)
qf(c(alpha / 2, 1 - alpha / 2), df1, df2)
In example 8.7.3 in DeGroot and Schervish, the following R statement does the look-up
And the results 0.4483698
and 2.2303021
agree with those given by the book.
The R function var.test
(
on-line help) does the F test for equality of variances
described in Section 8.7 in DeGroot and Schervish.
However, we won't give any examples because
This test is so non-robust, so critically dependent on exact normality of the population distributions, as to be practically worthless.
We needed to do this section in the book for pedigogical reasons. The F distribution is very important. This is where the book introduces the F distribution. So we cover it. But the only point of this section is to introduce the F distribution. Don't take the examples seriously.
The R functions aov
(
on-line help)
and anova
(
on-line help)
do analysis of variance, which is the primary practical
use of the F distribution (and why we learn about it). This is described
in Sections 10.5 and Section&10.6 in DeGroot and Schervish.