Learn
Interactive·

Analysis of Variance

Three delivery methods have different averages. Is the separation real or ordinary sampling variation?

A retailer compares three delivery operating methods. Similar orders are assigned across the methods, and the company records the time from dispatch to arrival.

Delivery methodOrdersMean delivery timeStandard deviation
Standard3042 hr9 hr
Next-day3035 hr8 hr
Local hub3028 hr7 hr

Local-hub delivery has the shortest sample mean. A different set of orders, however, would produce somewhat different averages.

Analysis of variance compares the separation among the group means with the spread of observations within the groups.

Key question

Are the differences among the three delivery methods large relative to the order-to-order variation within each method?

1

Concept

What does ANOVA compare?

The mean differences are only half of the story

Separated means may still be difficult to distinguish when delivery times vary widely within each method. The same mean differences become much clearer when the observations cluster tightly around their group means.

Between-group variation

How far the three delivery-method means are from the grand mean

42
A
35
B
28
C

Within-group variation

How much delivery times differ among orders using the same method

A
B
C

ANOVA summarizes that comparison with an F-statistic.

The F-statistic is a ratio of two sources of variation

F = between-group variation ÷ within-group variation

Between groups

96.4

÷

Within groups

10.0

F = 9.64

How to read F

A larger F-statistic means that separation among the group means is large relative to the ordinary variation within the groups. The p-value describes how unusual an F-statistic this large would be if all population means were equal.

2

Why It Matters

Why not run several t-tests?

Repeated t-tests inflate the false-positive risk

Three groups produce three pairwise tests: standard versus next-day, standard versus local hub, and next-day versus local hub. Every additional test creates another opportunity for a chance result to cross the significance threshold.

Number of testsProbability of at least one false positive
15%
3About 14%
6About 26%
10About 40%

ANOVA begins with one overall null hypothesis: all population means are equal.

What a significant ANOVA means

At least one population mean differs. It does not mean that every group differs from every other group.

3

How It Works

Which groups differ?

The overall test must be followed by group comparisons

The omnibus F-test tells us whether the equal-means model is plausible, but it does not identify the groups responsible for the result. A post hoc procedure such as Tukey HSD compares the relevant pairs while controlling the overall error rate.

ComparisonMean differenceAdjusted pInterpretation
Standard − next-day7 hr0.08Not statistically clear
Standard − local hub14 hr< .001Significant difference
Next-day − local hub7 hr.012Significant difference

A p-value is not an effect size

With a very large sample, even small differences may be statistically significant. Eta squared, η², describes the proportion of total variation associated with group membership.

Different questions

p-value: If all population means were equal, how unusual would this result be?

η²: How much of the total variation is associated with differences among the groups?

4

Example

What should you check first?

Four checks before running ANOVA

  • Are the observations independent?
  • Is the outcome numerical, such as time, score, or amount?
  • Are one or two extreme values driving the means and variances?
  • Do the group variances differ substantially?

When variances differ sharply or sample sizes are unbalanced, Welch’s ANOVA is generally safer. Games–Howell can then be used for follow-up comparisons.

SituationRecommended approach
Variances are reasonably similarOne-way ANOVA + Tukey HSD
Variances differ or sample sizes are unbalancedWelch’s ANOVA + Games–Howell
Small samples with severe skew or outliersConsider a robust method or Kruskal–Wallis

How to read p = .11

❌ The three population means are equal.

✓ The current data do not provide sufficient evidence that at least one population mean differs.

5

Interactive

Change the group separation and spread

Change the group separation and spread

Adjust the distance among the means, the within-group spread, and the sample size. Watch the F-statistic, p-value, and η² respond.

Move the group means and the within-group spread

The F-statistic rises when the group means separate and falls when observations within each group spread out.

StandardNext-dayLocal hubgrand mean

Between groups

367.6

Within groups

26.4

F

13.92

p

<0.0001

η² = 0.242 · proportion of total variation associated with the groups

The group means are separated enough relative to the within-group spread: F(2, 87) = 13.92, p < .0001.

What to observe

  • What happens to F when the group means move farther apart?
  • What happens when within-group spread increases but the means stay fixed?
  • How does a larger sample affect the p-value for a small difference?
  • Does η² respond to sample size in the same way as the p-value?

Key lesson

ANOVA is determined jointly by between-group separation, within-group spread, and sample size.

Key takeaways

  • ANOVA compares three or more means in one overall test.
  • The F-statistic is the ratio of between-group to within-group variation.
  • A significant result means that at least one population mean differs.
  • Post hoc tests identify the groups that differ.
  • The p-value and effect size should be interpreted together.
  • Welch’s ANOVA is useful when group variances differ.

ANOVA does not merely ask whether the averages differ. It asks whether their separation is large relative to the variation within the groups.

What does a real result look like?

Analysis result

One-way ANOVA · Tukey post hoc test

Significant

F-statistic

9.64

Degrees of freedom

2, 87

p-value

< .001

η²

.18

Mean delivery time differed by operating method, F(2, 87) = 9.64, p < .001, η² = .18. Tukey comparisons showed that local-hub delivery was faster than both standard and next-day delivery.

Now compare three or more means with real dataOpen in Lab

Go Deeper

Multiple Comparisons and Post Hoc Tests