← Back to Blog

Test selection · ~8 min read

Mann-Whitney U vs t-test: Choosing the Right Test Before a Reviewer Chooses It for You

Statistics for clinical researchers and surgical trainees

In short

Use Mann-Whitney U when either group has fewer than 30 observations, the data are skewed, or the outcome is ordinal (pain score, Likert item, satisfaction rating). Use the independent-samples t-test when both groups have 30 or more observations and the distribution is roughly symmetric. When in doubt, Mann-Whitney is the safer default: it is never a statistical error to use a non-parametric test where a parametric one would also have been valid.

A published audit of medical research papers identified five consistent categories of t-test misuse. The most common: applying the test to non-normal data, running repeated t-tests across multiple groups, and applying an independent t-test to paired data. Any one of these errors can reverse the conclusion of a study. The decision between the t-test and Mann-Whitney U is not a formality: it changes the numbers you report and, in borderline analyses, whether your result is significant at all.

What each test actually measures

The independent-samples t-test is parametric. It assumes your data follow a normal distribution (a symmetric, bell-shaped pattern around the mean). It works by comparing group averages and asking whether the difference between those averages is larger than chance would produce.

The Mann-Whitney U test is non-parametric.1 It makes no assumption about the shape of your data. Instead of working with means, it ranks every observation from smallest to largest across both groups and compares where each group's values tend to sit in that ranking. Both tests address the same clinical question (are these two independent groups different?), but each is valid under different conditions.

Using a parametric test when its assumptions are violated is a statistical error. Using a non-parametric test when a parametric one would have been valid is simply conservative. That asymmetry matters when your paper is under review.

What the U test compares, and why “median” is the wrong word

Almost every description of the Mann-Whitney U test, including many in print, says it compares medians. It does not, and the distinction has consequences for the sentence you are allowed to write.

What the procedure actually operates on is mean ranks.4 A significant U tells you that values from one group tend to sit higher in the combined ranking than values from the other. That is a statement about which group's observations tend to be larger, not about the distance between two summary numbers.

The practical trap is that a significant result can be produced by a difference in spread or shape rather than a difference in location. Two distributions can share a median and still return a significant U because one is far more dispersed than the other.5 Reported as “the medians differed,” that is simply the wrong claim about your own data.

Two things follow. First, plot the two distributions before you write the sentence: when their shapes and spreads are similar, reading the result as a shift in location is defensible, and when they are not, it is not. Second, keep reporting median and IQR (they are the right descriptive summary for skewed data, and AMA expects them), but let the inferential sentence describe the comparison the test performed. “Serum bilirubin was significantly higher in patients with hepatomegaly” is accurate and defensible. “The median bilirubin was significantly different” attributes to the test something it did not do.

Where a single number is wanted for the effect itself, the probability that a randomly chosen observation from one group exceeds one from the other is a more honest summary than a difference in medians, and it is the statistic the U value is directly related to.4

Ordinal outcomes: Likert items, pain scores, and grades

The most common clinical use of the U test is not skewed continuous data at all. It is ordinal data: a five-point Likert item on a patient-reported outcome measure, a 0–10 pain score, an ASA class, a Clavien-Dindo grade. These have a defensible order but no defensible arithmetic (the distance from 2 to 3 is not guaranteed to equal the distance from 3 to 4), so a mean is not a meaningful summary and the t-test's central assumption does not apply.

A persistent objection holds that the U test requires continuous data and is therefore invalid on a Likert item. It is not: that requirement is a misconception, and the procedure remains valid on ordinal outcomes.4 Ties are common in this kind of data and are handled by assigning tied observations their average rank, which is why software reports a tie-corrected U.

Two cautions specific to ordinal outcomes. A single Likert item is ordinal, but a Likert scale summing many items is often treated as continuous, and if it is approximately symmetric a t-test may be perfectly reasonable: check the distribution rather than the label. And with few response categories, ties dominate and the mean-rank comparison becomes coarse, which is exactly the situation where reporting the proportion in each category alongside the test does more for a reader than either number alone.

Four questions to settle the choice

You do not need to guess. Work through these in order and the test follows directly.

How large are your groups? If both groups have 30 or more observations, the central limit theorem makes the t-test robust to moderate departures from normality. If either group has fewer than 30, the normality assumption carries more weight and Mann-Whitney is the safer route.

What kind of variable is your outcome? Continuous measurements (serum creatinine, blood pressure, weight) may work with either test, depending on distribution. Ordinal scales (Likert items, pain scores from 0 to 10, satisfaction ratings) require Mann-Whitney by default. The t-test needs to average your outcome in a meaningful way; ordinal data cannot be averaged.

Is the distribution roughly symmetric? A quick histogram is enough. Lab values like bilirubin, length of stay, and creatinine tend to bunch near zero and trail rightward (positive skew). That pattern disqualifies the t-test unless groups are large. A roughly bell-shaped histogram on both sides makes the t-test reasonable.

What does the normality test return? Run Shapiro-Wilk and let the P value inform you. Above 0.05: you cannot reject normality, t-test is acceptable. At or below 0.05: the data are not normal, use Mann-Whitney. In SPSS, run this via Analyze → Descriptive Statistics → Explore, ticking "Normality plots with tests." StatsPlease runs Shapiro-Wilk automatically before selecting any test.

Checking normality and the limits of Shapiro-Wilk

The Shapiro-Wilk test is the standard normality check for small and medium clinical samples.2 For groups larger than about 50, the Kolmogorov-Smirnov test (with Lilliefors correction) is often used instead. Both give you a P value that guides the parametric vs non-parametric decision. But there is a problem that catches researchers every time.

The Shapiro-Wilk trap

Shapiro-Wilk's power depends on sample size, and it fails in both directions. With fewer than 20 observations the test lacks power to detect non-normality: your data can be badly skewed and the test will return P > .05, falsely clearing a t-test. With more than 100 observations the test becomes oversensitive: it will reject normality for trivially small deviations that the t-test handles easily. Use the P value as one input, not the final word. Decision rule: n ≥ 30 per group and roughly symmetric on a histogram → t-test is robust. n < 30 or visibly skewed → Mann-Whitney is safer. Ordinal outcome (Likert, rating scale) → Mann-Whitney by default, regardless of what the normality test returns.

When to use each test: the clinical version

Use the t-test when: both groups have 30 or more observations; the outcome is a continuous measurement; and the data are roughly normally distributed, confirmed by histogram and Shapiro-Wilk. When its assumptions hold, the t-test has slightly more statistical power: it is better at detecting a real difference.

Use Mann-Whitney U when: either group has fewer than 30 observations (standard in single-centre audits, subgroup analyses, and pilot studies); the outcome is ordinal such as a pain score, satisfaction rating, or any Likert item; the data are positively skewed (long tail to the right, as with bilirubin or length of stay); or Shapiro-Wilk rejects normality (P ≤ .05). In clinical research, these conditions describe the majority of comparisons you will run.

Paired data is a separate category. If the same patients appear in both groups (pre- and post-operative measurements, left eye and right eye), you need a paired t-test or a Wilcoxon signed-rank test, not the independent-samples versions. Applying an independent-samples test to paired data is one of the five misuse categories the audits identified.

Common mistake

Running Shapiro-Wilk on a group of 12 patients, seeing P > .05, and concluding normality is confirmed. With n = 12, Shapiro-Wilk has very little power: it cannot reliably detect non-normality in samples that small. The correct response: treat small-group data as non-normal by default and use Mann-Whitney unless there is a strong prior reason to expect a normal distribution in that specific variable.

How to report results in AMA format

AMA format is used by most clinical and surgical journals. Reviewers and statistical editors check these elements specifically, so getting them right matters.

For the t-test: report mean and standard deviation for each group, then the test statistic, degrees of freedom, P value, and Cohen's d as the effect size. A correctly formatted AMA result: t(48) = 2.34, P = .023, d = 0.67. The number in parentheses is the degrees of freedom. Cohen's d of 0.2 is small, 0.5 medium, 0.8 large.3

For Mann-Whitney U: report median and interquartile range for each group, then the U statistic, P value, and effect size r. A correctly formatted AMA result: U = 234.5, P = .012, r = 0.41. Effect size r of 0.1 is small, 0.3 medium, 0.5 large. Most clinical journals now require the effect size: omitting it invites a revision request.

Report exact P values (P = .023) rather than P < .05. The only exception is when the value falls below .001, in which case write P < .001.

Consider a study comparing serum bilirubin between patients with and without hepatomegaly in a primary biliary cirrhosis cohort. Bilirubin is strongly right-skewed, so Shapiro-Wilk rejects normality in both groups and StatsPlease routes the comparison to Mann-Whitney U. The output looks like this:

StatsPlease output: Mann-Whitney U test
GroupnMedianIQR
Hepatomegaly present1602.55 mg/dL1.10–5.80
Hepatomegaly absent1521.00 mg/dL0.60–1.90

U = 17635.5 · P < .001 · r = 0.39 (medium)

Serum bilirubin was significantly higher in patients with hepatomegaly (median 2.55 mg/dL, IQR 1.10–5.80) than in those without (median 1.00 mg/dL, IQR 0.60–1.90), U = 17635.5, P < .001, r = 0.39.

Example output.

Example data: Vanderbilt University Department of Biostatistics public teaching datasets (hbiostat.org/data). Figures computed with scipy from real data.

What to write in your methods section

State which test you used and why. One sentence closes the door on a methods query before it is raised. For Mann-Whitney: "The Mann-Whitney U test was used because Shapiro-Wilk analysis indicated non-normal distribution in the [outcome variable] (P = .03)." For the t-test: "An independent-samples t-test was used; normality was confirmed by Shapiro-Wilk analysis in both groups (P > .05)."

If you used Mann-Whitney because the outcome was ordinal rather than because of a normality test, say so: "The Mann-Whitney U test was used because the outcome (pain score) is measured on an ordinal scale." Reviewers accept that reasoning without further query.

The safe default

When you are unsure and groups are small, use Mann-Whitney U. It is never a statistical error to use a non-parametric test where a parametric one would also have worked. The reverse (using the t-test when its assumptions are violated) is an error that reviewers catch and that can change your conclusions. Default to the safer test, document your reasoning, and move on.

Try it yourself

Reproduce this result: in SPSS or StatsPlease

The example above comes from a public dataset. Run it yourself in either tool to confirm the numbers match and to practise the exact steps you will follow in your own analysis.

In SPSS

  1. Download the PBC dataset (see Data Sources) and open it in SPSS.
  2. First check normality: Analyze → Descriptive Statistics → Explore. Add bilirubin to the Dependent List and hepatomegaly to Factor List. Under Plots, tick "Normality plots with tests." Click OK. Both groups will fail Shapiro-Wilk (P < .05).
  3. Run the test: Analyze → Nonparametric Tests → Legacy Dialogs → 2 Independent Samples. Move bilirubin into Test Variable List and hepatomegaly into Grouping Variable. Tick Mann-Whitney U. Click OK.
  4. Read U and the exact P value from the output table. Calculate effect size r = Z / √N (SPSS gives you Z; N is total observations across both groups).

In StatsPlease

  1. Download the PBC dataset and save it as a CSV.
  2. In StatsPlease, upload the CSV, then open the Analysis tab.
  3. Set serum bilirubin as the Outcome and hepatomegaly as the Group, then press the Group Comparison preset button. There is no separate run step: pressing the preset runs the analysis (it screens normality and routes to the t-test or Mann-Whitney).
  4. StatsPlease checks normality with Shapiro-Wilk, routes to Mann-Whitney U automatically, and on the Results tab gives you U, the exact P-value, and effect size r in a ready-to-paste sentence, AMA by default or APA if you switch styles.

Compare: both should return U = 17635.5 and P < .001 (identical numbers, because both run the same test). SPSS requires you to calculate effect size r manually; StatsPlease computes it and writes the formatted sentence for you, AMA by default or APA if you switch styles. For a full feature-by-feature comparison, see StatsPlease as an SPSS alternative.

Frequently asked questions

When should you use Mann-Whitney U instead of a t-test?

Use Mann-Whitney U when either group has fewer than 30 observations, the data are skewed, or the outcome is ordinal, such as a pain score or a Likert item. Use the independent-samples t-test when both groups have 30 or more observations and the distribution is roughly symmetric. It is never a statistical error to use a non-parametric test where a parametric one would also have been valid.

Does the Mann-Whitney U test compare medians?

No. It operates on mean ranks. A significant U tells you that values from one group tend to sit higher in the combined ranking than values from the other, which is not the same as a difference between two medians. Two distributions can share a median and still return a significant U because one is far more dispersed.

Can a Shapiro-Wilk result alone decide between the two tests?

No, because its power depends on sample size and it fails in both directions. Below about 20 observations it lacks the power to detect real non-normality and can falsely clear a t-test. Above about 100 it becomes oversensitive and rejects normality for deviations the t-test handles easily. Read it alongside the sample size and a histogram rather than as the final word.

References

  1. Nahm FS. Nonparametric statistical tests for the continuous data: the basic concept and the practical use. Korean Journal of Anesthesiology. 2016;69(1):8–14. https://doi.org/10.4097/kjae.2016.69.1.8
  2. Mishra P, Pandey CM, Singh U, Gupta A, Sahu C, Keshri A. Descriptive Statistics and Normality Tests for Statistical Data. Annals of Cardiac Anaesthesia. 2019;22(1):67–72. https://doi.org/10.4103/aca.ACA_157_18
  3. Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.
  4. Divine GW, Norton HJ, Barón AE, Juarez-Colunga E. The Wilcoxon-Mann-Whitney procedure fails as a test of medians. The American Statistician. 2018;72(3):278-286. https://doi.org/10.1080/00031305.2017.1305291
  5. Hart A. Mann-Whitney test is not just a test of medians: differences in spread can be important. BMJ. 2001;323(7309):391-393. https://doi.org/10.1136/bmj.323.7309.391

Two ways forward from here.

Work through it yourself using the guidance above: the exercise section shows the exact steps in SPSS. Or upload your dataset to StatsPlease, set your outcome and grouping variable, and press the Group Comparison preset: pressing it runs the analysis, screening normality and choosing the t-test or Mann-Whitney for you, and returns the formatted result (AMA by default, or APA) in about 60 seconds, computed from your data, not generated.

Try StatsPlease free