Robust Mann-Whitney U Test

Statistics
Introduced by
Rand Wilcox (robust extensions); original test by Mann & Whitney (1947)
Year
1947 / 2003
Type
Robust nonparametric two-group comparison
Family
Classical statistics

What does it do?

The robust Mann-Whitney U test is a two-sample rank procedure that keeps the Mann-Whitney U statistic and adds an outlier-handling step, such as trimming, Winsorization or down-weighting, before ranking or before estimating variance.

It is used to compare two independent groups on a continuous or ordinal outcome when extreme values may affect the ordinary rank test. No single robust procedure is standard for this test: implementations differ in their outlier rule, their trimming or weighting scheme and their reference distribution, so the exact procedure must always be reported.

The intuition behind the method

The ordinary Mann-Whitney U statistic counts, over all cross-group pairs, how often a value from one group exceeds a value from the other, with ties counted as one half. Each pair contributes at most 1, so the magnitude of an extreme value has a bounded influence on U; only its position in the ordering matters. Outliers can still matter in other ways. In small samples they can change the ordering of the observations, the pattern of ties and, when robust modifications are applied, the variance estimate. The robust variant reduces the influence of such observations before or during the computation, so the comparison rests more on the bulk of the data. Whether this changes the conclusion depends on the data and should be checked with a sensitivity analysis rather than assumed.

History

The Mann-Whitney U test was introduced by Mann and Whitney in 1947 as a nonparametric alternative to the independent-samples t-test. Robust approaches to two-group comparison, based on robust location measures such as trimmed and Winsorized means, belong to the robust-statistics literature. The Wilcox and Keselman (2003) review cited here addresses robust measures of central tendency and the practical problems of comparing means under nonnormality. The specific robust rank-based variant described on this page has no single credited originator.

When to use it

Choose this test to compare two independent groups on a continuous or ordinal outcome when outliers or heavy tails are present or suspected and the analysis must be reproducible under a stated outlier rule. Because ranks already limit the influence of extreme magnitudes, the main concern is that a few observations, especially in small samples, can change the ordering, the tie pattern or a variance estimate; this is the situation in which the robust variant is worth considering. Do not use it when the data are clean and the ordinary Mann-Whitney U test gives the same conclusion under sensitivity checks, because the extra steps add analyst choices. Do not use it for paired or repeated measures, where a paired method applies. If the question concerns differences in means, a robust location-based method may be a better fit.

Limitations and considerations

  • Trimming and down-weighting change the sample that is tested, so the inference applies to the retained observations and the trimming rule must be justified.
  • No single outlier rule or trimming scheme is standard for this test, and different reasonable choices can lead to different conclusions.
  • Trimming reduces the effective sample size and can lower power when the removed observations carried genuine signal.
  • Bootstrap and permutation reference distributions add computation, and their results vary with the resampling settings and random seed.
  • The cited robust-statistics sources concern robust measures of location and do not evaluate this specific rank test, so its operating characteristics depend on the implementation and should be checked with simulation or a sensitivity analysis.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Keeps the pairwise interpretation of the Mann-Whitney U statistic, so no normality assumption is needed for ordinal or skewed continuous outcomes.
  • Ranking limits how much any single observation can contribute to U. When trimming or Winsorization is added, outlier influence on the retained sample and on the variance estimate can also be reduced; the cited sources do not evaluate this specific test, so the benefit should be checked in the application.
  • Permutation or bootstrap reference distributions can be used in place of the large-sample normal approximation, which is useful when samples are small. This is a general property of resampling methods and is not shown for this test in the cited sources.
  • Pairs with a pairwise effect size (probability of superiority) that is not computed from group means and so is not pulled by a single extreme mean.
  • Can be run alongside the standard test as a sensitivity analysis, showing whether the conclusion depends on the outlying observations.

Applications

  • Comparing a clinical outcome between treatment and control groups when a few patients have extreme values.
  • Behavioural or survey studies with ordinal ratings or response times that include occasional extreme entries.
  • Small pilot comparisons of biomarker levels, where a single measurement error could change the ranking.
  • Sensitivity analysis alongside the standard Mann-Whitney U test, to check whether conclusions depend on outliers.

How it works

How it works

1

The null hypothesis is that the probability of a randomly drawn observation from group 1 exceeding one from group 2 equals 0.5. The alternative is that this probability differs from 0.5. This is a statement about pairwise comparisons, the probability of superiority, and does not by itself assert that every feature of the two distributions is equal.

Formula
H_0: P(X > Y) = 0.5 \quad H_1: P(X > Y) \neq 0.5
2

Before ranking, observations are checked for extreme values using a stated rule, such as a boxplot-type criterion or a fixed trimming proportion. Flagged observations are either removed from the tails of each group or down-weighted so they cannot dominate the ranking. The rule should be fixed and reported before the comparison is run, since the exact scheme is not standardised.

3

The retained observations from both groups are pooled and ranked, with tied values receiving average ranks. For every cross-group pair, a score of 1 is given when the group 1 value is larger, 0.5 for a tie, and 0 otherwise. Summing these scores gives U, which counts how often group 1 observations exceed group 2 observations. Because each score depends only on the order of the two values, the pairwise sum is fully determined by the pooled ranks.

Formula
U = \sum_{i=1}^{n_1} \sum_{j=1}^{n_2} S(X_i, Y_j), \quad S(a,b) = \begin{cases}1 & a > b \\ 0.5 & a = b \\ 0 & a < b\end{cases}
4

If trimming is used, the sample sizes entering the variance and the reference distribution are the reduced counts. If a Winsorized or other robust variance estimate is used, the standard error must be recomputed accordingly. In that case the normal approximation may not be appropriate, and a permutation or bootstrap reference distribution is a common choice; the implementation should state which one is used.

5

The statistic is compared with its reference distribution (normal approximation, permutation or bootstrap, depending on the implementation) to obtain a p-value. The null is rejected when p is below the significance level alpha, which should be set before the analysis and is conventionally 0.05. Rejection indicates a difference in the probability of superiority between the groups. An effect size such as the probability of superiority or a rank-biserial correlation should be reported alongside the p-value, with its sign convention stated.

Formula
\text{reject } H_0 \text{ if } p < 0.05

Common pitfalls

  • Trimming aggressively without a diagnostic reason discards valid data and reduces power.
  • Changing the outlier rule after seeing which result is significant inflates the chance of a false positive.
  • Not stating which robust modification, trimming proportion and reference distribution were used, which makes the analysis impossible to reproduce.
  • Assuming the robust version is always preferable; when the data are clean, the ordinary Mann-Whitney U test is simpler and equally interpretable.
  • Reporting only a p-value; the probability of superiority or rank-biserial correlation is needed to describe the size of the difference, and its sign convention must be stated.

Frequently asked questions

How is this different from the standard Mann-Whitney U test?

The standard test ranks all observations and computes U without an outlier-handling step. The robust version first applies a stated rule, such as trimming, Winsorization or down-weighting, that limits the influence of extreme observations on the ranks or on the variance estimate. If no observation is removed or altered, the U statistic is unchanged; the p-value can still differ if a different reference distribution or variance estimate is used.

What trimming proportion should I choose?

No single trimming proportion is standard for this test. Where possible, set the rule before analysis, base it on diagnostic plots, run a sensitivity analysis across reasonable alternatives, and report the choice explicitly.

Should I use a bootstrap p-value or the normal approximation?

A normal approximation may be unreliable when samples are small or when trimming has reduced the effective sample size. In those cases a permutation or bootstrap reference distribution is often used; the implementation and the number of resamples should be reported.

Can I use this test with tied data?

Yes, if ties are handled by average ranks, as in the ordinary Mann-Whitney U test. Frequent ties reduce the information carried by the ranks, and an ordinal regression model may then be worth considering.

What effect size should I report?

Report the probability of superiority, the proportion of cross-group pairs in which the group 1 value is larger, with ties counted as one half, or a rank-biserial correlation. State which group is group 1 and the sign convention used, since these determine whether the effect is reported as positive or negative.

Related methods

Sources

  1. Wilcox, R. R. (2005). Introduction to Robust Estimation and Hypothesis Testing (2nd ed.). Academic Press.

    ISBN: 978-0127515427
  2. Wilcox, R. R., & Keselman, H. J. (2003). Modern robust data analysis methods: Measures of central tendency. Psychological Methods, 8(3), 254–274.

    Open DOI reference