One-Way ANOVA vs Kruskal-Wallis: Which Test Does Your Data Actually Need?
You have one categorical grouping variable and one continuous outcome, and you want to know whether the groups differ. Two tests compete for the job: the one-way ANOVA and the Kruskal-Wallis H test. They answer the same research question, but they make very different assumptions about your data. Pick the wrong one and your p-value can mislead you — or a reviewer can ask why you ignored the assumptions entirely.
This guide shows you when to use each test, how to run both in SPSS with click-by-click steps and syntax, and how to read and report the output. By the end, you will be able to make the choice in under a minute and defend it in your thesis.
The Short Answer: Means or Ranks?
One-way ANOVA compares group means. It is a parametric test, which means it assumes your outcome is roughly normally distributed within each group, the groups have similar variances, and the observations are independent.
Kruskal-Wallis compares group rank sums — it is the nonparametric counterpart of one-way ANOVA. Instead of the raw scores, it ranks all the observations from smallest to largest and asks whether the average ranks differ across groups. Because it works with ranks, it does not assume normality and is far less sensitive to outliers and skew.
A practical rule of thumb:
- Use one-way ANOVA when your outcome is roughly normal in each group, variances are similar, and you have no extreme outliers.
- Use Kruskal-Wallis when your outcome is clearly skewed, ordinal, or has outliers you cannot legitimately remove — or when normality and equal-variance checks fail and no transformation helps.
How to Decide: A 3-Step Check Before You Choose
Step 1: Check normality within each group
Go to Analyze > Descriptive Statistics > Explore, put your outcome in the Dependent List and your grouping variable in the Factor List, and tick Normality plots with tests under Plots. Look at the Shapiro-Wilk column: a p-value below .05 in a group suggests that group’s scores are not normally distributed. Also look at the Q-Q plots — points hugging the diagonal line mean normality is reasonable. With small samples (under about 30 per group), tests of normality have low power, so weigh the plots as much as the p-values.
Step 2: Check equal variances
Levene’s test, which SPSS prints with the ANOVA output, tests whether group variances differ. A significant Levene’s test (p < .05) means the equal-variance assumption is violated. With roughly equal group sizes, ANOVA is fairly robust to this; with unequal group sizes and unequal variances, the risk of a wrong conclusion grows.
Step 3: Look for outliers
A boxplot per group (Graphs > Chart Builder, or the Explore output) shows outliers as dots beyond the whiskers. A few mild outliers in a large sample rarely matter. Several extreme values, especially in a small sample, pull the group mean around and argue for Kruskal-Wallis.
If the data pass all three checks, ANOVA is the better choice — it has more statistical power. If they fail, Kruskal-Wallis is the safer one. Note that a data transformation (for example, a log transform of a right-skewed outcome) can sometimes rescue ANOVA; if the transformed data meet the assumptions, reporting the ANOVA on transformed scores is a legitimate option, but say so clearly in your methods.
Running a One-Way ANOVA in SPSS
Suppose you are comparing exam scores across three teaching methods (groups coded 1, 2, 3) and the outcome variable is score.
- Go to Analyze > Compare Means > One-Way ANOVA.
- Move score into the Dependent List and method into the Factor box.
- Click Options and tick Descriptive, Homogeneity of variance test, and Means plot. Click Continue.
- Click Post Hoc and tick Tukey (use Games-Howell instead if Levene’s test is significant). Click Continue.
- Click OK.
Paste-ready syntax:
ONEWAY score BY method /STATISTICS DESCRIPTIVES HOMOGENEITY /PLOT MEANS /POSTHOC=TUKEY ALPHA(0.05).
How to Interpret the One-Way ANOVA Output
SPSS prints three key tables:
- Descriptives: the mean, standard deviation, and sample size per group. Read these first — they tell you the direction of any difference.
- Test of Homogeneity of Variances (Levene’s): if Sig. is above .05, the equal-variance assumption holds. If it is below .05, the assumption is violated; consider Welch’s ANOVA (available under Options in newer SPSS versions) or switch to Kruskal-Wallis.
- ANOVA table: the F value and its Sig. value. If Sig. is below .05, at least one group mean differs from the others. The F value alone does not tell you which groups differ — that is what the post-hoc table is for.
The Multiple Comparisons table (Tukey) gives a p-value for every pair of groups. Pairs with Sig. below .05 differ significantly. The means plot gives a quick visual check of the pattern.
For the effect size, eta-squared (η²) is the between-groups sum of squares divided by the total sum of squares. You can request it in newer SPSS versions under Options, or calculate it by hand from the ANOVA table. Rough benchmarks: .01 is small, .06 is medium, and .14 is large — but always interpret it in the context of your field.
Running a Kruskal-Wallis Test in SPSS
Using the same example — exam scores across three teaching methods:
- Go to Analyze > Nonparametric Tests > Legacy Dialogs > K Independent Samples.
- Move score into the Test Variable List and method into the Grouping Variable box.
- Click Define Range, enter the minimum (1) and maximum (3) group codes, and click Continue.
- Make sure Kruskal-Wallis H is ticked under Test Type.
- Click Options and tick Descriptive and Quartiles if you want them. Click Continue, then OK.
Paste-ready syntax:
NPAR TESTS /K-W=score BY method(1 3) /MISSING ANALYSIS.
In newer SPSS versions you can also use Analyze > Nonparametric Tests > Independent Samples, which adds a useful bonus: double-clicking the output opens the Model Viewer, where pairwise comparisons with a Bonferroni correction are available under the pairwise comparisons view.
How to Interpret the Kruskal-Wallis Output
SPSS prints two main tables:
- Ranks: the mean rank and sample size per group. The group with the higher mean rank has the higher scores overall. Report the median per group alongside the mean rank, since medians are easier for readers to picture than ranks.
- Test Statistics: the Kruskal-Wallis H value (labelled Chi-Square), the degrees of freedom (number of groups minus one), and the Asymp. Sig. value. If Sig. is below .05, at least one group differs from the others.
Like ANOVA, a significant Kruskal-Wallis test does not tell you which groups differ. For pairwise follow-ups, run Mann-Whitney U tests on each pair and apply a Bonferroni correction (divide your alpha by the number of comparisons — for three groups, that is three pairwise tests, so use .05 / 3 = .017 as the threshold). In the newer Independent Samples dialog, the pairwise comparisons view applies this correction for you.
For the effect size, a common option is eta-squared based on H: η² = (H − k + 1) / (n − k), where k is the number of groups and n is the total sample size. The same rough benchmarks apply as for ANOVA.
One-Way ANOVA vs Kruskal-Wallis: Side-by-Side Comparison
| One-Way ANOVA | Kruskal-Wallis H Test | |
|---|---|---|
| Compares | Group means | Group mean ranks (distributions) |
| Data type | Continuous, roughly normal | Continuous, ordinal, or skewed |
| Assumes normality | Yes, within each group | No |
| Assumes equal variances | Yes | No (assumes similarly shaped distributions) |
| Sensitive to outliers | Yes | Much less |
| Test statistic | F | H (chi-square approximation) |
| Post-hoc | Tukey, Games-Howell | Mann-Whitney U with Bonferroni correction |
| Power | Higher when assumptions hold | Slightly lower, but safer when they do not |
Common Mistakes to Avoid
- Running ANOVA without checking assumptions. A quick Explore run takes a minute and can save a reviewer objection later.
- Switching to Kruskal-Wallis just because the sample is small. Small samples alone are not a reason — skewed data or outliers are. ANOVA is reasonably robust with small samples if the data are normal.
- Reporting only the p-value. Always report the group means or medians, the test statistic, degrees of freedom, the exact p-value, and an effect size, so readers can judge the size of the difference, not just its significance.
- Forgetting the post-hoc tests. A significant omnibus test never identifies which groups differ. Run the pairwise follow-ups.
- Treating Kruskal-Wallis as a test of medians. Strictly, it tests whether the distributions differ. It is only a test of medians when the group distributions have the same shape — so describe your result as a difference in distributions or mean ranks unless you have checked the shapes.
Reporting in APA Style (7th ed.)
Report the test statistic, degrees of freedom, exact p-value, and effect size. Include the descriptive statistics (means and standard deviations for ANOVA; medians and mean ranks for Kruskal-Wallis) either in the text or in a table.
One-way ANOVA example:
Mean exam scores differed significantly across teaching methods, F(2, 57) = 4.32, p = .018, η² = .13. Tukey post-hoc tests showed that students taught with Method A (M = 78.4, SD = 8.2) scored significantly higher than students taught with Method C (M = 69.1, SD = 9.5), p = .014, but neither group differed significantly from Method B (M = 74.6, SD = 8.8).
Kruskal-Wallis example:
Exam scores differed significantly across teaching methods, H(2) = 8.45, p = .015, η² = .12. Median scores were 79 for Method A, 74 for Method B, and 68 for Method C. Pairwise Mann-Whitney U tests with a Bonferroni correction showed that Method A scored significantly higher than Method C (p = .011), while the other pairwise differences were not significant.
Replace the numbers above with your own output values — they are illustrations of format, not results to copy. In your results section, report the assumption checks briefly as well: one sentence on normality and Levene’s test is enough to show the choice of test was considered, not guessed.
Key Takeaways
- One-way ANOVA compares group means and needs roughly normal data with similar variances; Kruskal-Wallis compares ranks and does not.
- Check normality, equal variances, and outliers before choosing — a one-minute Explore run is enough.
- When assumptions hold, ANOVA is the more powerful choice; when they fail and no transformation helps, Kruskal-Wallis is the safer one.
- Neither test tells you which groups differ — always run post-hoc tests (Tukey or Games-Howell for ANOVA; Mann-Whitney U with a Bonferroni correction for Kruskal-Wallis).
- Report the statistic, degrees of freedom, exact p-value, effect size, and group descriptives in APA style.
Frequently Asked Questions
Can I run ANOVA if my data are not normal?
ANOVA is fairly robust to mild violations of normality, especially with similar group sizes of 30 or more per group. If the skew is strong or the sample is small, try a transformation first; if that fails, use Kruskal-Wallis.
What if Levene’s test is significant but the data are normal?
Use Welch’s ANOVA, which SPSS offers in the One-Way ANOVA options in newer versions, and follow it with Games-Howell post-hoc tests. Welch’s version does not assume equal variances.
Does Kruskal-Wallis work with only two groups?
It does, but with two groups the Mann-Whitney U test is the standard choice — Kruskal-Wallis with two groups gives the same result.
Can I use Kruskal-Wallis with ordinal data, like Likert scale totals?
Yes — that is one of its strengths. Ordinal outcomes cannot meet ANOVA’s normality assumption in a strict sense, so Kruskal-Wallis is often the better fit for Likert-type data, especially single items or short scales.
Which test should I use if my groups have very different sizes?
Unequal group sizes make the equal-variance assumption more important for ANOVA. Check Levene’s test carefully; if variances differ as well, Kruskal-Wallis or Welch’s ANOVA is the safer choice.
Need this done on your data? Get a free quote → /services/