Chapter 13 · OpenStax Ch 13
F Distribution and One-Way ANOVA
Comparing several group means at once by weighing between-group against within-group variation.
13.1 The idea of ANOVA
Comparing two means took one \(t\) test. Three or more takes a single test on all of them. The question becomes whether the group means sit further apart than the scatter inside the groups can explain. Analysis of variance answers it with a ratio of two averaged squared distances,
\[F = \frac{MS_{\text{between}}}{MS_{\text{within}}}, \qquad MS_{\text{between}} = \frac{\sum n_j (\bar{x}_j - \bar{x})^2}{k - 1}, \qquad MS_{\text{within}} = \frac{\sum (x_{ij} - \bar{x}_j)^2}{n - k}.\]
The top measures how far the group means sit from the grand mean. The bottom measures how far the points sit from their own group's mean. Drag the means apart and the top bar grows while the bottom stays put, so \(F\) climbs. Widen the groups instead and the bottom bar grows, so the same gaps stop being impressive. Neither quantity means anything alone.
Reading: OpenStax Introductory Statistics, Sections 13.1, 13.2.
Try it
- Three groups sit in three lanes. Each handle is that group's mean.
- Drag a handle, or focus it and use the arrow keys. Between groups, MS changes and Within groups, MS does not.
- Press Spread the means apart. F rises and the p-value falls.
- Slide Spread within each group, s to 5. Now within-group MS rises and F falls, with the means untouched.
- Press Pull the means together. F drops toward 1. The lower chart compares the two mean squares directly.
13.2 The F distribution and the decision
When every group really does come from the same distribution, \(F\) still varies from study to study. Its values follow the F distribution with \(k - 1\) and \(n - k\) degrees of freedom.1 Leave the gap at zero and run study after study. The bars fill the orange curve, and about one study in twenty lands beyond the critical value even though nothing separates the groups. That is the 5 % significance level in action. Give the means a real gap and the whole pile slides right, past the line, more often as \(n\) grows. The test is one-tailed by construction, because only a large \(F\) is evidence against equal means.
1 The F distribution is right-skewed and never negative, being a ratio of two variances. Reading: OpenStax Introductory Statistics, Sections 13.2, 13.3.
Try it
- True gap between neighbouring means is 0, so all three groups share a mean.
- Press Run one study. Fresh data are drawn and This study's F is marked on the curve.
- Press Run 200. The F values pile under the curve and about 5% pass Critical F at 5 %.
- Slide the gap to 2 and press Run 200 again. Most studies now pass the critical value. Rejected H₀ over Studies is the power.
- Slide Observations per group, n to 30. The critical F falls and power rises further.