Unit 5 · Categories and non-parametrics
How to run a Mann-Whitney U test in SPSS
Run a Mann-Whitney U test in SPSS, read mean ranks and report U, z and effect size r.
Quick answer: How do you run a Mann-Whitney U test in SPSS?
- Click Analyze › Nonparametric Tests › Legacy Dialogs › 2 Independent Samples.
- Move the outcome into Test Variable List and the group variable into Grouping Variable.
- Define the two groups, keep Mann-Whitney U ticked and click OK.
Report it in APA style: Students with a part-time job reported higher anxiety (Mdn = 6) than those without (Mdn = 4), U = 206.50, z = −2.42, p = .015, r = .34.
What is the Mann-Whitney U test?
The Mann-Whitney U test is the non-parametric alternative to the independent-samples t-test. It compares two independent groups using ranks instead of raw scores, so it doesn’t assume normality.
When to use it
- Two independent groups.
- An ordinal outcome, or a Scale outcome that is clearly non-normal or has outliers, especially with small groups.
How it works
All scores are ranked together from lowest to highest, ignoring group. If one group tends to score higher, its ranks will be higher. U counts how often a score in one group beats a score in the other. SPSS converts U to a z-score for the p-value, and r = |z| ÷ √N gives an effect size (.1 small, .3 medium, .5 large).
Assumptions
- Independent groups and observations.
- Ordinal or Scale outcome.
- To interpret it as a difference in medians, the two distributions should have a similar shape.
Worked example
Students with a part-time job reported higher anxiety (Mdn = 6) than those without (Mdn = 4), U = 206.50, z = −2.42, p = .015, r = .34.
Key terms
- Mean rank
- Average rank in a group; higher means higher scores.
- Median
- The middle score, reported instead of the mean.
- Effect size r
- |z| ÷ √N.
Common mistakes
- Reporting means and SDs instead of medians.
- Using it for paired data (use Wilcoxon).
How to do it in SPSS
The SPSS syntax
Prefer typing to clicking? Open File › New › Syntax, paste this in, select it and choose Run › Selection. Every dialog's Paste button writes the same kind of code.
NPAR TESTS
/M-W=anxiety BY job(1 2)
/STATISTICS=QUARTILES.Practice data
Download the file used in this lesson and run it yourself in SPSS. Your results will closely match the screens above, though a few numbers may differ slightly.
- job_anxiety.savAnxiety for students with and without a part-time job (N = 52)
Now practise it interactively →
Reading is only half of it. Tap through the real SPSS menus, read the output and pick the right write-up in 7 quick questions, with instant feedback on every answer.
Practice for this lesson is part of Pro, with every unit, unlimited hearts and saved progress.