Tukey HSD (post-hoc pairwise comparisons)
Compares every pair of group means after an ANOVA while controlling the family-wise error rate, using the studentized range distribution.
- Within-group mean square from the ANOVA.
- Sizes of the two groups compared.
- Studentized range statistic.
- Critical value of the studentized range.
When to use
After a one-way ANOVA (typically a significant one) when you want all pairwise comparisons. For a few pre-planned comparisons, planned contrasts or Holm-adjusted t-tests can be more powerful.
Assumptions
Same as classic ANOVA: independence, approximate normality, equal variances. With unequal sizes the Tukey–Kramer version is slightly conservative.
How to interpret
A pair differs significantly when its adjusted p ≤ α, equivalently when its simultaneous CI excludes 0. The engine reports differences as first − second (R's TukeyHSD prints second − first).
Common mistakes
- Using unadjusted t-tests for all pairs (the chance of at least one false positive grows quickly with the number of pairs).
- Expecting Tukey results to agree perfectly with the overall F (rarely, F is significant but no pair is, or vice versa).
- Using it after Welch's ANOVA when variances clearly differ.
Example
Groups (4, 5, 6, 5), (7, 8, 6, 7), (5, 6, 7, 6): , , , critical . Group 1 − group 2 : , adjusted , CI −3.61 to −0.39. The other two pairs (difference ±1): , . Only groups 1 and 2 differ convincingly.