Mann-Whitney U

Verified

Nonparametric

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

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.

Result

Clinic B was rated higher (Mdn = 6) than Clinic A (Mdn = 5), U = 72, z = −4.96, p < .001, rank-biserial r = .80.

How you'd report it (APA)

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 outcome
    A 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 outcome
    An RCT compares salivary cortisol between 30 yoga participants and 30 wait-list controls after 8 weeks.
  • Small samples with outliers
    A 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

Hypotheses

H₀: The two population distributions are identical (P(X > Y) = 0.5)
Hₐ: One population is stochastically larger than the other (P(X > Y) ≠ 0.5)

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)

Similar distribution shapes across groups (for median interpretation)medium

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.

No excessive ties (identical values) in rankingslow

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 →