Introduction
You have two independent groups and one problem: your data are not suitable for an independent-samples t-test. Maybe the scores are ordinal, like Likert-scale ratings. Maybe the distribution is heavily skewed, or your sample is small and normality looks shaky. This is exactly where the Mann–Whitney U test earns its place.
The Mann–Whitney U test is the nonparametric counterpart of the independent-samples t-test. Instead of comparing means, it compares the distributions of scores across two independent groups by working with ranks. It answers a simple question: do scores in one group tend to be higher (or lower) than scores in the other group?
In this tutorial, you will learn when to use the test, how to run it in SPSS click by click, how to read the output, how to calculate an effect size, and how to report the result in APA style (7th edition). No advanced statistics background is needed.
When to Use the Mann–Whitney U Test
Use the Mann–Whitney U test when all of the following apply:
- You have two independent groups — each participant belongs to only one group (for example, a treatment group and a control group).
- Your dependent variable is ordinal or continuous — for example, test scores, reaction times, satisfaction ratings, or ranked preferences.
- The assumptions of the independent-samples t-test are not met — the data are skewed, contain outliers, or fail a normality check, and transforming the data does not help.
- You want to compare the distributions or typical scores of the two groups, rather than their means specifically.
If your groups are paired or matched (the same people measured twice), use the Wilcoxon signed-rank test instead. If you have more than two independent groups, use the Kruskal–Wallis H test.
Assumptions of the Mann–Whitney U Test
The test is called “distribution-free” because it does not assume a normal distribution, but it still has assumptions worth checking:
- Independence of observations. Each case belongs to exactly one group, and cases do not influence each other.
- Ordinal or continuous dependent variable. The scores can be ranked from lowest to highest.
- Independent groups. The two groups are not paired or matched.
- Similar distribution shapes (for a median interpretation). To interpret a significant result specifically as a difference in medians, the two groups should have similarly shaped distributions. If the shapes differ, the test still works, but the correct interpretation is broader: the distributions differ, or scores in one group tend to rank higher.
A quick histogram or boxplot for each group is enough to judge the shape assumption before you run the test.
Hypotheses
For a two-tailed test, the hypotheses are:
- Null hypothesis (H0): The distributions of scores are the same in both groups. Equivalently, a randomly selected score from one group is equally likely to be higher or lower than a randomly selected score from the other group.
- Alternative hypothesis (H1): The distributions differ — scores in one group tend to be systematically higher or lower than scores in the other group.
Two-tailed tests are the default in most research reports and are what we use here. Use a one-tailed test only if you have a clear directional prediction made before seeing the data.
How the Test Works (In Plain English)
Here is the intuition, without any formulas to memorise:
- SPSS pools all the scores from both groups together and ranks them from smallest to largest.
- It adds up the ranks for each group separately. If one group consistently has higher scores, its ranks will pile up at the top end, and its sum of ranks (and mean rank) will be much larger.
- The U statistic summarises how often a score from one group exceeds a score from the other. An extreme U, relative to chance, gives a small p-value.
- For larger samples, SPSS converts U into a z-score and reports an asymptotic (large-sample) p-value. For small samples, an exact p-value is more appropriate, and SPSS can report that too.
You do not need to compute any of this by hand. What you do need is to recognise which numbers in the output matter, which is covered below.
Step-by-Step: Running the Mann–Whitney U Test in SPSS
Before you start
Your data file needs two variables:
- A grouping variable with two values (for example, 1 = Treatment, 2 = Control), with value labels defined so the output is easy to read.
- A test variable holding the scores you want to compare (for example, a variable called Satisfaction or TestScore).
Make sure no stray codes (such as 9 for “missing”) are mixed into the grouping variable, and that missing values are properly coded as missing in Variable View.
Using the legacy dialog (recommended for a classic U output)
- Click Analyze in the top menu.
- Hover over Nonparametric Tests, then Legacy Dialogs, then click 2 Independent Samples…
- In the dialog box, move your score variable (for example, Satisfaction) into the Test Variable List box.
- Move your grouping variable (for example, Group) into the Grouping Variable box.
- Click Define Groups…, enter the two codes for your groups (for example, Group 1: 1, Group 2: 2), and click Continue.
- Under Test Type, make sure Mann-Whitney U is ticked (it is the default).
- Click OK.
SPSS runs the test and opens the output window with two tables: Ranks and Test Statistics.
Using the newer nonparametric dialog
Alternatively, click Analyze > Nonparametric Tests > Independent Samples…, choose Automatically compare distributions across groups, add your variables, and click Run. The key values are the same in substance; the legacy dialog above is usually clearer for teaching.
SPSS Syntax (Paste-Ready)
If you prefer syntax, or you want a reproducible record of exactly what you ran, paste the following into a Syntax window (File > New > Syntax), replace the variable names with your own, and press Run:
NPAR TESTS /M-W = Satisfaction BY Group(1 2) /MISSING ANALYSIS.
Replace Satisfaction with your score variable, Group with your grouping variable, and 1 and 2 with your actual group codes. Save your syntax alongside your data file: it makes your analysis reproducible and easy to re-run if the data are updated.
How to Interpret the SPSS Output
The Ranks table
The first table shows, for each group, the sample size (N), the mean rank, and the sum of ranks. The group with the higher mean rank tends to have the higher scores. This is your first interpretive clue: if the mean ranks are close, the groups barely differ; if they are far apart, the difference is substantial. Always report the group sizes and, alongside the test, the medians of the raw scores — medians describe the typical score in each group far better than mean ranks do.
The Test Statistics table
The second table is where the decision is made. Look for these values:
- Mann-Whitney U: the test statistic itself. Report it in your results section.
- Wilcoxon W: the sum of ranks for one of the groups. You do not normally need to interpret or report W on its own.
- Z: the standardised test statistic, used for larger samples. You need Z to calculate the effect size below.
- Asymp. Sig. (2-tailed): the p-value. If it is below your alpha level (usually .05), reject the null hypothesis: the distributions differ significantly.
A note on small samples: when either group has fewer than about 20 cases, the asymptotic p-value is only an approximation. In the legacy dialog, click Exact… before running the test, select Exact, and report the exact p-value instead. SPSS labels it “Exact Sig. [2*(1-tailed Sig.)]”.
Calculating the Effect Size
A significant p-value tells you a difference exists; an effect size tells you whether it matters. For the Mann–Whitney U test, the common effect size is r, calculated from the Z value:
r = Z / √N
where N is the total sample size across both groups. Take the absolute value of Z for the calculation. Interpret r roughly as: .10 = small effect, .30 = medium effect, .50 = large effect. These are conventional benchmarks, not hard rules — always interpret the effect alongside the medians and the context of your study.
Worked logic, not invented data: if SPSS reports Z = −2.40 and your total N is 64, then r = 2.40 / √64 = 2.40 / 8 = .30, a medium effect. Replace these numbers with your own output values.
Reporting in APA Style (7th Ed.)
APA style (7th edition) asks for the test statistic, the sample sizes, the exact p-value, the effect size, and descriptive statistics that let the reader judge the size of the difference. For a nonparametric test, report medians rather than means.
Use this template, replacing the placeholders with your own values:
Satisfaction scores were higher in the treatment group (Mdn = ___) than in the control group (Mdn = ___). A Mann–Whitney U test indicated that this difference was statistically significant, U = ___, z = ___, p = ___, r = ___.
If the result is not significant, adapt the wording honestly:
A Mann–Whitney U test indicated no significant difference in satisfaction scores between the treatment group (Mdn = ___) and the control group (Mdn = ___), U = ___, z = ___, p = ___, r = ___.
Two APA formatting notes: report exact p-values (for example, p = .012) rather than p < .05 whenever SPSS gives them, and use “p < .001” only when the value rounds to .000. Also state the direction of the difference — a significant test without a direction leaves the reader guessing.
Key Takeaways
- The Mann–Whitney U test compares two independent groups by ranking all scores and comparing the rank sums — no normality assumption required.
- Use it for ordinal or non-normally distributed continuous data with two independent groups.
- In SPSS: Analyze > Nonparametric Tests > Legacy Dialogs > 2 Independent Samples, with Mann-Whitney U selected.
- Read the Ranks table for the direction of the difference, and the Test Statistics table for U, Z, and the p-value.
- Report medians, U, z, the exact p-value, and the effect size r = Z / √N in APA style.
- For small samples, request the exact p-value rather than relying on the asymptotic approximation.
Frequently Asked Questions
Is the Mann–Whitney U test the same as the Wilcoxon rank-sum test?
Yes, in substance. The Wilcoxon rank-sum test and the Mann–Whitney U test are equivalent formulations of the same rank-based comparison for two independent groups. SPSS reports U together with a Wilcoxon W value, which is why both names appear in the output.
Can I use the Mann–Whitney U test with Likert-scale data?
Yes. Likert-scale responses are ordinal, and the Mann–Whitney U test is designed for ordinal data. It is a common choice for comparing Likert ratings between two independent groups, such as two survey cohorts or two experimental conditions.
What sample size do I need for the Mann–Whitney U test?
There is no strict minimum, but very small samples have low power to detect anything but large differences. Request the exact p-value when either group has fewer than about 20 cases, and treat non-significant results from tiny samples as inconclusive, not as proof of no difference.
What should I do if the Mann–Whitney U test is not significant?
Report the result honestly, with medians and the effect size. A non-significant result means the data do not provide enough evidence of a distribution difference — it does not prove the groups are identical. Check whether low power or high variability could explain the result first.
Need this done on your data? Get a free quote → /services/