Skip to main content
BetaLucidstat is in beta. Results are checked against R, but always verify them against your source data.Send feedback via EZY Research

One-way ANOVA

Compare the means of three or more groups, then find which pairs differ with Tukey HSD or Games–Howell.

9 min read

Try it

One click opens the “Teaching-method study” sample dataset with this test selected and the variables filled in. Or use your own data.

One-way analysis of variance (ANOVA) compares the means of three or more groups in a single test. For example, scores of students taught with three different methods, or satisfaction across years of study.

When to use it

  • The grouping variable is categorical with three or more groups.
  • The outcome is numeric.
  • Each person belongs to only one group.

Why not run t-tests on every pair?

With three groups you would need three tests, each with a 5% Type I error rate. Across several tests, the chance of finding at least one "difference" that is not real rises to about 1 − 0.95³ ≈ 14%. ANOVA tests all groups at once and keeps the error rate at 5%.

The idea

ANOVA splits the total variation in the data into two parts: variation between groups (how far apart the group means are) and within groups (how much people in the same group differ).

F = MS between ÷ MS within
MS = mean square (a variance)

A large F with p < .05 means at least one pair of means differs, but not which pair. That is what post-hoc comparisons are for.

Assumptions and choice of post-hoc test

Levene's testMain testPost-hoc comparisons
p ≥ .05, equal variancesStandard F-testTukey HSD
p < .05, unequal variancesWelch's ANOVAGames–Howell

Lucidstat checks normality in each group with Shapiro–Wilk. If a non-normal group has fewer than 30 cases, it suggests the Kruskal–Wallis test.

Effect size

  • η² (eta squared) = SS between ÷ SS total: the proportion of variance explained by group membership.
  • ω² (omega squared) corrects η²'s bias, so it is slightly smaller; it suits small samples.
  • Cohen's (1988) benchmarks: .01 small, .06 medium, .14 large.

Worked example

The "Teaching-method study" sample compares post-test scores of students taught by lecture, active learning and flipped classroom (89 usable cases).

Checking assumptions: Levene's test F(2, 86) = 1.78, p = .174. Variances are equal, so the standard F-test and Tukey HSD are used, and every group looks approximately normal.

Means and standard deviations of post-test scores
MethodnMSD
Active learning3068.779.93
Flipped3073.2313.87
Lecture2962.179.89
One-way analysis of variance
SourceSSdfMSFpη²
Between groups1822.772911.387.01.002.14
Within groups11176.8786129.96
Tukey HSD pairwise comparisons
ComparisonMean differencep95% CI
Flipped − Active learning4.47.288[−2.55, 11.49]
Lecture − Active learning−6.59.073[−13.67, 0.49]
Lecture − Flipped−11.06.001[−18.14, −3.98]

How to read it

  1. F(2, 86) = 7.01, p = .002: post-test scores differ significantly by teaching method.
  2. η² = .14: method explains 14% of the variance in scores, a large effect (ω² = .12).
  3. Tukey HSD finds only one significant pair: flipped scored higher than lecture, by 11.06 points (p = .001). The other pairs do not differ.
Reporting example (APA 7)

A one-way ANOVA showed that Post-test differed significantly across levels of Method, F(2, 86) = 7.01, p = .002, η² = .14, a large effect. Tukey HSD comparisons showed that Flipped (M = 73.23) scored higher than Lecture (M = 62.17), p = .001.

Reporting example (Thai thesis style)

ผลการวิเคราะห์ความแปรปรวนทางเดียว พบว่า คะแนนหลังเรียนจำแนกตามวิธีสอนแตกต่างกันอย่างมีนัยสำคัญทางสถิติที่ระดับ .05 (F(2, 86) = 7.01, p = .002) และขนาดอิทธิพลอยู่ในระดับใหญ่ (η² = .14) เมื่อเปรียบเทียบรายคู่ด้วยวิธี Tukey HSD พบว่า ห้องเรียนกลับด้าน (x̄ = 73.23) มีค่าเฉลี่ยสูงกว่าบรรยาย (x̄ = 62.17) อย่างมีนัยสำคัญทางสถิติ (p = .001)

Common mistakes

  • Running post-hoc tests when F is not significant and reporting the significant pairs. Start with the overall test.
  • Using LSD for post-hoc comparisons. LSD does not adjust p-values, so the Type I error rate rises. Tukey HSD or Games–Howell are better choices.
  • Concluding that the group with the highest mean is "best" without checking the pairwise results. Here, flipped was not significantly higher than active learning.

References

  • Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.
  • Games, P. A., & Howell, J. F. (1976). Pairwise multiple comparison procedures with unequal n's and/or variances: A Monte Carlo study. Journal of Educational Statistics, 1(2), 113–125.
  • Tukey, J. W. (1949). Comparing individual means in the analysis of variance. Biometrics, 5(2), 99–114.
  • Welch, B. L. (1951). On the comparison of several mean values: An alternative approach. Biometrika, 38(3–4), 330–336.

Try it

One click opens the “Teaching-method study” sample dataset with this test selected and the variables filled in. Or use your own data.

Related lessons