Statistics 5102 (Geyer, Spring 2003) F tests in R

Contents

R Functions for F Distributions

This is a very short page. Like other brand name distributions, the F distribution has its set of functions that handle probability look-up

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.

P-Value Look-Up

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

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.

Critical Value Look-Up

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

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.

Other Functions that Do F Tests

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.