Mann-Whitney U
VerifiedNonparametric
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Nonparametric test for comparing a continuous/ordinal outcome between two INDEPENDENT groups.
Ranks all observations pooled across groups and compares the sums of ranks. The canonical alternative to the independent-samples t-test when the DV is ordinal, when per-group distributions are non-normal, or when outliers are a concern and a rank-based test is more defensible.
Worked example
Do two clinics differ in patient-satisfaction ratings (1–7, ordinal)?
Satisfaction ratings from Clinic A (n = 25) and Clinic B (n = 28). Ratings are ordinal and skewed, so a Mann-Whitney U compares them by ranks.
Clinic B was rated higher (Mdn = 6) than Clinic A (Mdn = 5), U = 72, z = −4.96, p < .001, rank-biserial r = .80.
A Mann-Whitney U test showed Clinic B (Mdn = 6) was rated significantly higher than Clinic A (Mdn = 5), U = 72, z = −4.96, p < .001, r = .80.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- Two independent groups, ordinal outcomeA clinical trial randomises 80 chronic-pain patients to mindfulness (n=40) vs standard care (n=40) and rates pain reduction on an 11-point Numerical Rating Scale.
- Two independent groups, skewed continuous outcomeAn RCT compares salivary cortisol between 30 yoga participants and 30 wait-list controls after 8 weeks.
- Small samples with outliersA pilot study compares reaction time between 15 older and 15 younger adults; two older participants have unusually slow trials that pull the group mean.
When NOT to — use instead
- Paired / repeated measuresMann-Whitney U assumes INDEPENDENT groups. → Wilcoxon Signed-Rank
- Three or more groupsMWU handles exactly 2 groups. → Kruskal-Wallis H (non-parametric ANOVA)
- Continuous DV with normal residuals + balanced groupsIndependent-t is more powerful when its assumptions hold. → Independent Samples t-test
- Nominal / unordered categorical outcomesRanks require ordering.
Hypotheses
Parameter tested: P(X > Y) where X is a random draw from Group 1 and Y from Group 2
Assumptions (and what to do if they fail)
Check: Create side-by-side boxplots and overlaid density plots/histograms for each group.
If violated: If shapes differ, Mann-Whitney still valid but interprets as stochastic dominance (P(X>Y) != 0.5), NOT as median test.
Check: Count number of unique values relative to sample size.
If violated: Moderate ties are handled automatically via tie correction.
Ready to run a Mann-Whitney U on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →