One-Way ANOVA
A beginner-friendly walkthrough of one-way ANOVA with visual insight into between- and within-group variance.
Understanding One-Way ANOVA Step by Step
When comparing more than two groups, how do we decide whether their means are statistically different? This is where one-way ANOVA (Analysis of Variance) comes in.
In this article, you’ll learn not only the formulas behind ANOVA, but also why each step matters — and you’ll visually explore the key concepts using a guided interactive tool.
🔷 1. Problem Setup
Imagine we have test scores from three different classes:
| Class | Scores |
|---|---|
| A | 56, 60, 58, 62, 59 |
| B | 70, 72, 75, 68, 74 |
| C | 45, 50, 48, 52, 47 |
Our goal is to determine whether these three classes differ significantly in their average scores.
🔷 2. Hypothesis and Logic
We begin with two competing hypotheses:
-
Null hypothesis (H_0): All group means are equal
-
Alternative hypothesis (H_1): At least one mean is different
The idea behind ANOVA is to compare how much the group means differ (between-group variability) with how much the data vary within each group (within-group variability).
🔶 3. Step 1: Calculate Group and Overall Means
Before testing anything, we need reference points:
-
Group means:
-
Overall mean (grand mean):
This gives us the average for each class and the average across all students. These values will serve as anchors for calculating variability.
🔶 4. Step 2: Decompose Variability
To test whether the means differ significantly, we analyze how total variability breaks down.
There are three types of sum of squares:
✅ Total Sum of Squares (SST)
The total variability of all data from the grand mean:
✅ Between-Group Sum of Squares (SSB)
The variability between group means:
✅ Within-Group Sum of Squares (SSW)
The variability within each group:
These satisfy the identity:
Understanding this decomposition is the heart of ANOVA.
🔶 5. Step 3: Normalize Variance
We convert sums of squares into mean squares by dividing by their degrees of freedom:
-
Between-group variance (MSB):
-
Within-group variance (MSW):
This step allows us to make fair comparisons regardless of sample size.
🔶 6. Step 4: Compute the F Statistic
Finally, we compute the F ratio, which compares between-group to within-group variance:
If this ratio is large enough, it suggests that the group means are different beyond what we’d expect from random variation.
Interactive: Explore SSB, SSW, and the ANOVA Process
Interactive One-Way ANOVA Explorer
📊 Edit Your Data
Group A
Group B
Group C
Step 1: Calculate Group and Overall Means
First, we calculate the mean for each group and the overall grand mean.
📈 Means Calculation
Group Means:
- Group A: 59.00
- Group B: 71.80
- Group C: 48.40
Grand Mean:
59.73
Average of all 15 data points
Use the interactive below to explore:
- Compare group averages vs. overall mean. You can also edit data.
- How SSB increases when group means diverge
- How SSW increases with more internal spread
- How F is calculated with the data
Summary
One-way ANOVA tests whether group means differ significantly by analyzing and comparing two sources of variation:
- Between-group variance (SSB): Differences among group means
- Within-group variance (SSW): Variability within each group
By calculating the F statistic as the ratio of these two variances, we can determine whether observed differences are likely due to random variation or reflect real group effects.