Mann-Whitney, Kruskal-Wallis and Mood's Median Tests
The Mann-Whitney, Kruskal-Wallis and Mood's median tests are non-parametric hypothesis tests that compare the central location of independent groups without assuming normal data. Mann-Whitney compares two groups by ranks, Kruskal-Wallis extends ranking to three or more groups, and Mood's median test counts values above and below the overall median.
Quick facts
- Type
- Non-parametric tests for independent groups (continuous or ordinal Y)
- Origin
- Wilcoxon (1945) and Mann and Whitney (1947); Kruskal and Wallis (1952); the median test is usually cited to Mood (1950)
- Parametric counterparts
- Mann-Whitney ↔ two-sample t-test; Kruskal-Wallis and Mood's median ↔ one-way ANOVA
- Used when
- Analyze phase, with skewed data, outliers or ordinal ratings and small samples
- Key formula
- H = [12 / (N(N + 1))] × Σ(Rᵢ² / nᵢ) − 3(N + 1), df = k − 1
- Reference
- IASSC™ Green Belt Body of Knowledge §3.5.1–3.5.3
- Exam relevance
- Green Belt (Analyze phase); mostly test-selection items
When do you use a non-parametric test for independent groups?
Service data are often far from normal. Processing times, waiting times and claim costs are bounded at zero and have long right tails; a handful of extreme cases can drag a mean a long way. Satisfaction scores are ordinal. In those cases a t-test or an ANOVA can miss a real difference, or report a false one, especially with small samples.
Non-parametric tests replace the values with their ranks, or with counts above and below a median. They make no assumption about the shape of the distribution, only that the groups are independent random samples.
| Groups compared | Parametric test | Non-parametric alternative |
|---|---|---|
| Two independent groups | Two-sample t-test | Mann-Whitney test |
| Three or more independent groups | One-way ANOVA | Kruskal-Wallis test, or Mood's median test |
When the same units are measured under every condition, the groups are not independent: use the Friedman test or the Wilcoxon signed-rank test instead.
Non-parametric tests for independent groups are the safe choice when skew, outliers or ordinal data make the mean a poor summary.
How does the Mann-Whitney test work?
The Mann-Whitney test ranks all the values from both groups together, from smallest to largest, and checks whether one group's ranks are systematically lower:
U₁ = R₁ − n₁(n₁ + 1) / 2, where R₁ is the rank sum of group 1U₂ = n₁n₂ − U₁andU = min(U₁, U₂)- for larger samples:
z = (U − n₁n₂ / 2) / √[n₁n₂(n₁ + n₂ + 1) / 12]
Worked example. Northgate Insurance compares the days taken to settle small claims by two teams, seven claims each. Team A: 2, 3, 4, 5, 6, 7 and 48 days (one claim stuck in a dispute). Team B: 8, 9, 10, 11, 13, 14 and 16 days.
| Step | Calculation | Result |
|---|---|---|
| Ranks of team A | 1, 2, 3, 4, 5, 6 and 14 | R₁ = 35 |
| U for team A | 35 − 7 × 8 / 2 | 7 |
| U for team B | 49 − 7 | 42 |
| Normal approximation | (7 − 24.5) / √(49 × 15 / 12) | z = −2.24 |
| p-value (two-sided) | exact; the approximation gives about 0.025 | 0.026 |
Team A settles faster (medians 5 and 11 days). A two-sample t-test finds nothing (p ≈ 0.89): the 48-day outlier pulls team A's mean (10.7) close to team B's (11.6) and inflates its spread. Values are rounded to two decimals, p-values to three.
The Mann-Whitney test lets the typical claim speak, not the one extreme case.
How does the Kruskal-Wallis test work?
The Kruskal-Wallis test extends the ranking idea to three or more groups. All N values are ranked together, and the statistic measures how far each group's rank sum Rᵢ is from what equal groups would produce:
H = [12 / (N(N + 1))] × Σ(Rᵢ² / nᵢ) − 3(N + 1), df = k − 1- compare H with the chi-square table (an approximation that is usually accepted with about five or more values per group)
Worked example. Larchfield Logistics compares the days needed to resolve a damage claim at three depots, five claims each (N = 15):
| Depot | Days | Ranks | Rank sum | Median |
|---|---|---|---|---|
| North | 3, 4, 6, 8, 30 | 1, 2, 4, 6, 14 | 27 | 6 |
| Central | 5, 7, 9, 11, 13 | 3, 5, 7, 8, 10 | 33 | 9 |
| South | 12, 14, 16, 18, 45 | 9, 11, 12, 13, 15 | 60 | 16 |
H = 12 / (15 × 16) × (27² + 33² + 60²) / 5 − 3 × 16 = 0.05 × 1,083.6 − 48 = 6.18. The critical value of χ² for 2 df at α = 0.05 is 5.991, so the depots differ (p ≈ 0.046). A one-way ANOVA on the same data gives p ≈ 0.17, because the 30-day and 45-day claims swell the within-group variation.
As with ANOVA, a significant H says only that at least one depot differs; reading it as a difference in medians needs groups of similar shape.
The Kruskal-Wallis test is the rank-based counterpart of one-way ANOVA for skewed data.
How does Mood's median test work, and when is it preferred?
Mood's median test throws away even more information than ranking. It finds the overall median of all the data, counts how many values in each group fall above it and how many at or below it, and runs a chi-square test of independence on that 2 × k table, with df = k − 1.
Because each value only counts as "above" or "not above", an extreme value has no more influence than a value just over the median. That makes Mood's median test the more robust choice when the data contain outliers or very different tail shapes, and it can be used for two or more groups. The price is lower power: for clean data, Kruskal-Wallis detects smaller differences with the same sample.
The chi-square approximation needs expected counts of about 5 or more per cell, so the test needs larger samples. In the Larchfield example, the overall median is 11 days and the counts above it are 1, 1 and 5, but the expected counts are only about 2.3 to 2.7 per cell: with 15 values Mood's median test cannot be trusted, and Kruskal-Wallis is the better tool.
Mood's median test trades power for robustness, so it fits large, outlier-heavy samples best.
What are the limitations of these rank-based tests?
Non-parametric tests are valuable because they need few assumptions, resist outliers and work with ordinal data such as ratings. Their limits are worth knowing:
- Lower power with normal data. When the data really are normal, a t-test or ANOVA detects a given difference with fewer observations.
- They test location only under similar shapes. If one group is far more spread out than another, a significant result may reflect shape, not the median.
- Ties need corrections. Many tied values, common with rounded times or rating scales, require tie-adjusted formulas.
- No effect size by default. Report the medians, ideally with confidence intervals, next to the p-value.
- Independence is still required. Paired or blocked data need the Wilcoxon signed-rank or Friedman test.
Used for the right data, the Mann-Whitney, Kruskal-Wallis and Mood's median tests give honest answers where parametric tests would mislead.
Kruskal-Wallis vs. Mood's median test: what is the difference?
| Kruskal-Wallis test | Mood's median test | |
|---|---|---|
| Information used | Ranks of all values | Only whether each value is above the overall median |
| Statistic | H, compared with χ² on k − 1 df | χ² on the 2 × k table of counts, k − 1 df |
| Effect of outliers | Limited, but extreme ranks still count | Very small |
| Power with clean data | Higher | Lower |
| Sample size needed | Small samples possible (about 5 per group) | Larger samples, for expected counts of about 5 per cell |
Kruskal-Wallis is the more powerful default for skewed data; Mood's median test is the more robust option when outliers are severe and samples are large.
Exam focus
These tests are IASSC™ sections 3.5.1 to 3.5.3, in Green Belt scope only. Most questions ask which test fits a scenario: two or several groups, independent or paired, skewed data or outliers. Know the parametric counterpart of each and why Mood's median test resists outliers better than Kruskal-Wallis. The common trap is choosing Friedman or a paired test for independent groups. Practise in the Analyze phase drill.
Practise this DMAIC phase →FAQ
What is the non-parametric alternative to a two-sample t-test?
The Mann-Whitney test, also called the Wilcoxon rank-sum test. It ranks the values of both independent groups together and checks whether one group's ranks are systematically lower or higher. It suits skewed data, outliers and ordinal scales, and with similar group shapes it compares the medians.
Is the Mann-Whitney test the same as the Wilcoxon test?
Partly. The Mann-Whitney U test and the Wilcoxon rank-sum test are equivalent tests for two independent groups. The Wilcoxon signed-rank test is a different test, for one sample against a target or for paired data. Saying only "Wilcoxon test" is ambiguous, so name the version.
When should I use Kruskal-Wallis instead of ANOVA?
Use Kruskal-Wallis when you compare three or more independent groups and the data are clearly skewed, contain real outliers or are ordinal, especially with small samples. With roughly normal data and similar variances, one-way ANOVA is more powerful and gives an ANOVA table that shows how much variation the factor explains.
Why is Mood's median test more robust to outliers than Kruskal-Wallis?
Mood's median test only records whether each value is above or below the overall median, so an extreme value counts exactly like a value just above the median. Kruskal-Wallis uses ranks, where the largest value still gets the largest rank. The extra robustness costs power, so Mood's test needs larger samples.
Sources
- Mann, H. B. & Whitney, D. R. (1947). On a Test of Whether One of Two Random Variables Is Stochastically Larger than the Other. Annals of Mathematical Statistics, 18(1), 50–60.
- Kruskal, W. H. & Wallis, W. A. (1952). Use of Ranks in One-Criterion Variance Analysis. Journal of the American Statistical Association, 47(260), 583–621.
- Mood, A. M. (1950). Introduction to the Theory of Statistics. McGraw-Hill.
- Hollander, M., Wolfe, D. A. & Chicken, E. (2014). Nonparametric Statistical Methods (3rd ed.). Wiley.
- IASSC™ (n.d.). Lean Six Sigma Green Belt Body of Knowledge, §3.5.1–3.5.3.
- Last reviewed