Tutorials › Introduction to Statistics › F Distributions and Their Degrees of Freedom

One-Way ANOVA · Tutorial 858 of 996

F Distributions and Their Degrees of Freedom

Learn to match one-way ANOVA degrees of freedom to the correct F distribution and find the critical value for a chosen significance level.

Intermediate 10 min read

What You'll Learn

  • Define an F distribution using two independent chi-square random variables.
  • Identify numerator and denominator degrees of freedom in one-way ANOVA.
  • Find an upper-tail F critical value using a table or software.
  • Interpret the significance level as an upper-tail probability.
  • Compare an observed ANOVA F statistic with its critical value.
  • Avoid reversing the numerator and denominator degrees of freedom.

Why the F Distribution Has Two Degrees of Freedom

In one-way ANOVA, the F statistic compares variation among the group means with variation within the groups. Under the null hypothesis that all population group means are equal, and under the ANOVA model assumptions, this ratio follows an F distribution. The distribution is not one fixed curve: its shape depends on two degrees of freedom, one for the numerator and one for the denominator.

Knowing which degrees of freedom go where is essential. They determine the reference distribution used to find a critical value or a p-value. The same numerical F statistic can therefore have different evidence against the null hypothesis when its degrees of freedom differ.

Definition: Let \(U\) and \(V\) be independent chi-square random variables with \(df_1\) and \(df_2\) degrees of freedom, respectively. The random variable $$ F=\frac{U/df_1}{V/df_2} $$ has an F distribution with numerator degrees of freedom \(df_1\) and denominator degrees of freedom \(df_2\), written \(F_{df_1,df_2}\). An F random variable is nonnegative. Its distribution is generally right-skewed, and its shape depends on both degrees of freedom.

The order in the notation matters: \(df_1\) belongs to the numerator and \(df_2\) belongs to the denominator. The F distribution is not symmetric, so switching these values generally changes the distribution and its critical values.

Degrees of Freedom in One-Way ANOVA

Suppose a one-way ANOVA compares \(k\) groups with a total of \(N\) observations. The between-group mean square has \(k-1\) degrees of freedom, and the within-group mean square has \(N-k\) degrees of freedom. Since the F statistic divides the between-group mean square by the within-group mean square, those become the numerator and denominator degrees of freedom, respectively.

Key result: For a one-way ANOVA with \(k\) groups and \(N\) total observations, $$ df_1=k-1 \qquad \text{and} \qquad df_2=N-k. $$ Thus the ANOVA F statistic is compared with an \(F_{k-1,N-k}\) distribution under the null hypothesis.

The group sizes do not need to be equal for these degrees of freedom. The numerator depends on the number of groups, and the denominator depends on the total number of observations and the number of groups. For example, if the sample sizes are 5, 8, and 7, then \(k=3\) and \(N=20\), regardless of the unequal group sizes.

Why the ANOVA F Statistic Has This Distribution

The distributional result follows from the ANOVA model. Assume that observations are independent, that outcomes within each group are normally distributed, and that the groups share a common population variance \(\sigma^2\). Under the null hypothesis \(H_0\), all group means are equal. Under these assumptions, the between-group and within-group sums of squares, each divided by \(\sigma^2\), have independent chi-square distributions with \(k-1\) and \(N-k\) degrees of freedom.

Dividing each sum of squares by its degrees of freedom gives the corresponding mean square. The common variance \(\sigma^2\) cancels in their ratio. This yields the F distribution result:

$$ \frac{MS_{\text{between}}}{MS_{\text{within}}} = \frac{\left(SS_{\text{between}}/\sigma^2\right)/(k-1)} {\left(SS_{\text{within}}/\sigma^2\right)/(N-k)} \sim F_{k-1,N-k} \quad \text{under } H_0. $$

This derivation explains why the two degrees of freedom are not interchangeable: they come from two different sources of variation, and each is attached to its own mean square. The model assumptions matter too. The stated F distribution is the exact null distribution when the assumptions hold; it is not a guarantee that every ratio of two mean squares follows this distribution in every setting.

Upper-Tail Critical Values

ANOVA uses large values of \(F\) as evidence against \(H_0\): a large ratio means the between-group variation is large relative to the within-group variation. The relevant critical value is therefore an upper-tail cutoff. For a chosen significance level \(\alpha\), the critical value \(F_{\alpha;df_1,df_2}\) is defined by

$$ P\!\left(F_{df_1,df_2}>F_{\alpha;df_1,df_2}\right)=\alpha. $$

A value in the uppermost \(\alpha\) portion of the null distribution is at least as large as the critical value. A table may label its columns by upper-tail probabilities, or it may label them by cumulative probabilities. Check the table’s convention before selecting an entry. In software, request the quantile with cumulative probability \(1-\alpha\); this returns the point with probability \(1-\alpha\) to its left.

1
Find the ANOVA degrees of freedom.
For \(k\) groups and \(N\) observations, calculate \(df_1=k-1\) and \(df_2=N-k\).
2
Choose the significance level.
Use the specified \(\alpha\), such as 0.05 or 0.01.
3
Locate the upper-tail cutoff.
Use \(df_1\), \(df_2\), and \(\alpha\) to read the table or request the \(1-\alpha\) quantile from software.
4
Compare the observed statistic with the cutoff.
If \(F_{\text{observed}}>F_{\alpha;df_1,df_2}\), reject \(H_0\) at significance level \(\alpha\). Otherwise, do not reject \(H_0\) at that level.

Worked Examples

Worked Example: Finding the Cutoff for Four Groups

A hypothetical experiment compares the mean response in four treatment groups, with six observations in each group. The ANOVA assumptions are taken to be reasonable for this example: observations are independent, group outcomes are approximately normal, and their population variances are equal. Find the upper-tail critical value at \(\alpha=0.05\). If the computed ANOVA statistic is \(F=3.42\), determine the decision.

There are \(k=4\) groups and \(N=4(6)=24\) observations. Therefore,

$$ df_1=k-1=4-1=3, \qquad df_2=N-k=24-4=20. $$

The relevant distribution is \(F_{3,20}\), not \(F_{20,3}\). A table or software gives the upper-tail 5% critical value as approximately \(F_{0.05;3,20}=3.098\). Since

$$ F_{\text{observed}}=3.42>3.098=F_{0.05;3,20}, $$

the statistic lies in the upper 5% rejection region. Reject \(H_0\) at the 0.05 significance level. In this hypothetical experiment, the data provide evidence that not all four population mean responses are equal. This conclusion does not identify which means differ.

Worked Example: Unequal Group Sizes

A hypothetical study compares three exercise programs. The groups contain 5, 8, and 7 participants, for a total of 20. Assume for this example that observations are independent, outcomes within each program are approximately normal, and the population variances are equal. Find the critical value for an upper-tail test at \(\alpha=0.05\).

First count the groups and all observations:

$$ k=3,\qquad N=5+8+7=20. $$

The numerator and denominator degrees of freedom are

$$ df_1=k-1=3-1=2, \qquad df_2=N-k=20-3=17. $$

Thus the correct reference distribution is \(F_{2,17}\). An upper-tail F table or software gives \(F_{0.05;2,17}\approx 3.592\). Unequal group sizes do not change the formulas: the denominator degrees of freedom use the total \(N\), not an average group size. If a hypothetical observed statistic were \(F=3.20\), then \(3.20<3.592\), so it would not fall in the 5% rejection region. The decision would be not to reject \(H_0\) at \(\alpha=0.05\).

Worked Example: Using a More Stringent Significance Level

A hypothetical comparison of five laboratory methods has \(N=25\) independent measurements in total. Suppose the group outcomes are normally distributed with a common variance, and the measurements are independent. Find the upper-tail critical value for \(\alpha=0.01\). A calculated statistic is \(F=4.60\).

With \(k=5\) methods,

$$ df_1=5-1=4, \qquad df_2=25-5=20. $$

The desired cutoff is the upper 1% point of \(F_{4,20}\). A table or software gives \(F_{0.01;4,20}\approx 4.431\). The comparison is

$$ 4.60>4.431. $$

Therefore, reject \(H_0\) at the 0.01 significance level. Under the model, the observed statistic is in the most extreme 1% of the null F distribution. The significance level describes the rejection rule under \(H_0\); it is not the probability that \(H_0\) is true.

A Short Justification for the Upper-Tail Rule

The upper-tail rule follows from the definition of the F statistic and the hypothesis being tested. When group means are equal, the between-group mean square and within-group mean square both estimate the common variance, so their ratio is typically near 1. If the group means are not all equal, the between-group mean square tends to increase relative to the within-group mean square. That makes unusually large ratios relevant to the one-way ANOVA alternative.

The critical value is chosen so that, when \(H_0\) and the model assumptions hold, the probability that the statistic exceeds it is \(\alpha\). Thus, comparing the observed statistic with the critical value implements a test with the stated Type I error rate: across repeated studies under \(H_0\), the probability of rejecting \(H_0\) is \(\alpha\).

Common Mistake: Reversing the Degrees of Freedom

A common error is to put \(N-k\) in the numerator position and \(k-1\) in the denominator position because the within-group mean square often appears beneath the fraction bar. But the numerator degrees of freedom must match the numerator mean square, and the denominator degrees of freedom must match the denominator mean square. For the ANOVA ratio \(MS_{\text{between}}/MS_{\text{within}}\), the correct order is \(k-1\) followed by \(N-k\).

Another mistake is to use a lower-tail cutoff. The alternative in one-way ANOVA is that the group means are not all equal, and the test statistic becomes evidence against \(H_0\) when it is large. The rejection region is therefore in the upper tail. Also, do not assume that the critical value is 1: although the ratio is often near 1 under the null, its upper-tail cutoff depends on \(\alpha\) and both degrees of freedom.

Key takeaway: For a one-way ANOVA with \(k\) groups and \(N\) observations, use \(df_1=k-1\) for the between-group numerator and \(df_2=N-k\) for the within-group denominator. Find the upper-tail critical value for those degrees of freedom and the chosen \(\alpha\), then compare the observed F statistic with that cutoff.

Check Your Understanding

Try these questions without looking back.

  1. A one-way ANOVA compares four groups with 28 observations in total. What are the numerator and denominator degrees of freedom?
  2. In \(F_{5,18}\), which degree of freedom belongs to the numerator? What does the other degree of freedom describe in an ANOVA?
  3. Why is a one-way ANOVA critical value chosen from the upper tail of the F distribution?
  4. For an upper-tail test with \(\alpha=0.05\), should software return the 0.05 or the 0.95 cumulative quantile? Explain.
  5. A test uses \(df_1=2\), \(df_2=17\), and has critical value 3.592. If the observed statistic is 3.20, what is the decision at the stated significance level?