Data and statistics · cheat sheet Mann-Whitney test A test of whether two independent groups differ, using the ranks of all values instead of their averages.
Common practice 4 steps Used by Process Improvement Specialist
What it is The Mann-Whitney test ranks all values from two groups together and checks whether one group's ranks are generally higher.
When to use it When comparing two groups with skewed data, small samples or ordinal data.
Why it works It compares two groups without assuming normal data.
Do Report medians alongside the p-value. Don't Using it on paired data (use Wilcoxon on the differences). Assuming it compares medians when the groups' shapes are very different. Step by step Rank all together
Rank sums
U statistic
p-value
Worked example The situation. Repair times (hours) at two depots, 8 jobs each.
Medians 14.5 and 10. The result. The slower depot was missing a common spare part.
Part Value U 59.5 p-value 0.004
Filled in for: Repair times (hours) at two depots, 8 jobs each.
Copy this structure, or print the blank version and fill it in by hand. Rank sum group 1 ______ group 2 ______ U = rank sum − n(n + 1) ÷ 2
Before you use it: check these Check If it fails Independent groups For paired data, use Wilcoxon on the differences Groups with a similar shape, if you want to compare medians Otherwise it compares whether one group tends to be higher
How to do it with real data The full calculation, as it happens in the story: the data, every step, how to read the result, and the spreadsheet functions to do it yourself.
Worked example with real dataDid something change at week 12?
From Day 30: What happened in week 12? of the Process Improvement Specialist story
The run chart showed a shift at week 12. The rota shows one doctor cut from five sessions a week to three that week, and the sessions were never covered. Astrid (Data Analyst) compares the weekly median waits before and after.
Weekly median waits before and after week 12 0 5 10 15 20 Before: median 8, quartiles 8 and 9, n = 11 8 Before After: median 12, quartiles 11 and 12, n = 9 12 After
Step by step Describe each group before (11 weeks): mean 8.27, s 0.65 · after (9 weeks): mean 11.56, s 1.13 Equal spreads? (F-test) F = 1.13² ÷ 0.65²; p = 0.10, and Levene's test p = 0.15 = no evidence of different spreads Two-sample t-test t = (11.56 − 8.27) ÷ (0.895 × √(1/9 + 1/11)) = 8.16 p-value 18 degrees of freedom = below 0.0001 Check without assuming normal data Mann-Whitney: every week after is higher than every week before (U = 99 of 99) = p = 0.0001 Size of the change 11.56 − 8.27 = about 3.3 days longer
Week Period Median wait (days) Week 1 Before 8 Week 2 Before 9 Week 3 Before 8 Week 4 Before 7 Week 5 Before 9 Week 6 Before 8 Week 7 Before 9 Week 8 Before 8 Week 9 Before 8 Week 10 Before 9 Week 11 Before 8 Week 12 After 10 Week 13 After 10 Week 14 After 11 Week 15 After 11 Week 16 After 12 Week 17 After 12 Week 18 After 13 Week 19 After 12 Week 20 After 13
How to read the result Since week 12 the weekly median wait is about 3.3 days longer, and it's very unlikely to be chance. The timing matches the lost doctor sessions.
What it led to Root cause confirmed: about 30 routine appointments a week were lost at week 12 and never replaced.
Do it in a spreadsheet F-test p-value =F.TEST(C2:C12,C13:C21)t-test p-value (equal variances) =T.TEST(C2:C12,C13:C21,2,2)Unequal variances version =T.TEST(C2:C12,C13:C21,2,3)Mann-Whitney rank all 20 values with RANK.AVG and add each group's ranks; no built-in p-value
Try it yourself: If the F-test had shown clearly different spreads, which version of the t-test would you use? The unequal-variances version (often called Welch's t-test): =T.TEST(…,2,3). Here it also gives p below 0.0001.
In the roles How a Process Improvement Specialist uses itWeekly medians before and after week 12: every week after is higher, U = 99, p = 0.0001.
Questions people ask Is it the same as Wilcoxon rank-sum? Yes, two names for equivalent tests.
← All techniques and tools