Topic contents

Lesson 3

One-way analysis of variance and the F-test

Calculate an ANOVA table step by step and use the F distribution and p-values for statistical inference.

Teaching methods and within-group variability

Try it

From the research question to statistical hypotheses

Our question is: are the population mean scores for all three teaching methods equal? We compare population means, not just sample means.

H₀: μA = μB = μC.

H₁: at least one population mean differs (the three need not all differ).

This example uses classical one-way analysis of variance (ANOVA) for independent samples, with teaching method as the grouping factor and score as the response variable.
Method A: 65.0Method B: 70.0Method C: 75.0406080100Score (points)Method A: 58.6 pointsMethod A: 62.6 pointsMethod A: 64.4 pointsMethod A: 65.8 pointsMethod A: 67.4 pointsMethod A: 71.2 pointsMethod B: 63.6 pointsMethod B: 67.6 pointsMethod B: 69.4 pointsMethod B: 70.8 pointsMethod B: 72.4 pointsMethod B: 76.2 pointsMethod C: 68.6 pointsMethod C: 72.6 pointsMethod C: 74.4 pointsMethod C: 75.8 pointsMethod C: 77.4 pointsMethod C: 81.2 points
  • Grand mean 70.0
Dots represent student scores; horizontal lines show group sample means; the dashed line shows the grand mean.

Three sample means: 65.0, 70.0, 75.0; grand mean: 70.0.

ANOVA table: from sums of squares to the F statistic

First divide each sum of squares by its degrees of freedom to obtain MSA (between-group mean square) and MSE (within-group mean square); then take their ratio to obtain the F statistic.

MSA=SSAk−1MSA=\frac{SSA}{k-1}
MSE=SSEN−kMSE=\frac{SSE}{N-k}
F=MSAMSE=SSA/(k−1)SSE/(N−k)F=\frac{MSA}{MSE}=\frac{SSA/(k-1)}{SSE/(N-k)}
F=SSA/(k−1)SSE/(N−k)F=\frac{SSA/(k-1)}{SSE/(N-k)}
Source of variationSum of squares (SS)Degrees of freedom dfMean square (MS)F
SSA (between-group sum of squares)300.002150.008.159
SSE (within-group sum of squares)275.761518.38—
SST (total sum of squares)575.7617——

Substituting the current values

  1. SSA = 6 × [(65.00 − 70.00)² + (70.00 − 70.00)² + (75.00 − 70.00)²] = 300.000
  2. SSE = ΣΣ(xᵢⱼ−group meanᵢ)² = 275.760
  3. SST = 300.000 + 275.760 = 575.760
  4. MSA = 300.000 / 2 = 150.000
  5. MSE = 275.760 / 15 = 18.3840
  6. F = 150.000 / 18.3840 ≈ 8.159

Substituted values in the formulas are displayed as decimals; calculations always use the original, unrounded data.

If the between-group and within-group mean squares are similar, approximately what is F? What if the between-group mean square is much larger?

Teaching methods and within-group variability

Try it

Significance level α

The exploration slider ranges from 0 to 20 in steps of 0.1; the sample F value for this example may fall outside this range.

8.159 (this example)

F distribution, critical values, and right-tail p-values

The black vertical line shows the selected F value, and the hatched right tail shows its corresponding p-value. Adjust the slider to explore different F values; click "Return to sample F" to restore the statistic for this example.

05101520F
  • F(2,15) density curve
  • Selected F=8.16
  • Right-tail P=0.004001
  • Critical value 3.682
The solid line is the F(2,15) density curve; the hatched area is the p-value to the right of the selected F value; the blue dashed line is the critical value. Degrees of freedom are determined by the number of groups and the sample size.

Currently showing this example's sample F=8.159, right-tail P=0.004001.

F statistic
8.159
Right-tail p-value
0.004001
Numerator and denominator degrees of freedom
2, 15

At significance level α=0.05, the sample statistic is F=8.159, the right-tail P=0.004001, and the critical value is approximately 3.682.

Reject H₀: at least one group's population mean differs.
F ≥ 0. Larger values provide more evidence against the null hypothesis that all population means are equal, so we use a right-tailed test.

Complete analysis and interpretation of conclusions

SSA (between-group sum of squares), SSE (within-group sum of squares), SST (total sum of squares); MSA (between-group mean square), MSE (within-group mean square).

Source of variationSum of squares (SS)Degrees of freedom dfMean square (MS)F
SSA (between-group sum of squares)300.002150.008.159
SSE (within-group sum of squares)275.761518.38—
SST (total sum of squares)575.7617——
F statistic
8.159
Right-tail p-value
0.004001
Numerator and denominator degrees of freedom
2, 15

At significance level α=0.05, the sample statistic is F=8.159, the right-tail P=0.004001, and the critical value is approximately 3.682.

Reject H₀: at least one group's population mean differs.

① Independence

Observations from different students should be independent; the chart in this example cannot automatically verify the sampling and grouping design.

② Normality

The classical F-test assumes approximately normal residuals within each group; this is especially important with small samples.

③ Equal variances

Classical one-way ANOVA assumes equal population variances across groups; consider Welch's ANOVA when this assumption is clearly violated.

④ Statistical interpretation

Significance means only that at least one group's population mean differs; identifying which two groups differ requires multiple comparisons. A significant difference in observational data does not establish causation.

Teaching methods and within-group variability

Centers 65/70/75 · Within-group spread 4