One-Way ANOVA
Learn how to compare three or more group means using the \( F \)-test to determine if observed differences are statistically significant or simply due to chance.
Why Do We Need ANOVA?
Imagine testing whether three different fertilizers lead to different plant heights. You could run multiple \( t \)-tests (Group 1 vs 2, 1 vs 3, 2 vs 3), but each test has a chance of a Type I error. The more tests you run, the more likely you get a false positive.
Key Terms to Know
Visualizing Group Means
ANOVA asks: are these group means far enough apart relative to the spread within each group to conclude a real difference exists?
The Hypotheses
The \( F \)-Statistic
The core of ANOVA is the \( F \)-ratio, which compares two sources of variance:
Partitioning Total Variance
ANOVA decomposes the total sum of squares into two components:
Degrees of Freedom & Mean Squares
To get mean squares, divide each sum of squares by its degrees of freedom (\( df \)):
| Source | \( df \) | SS | MS |
|---|---|---|---|
| Between | \( k - 1 \) | \( \text{SS}_B \) | \( \frac{\text{SS}_B}{k-1} \) |
| Within | \( N - k \) | \( \text{SS}_W \) | \( \frac{\text{SS}_W}{N-k} \) |
| Total | \( N - 1 \) | \( \text{SS}_T \) | — |
\( t \)-test vs ANOVA
| Feature | \( t \)-test | One-Way ANOVA |
|---|---|---|
| Groups compared | Exactly 2 | \( k \ge 2 \) (any number) |
| Test statistic | \( t \) | \( F \) |
| Type I error control | Single comparison only | Controls \( \alpha \) across all \( k \) groups |
| Tells which groups differ? | Yes (directly) | No: needs post-hoc test |
| Relationship | When \( k = 2 \): \( F = t^2 \) | |
Assumptions of One-Way ANOVA
The \( F \)-Distribution
Under \( H_0 \), the \( F \)-statistic follows an \( F \)-distribution with \( df_1 = k - 1 \) and \( df_2 = N - k \). It is always right-skewed and non-negative.
How to Perform One-Way ANOVA
Example: Three Diets
A researcher tests whether three diets produce different mean weight loss (kg) after 8 weeks. Five participants per group:
| Participant | Diet A | Diet B | Diet C |
|---|---|---|---|
| 1 | 4 | 7 | 5 |
| 2 | 5 | 8 | 6 |
| 3 | 3 | 6 | 4 |
| 4 | 6 | 9 | 7 |
| 5 | 2 | 5 | 3 |
| Mean | 4.0 | 7.0 | 5.0 |
Computing \( F \) Step by Step
The ANOVA Table
Here is the completed ANOVA table for our diet example:
| Source | \( df \) | SS | MS | \( F \) |
|---|---|---|---|---|
| Between | 2 | 23.33 | 11.67 | 4.67 |
| Within | 12 | 30.00 | 2.50 | — |
| Total | 14 | 53.33 | — | — |
Common Mistakes
Question 1 of 5
What does the null hypothesis of a one-way ANOVA state?
Question 2 of 5
A researcher compares 4 treatments with 10 subjects each (\( N = 40 \)). What are the degrees of freedom for \( \text{MS}_{\text{Between}} \) and \( \text{MS}_{\text{Within}} \)?
Question 3 of 5
If \( \text{MS}_{\text{Between}} = 45 \) and \( \text{MS}_{\text{Within}} = 9 \), what is the \( F \)-statistic?
Question 4 of 5
Which of the following is NOT an assumption of one-way ANOVA?
Question 5 of 5
You run a one-way ANOVA and get \( p = 0.003 \) at \( \alpha = 0.05 \). A valid conclusion is: