Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 39 ยท Regression and ANOVA

One-Way ANOVA in SPSS with Post Hoc Tests

Compare three or more group means in SPSS with one-way ANOVA: the F ratio, Levene, Welch, Tukey and Games-Howell post hoc tests, eta squared and how to report it.

When you have three or more groups (three teaching methods, four store locations), running several t tests multiplies your chances of a false alarm. One-way ANOVA (analysis of variance) answers "do any of the group means differ?" in a single test, and follow-up post hoc tests then say which pairs differ.

The idea in one sentence

ANOVA compares the variation between group means with the variation within groups. If the group means are far apart relative to the spread inside each group, the F ratio is large:

F = MS between / MS within

where each MS (mean square) is a sum of squares divided by its degrees of freedom. With k groups and N cases, df between = k - 1 and df within = N - k.

Python Stand-in: the ANOVA table from scratch

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

SPSS's ANOVA table lists exactly these rows (Between Groups, Within Groups, Total) with Sum of Squares, df, Mean Square, F and Sig.

Running it in SPSS

  1. Analyze > Compare Means > One-Way ANOVA.
  2. Dependent List: the scale outcome. Factor: the group variable (numeric codes with value labels).
  3. Options: tick Descriptive, Homogeneity of variance test (Levene), and Welch (a robust F that does not assume equal variances). Newer versions also have Estimate effect sizes under the main dialog.
  4. Post Hoc: choose Tukey (equal variances) and Games-Howell (unequal variances). Keep significance level .05.
  5. Paste:
Text
ONEWAY score BY method
  /STATISTICS DESCRIPTIVES HOMOGENEITY WELCH
  /MISSING ANALYSIS
  /POSTHOC=TUKEY GH ALPHA(0.05).

Reading the output

  1. Descriptives: N, Mean, SD, SE and 95% CI per group, plus Minimum and Maximum. Look at the means before the test.
  2. Test of Homogeneity of Variances: Levene's test. If Sig. > .05, the equal-variance assumption is fine and the standard ANOVA row is valid. If not, use the Robust Tests (Welch) table.
  3. ANOVA: F and Sig. A small Sig. means at least one mean differs.
  4. Multiple Comparisons (post hoc): one row per pair with Mean Difference (I-J), Std. Error, Sig. and a 95% CI. Differences marked with an asterisk are significant at .05, and the Sig. column is already adjusted for multiple comparisons.
  5. Homogeneous Subsets (Tukey): groups sharing a column do not differ.

Which post hoc test?

  • Tukey HSD: all pairwise comparisons with equal variances and similar group sizes.
  • Bonferroni: simple and conservative; good when you only need a few comparisons.
  • Games-Howell: unequal variances or unequal group sizes. Often a safe default.
  • Dunnett: compare every group to one control group.

Only run post hoc tests after a significant overall F (or planned contrasts, which test specific hypotheses chosen before seeing data, set in the Contrasts dialog).

Python Stand-in: Tukey HSD and Games-Howell logic

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Effect size

Eta squared = SS between / SS total is the share of variance explained by the grouping (about .01 small, .06 medium, .14 large). Partial eta squared and omega squared are also reported. In SPSS versions before the effect-size option, compute it from the ANOVA table, or use Analyze > General Linear Model > Univariate, which prints partial eta squared under Options.

Assumptions

  • Independent observations (design).
  • Residuals roughly normal within each group; ANOVA is fairly robust to this with n of 20+ per group and balanced designs.
  • Equal variances (Levene; otherwise Welch and Games-Howell).
  • If outcomes are ordinal or heavily skewed, see Kruskal-Wallis in non-parametric tests.

Writing it up

"A one-way ANOVA showed that teaching method affected scores, F(2, 21) = 48.4, p < .001, eta squared = .82. Tukey comparisons showed that all three methods differed from one another." Report group means and SDs, and use your own tables for the numbers.

Common mistakes

  • Running ANOVA on a grouping variable stored as text; recode to numeric with labels.
  • Reading post hoc output when the overall F is non-significant.
  • Ignoring Levene's test with unequal group sizes.
  • Concluding "all groups differ" from a significant F.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. With 4 groups and 40 cases, what are the degrees of freedom for F?

    df between = k - 1 = 3 and df within = N - k = 36.
  2. 2. Levene's test is significant. What do you use?

    Unequal variances call for the robust Welch F and a post hoc test such as Games-Howell.
  3. 3. What does a significant F alone tell you?

    F is an omnibus test. Post hoc comparisons locate the differences.
  4. 4. Eta squared of .14 describes:

    By the usual rule of thumb .01 is small, .06 medium and .14 large.

Summary

  • One-way ANOVA tests 3+ group means with one F ratio (between variance over within variance).
  • Analyze > Compare Means > One-Way ANOVA; request Descriptives, Homogeneity, Welch and a post hoc test.
  • Check Levene; use Welch and Games-Howell with unequal variances.
  • Report F(df1, df2), p, eta squared, group means and the post hoc results.

Next: Simple Linear Regression