Mann-Whitney U test
Compares two independent groups on an ordinal or non-normal scale variable using ranks; the rank-based alternative to the independent-samples t test.
Menu: Analyze → Nonparametric Tests → Legacy Dialogs → 2 Independent Samples…
When should I use it?
- Likert ratings of two groups.
- Skewed outcomes (income, reaction time) with small groups.
What are the assumptions?
- Independent groups; ordinal or scale outcome.
- To compare medians, the two distributions should have a similar shape.
How do I run it in StatLab?
- Move the outcome(s) to the test list and the group variable to Grouping variable.
- Type the two group codes (blank = first two codes).
- Tick 'Exact' for small samples.
- Tick Kolmogorov-Smirnov Z, Moses extreme reactions or Wald-Wolfowitz runs for the other two-sample tests (Moses treats group 1 as the control group).
How do I read the output?
| Output | Meaning |
|---|---|
| Mean Rank | Higher mean rank = generally higher values. |
| Mann-Whitney U, Wilcoxon W, Z | Test statistics; Z is tie-corrected. |
| Exact Sig. | Permutation p-value for small samples. |
| Effect size r | |Z| / √N: about .1 small, .3 medium, .5 large. |
| Kolmogorov-Smirnov Z | Largest gap between the two groups' cumulative distributions; sensitive to any difference in shape or location. |
| Moses: Control Group Span | Range of the control group's ranks; a small Sig. means the experimental group has more extreme values at both ends. |
| Wald-Wolfowitz: Number of Runs | Few runs of group labels in the sorted data mean the groups differ; with ties the minimum and maximum possible runs are both shown. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC np2Indep /vars=(score age) /group=group /exact=NO /mw=YES /ks=NO /moses=NO /ww=NO.
Output tables: Ranks · Test Statistics.
How would I report it in APA style?
Wellbeing score differed non-significantly between Control (mean rank 55.04) and Programme A (mean rank 65.33), U = 1335.00, Z = −1.60, p = .110, r = .15. Age (years) differed non-significantly between Control (mean rank 61.56) and Programme A (mean rank 54.91), U = 1436.00, Z = −1.03, p = .302, r = .10.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Reporting means instead of medians or mean ranks.
- Saying 'medians differ' when the group distributions have different shapes.