The Mann-Whitney
test is a rank-based statistical test for comparing
two independent samples. If the first sample has size
, the second has size
, and
is the rank sum of the first sample in the pooled data,
then
Equivalently,
counts ordered cross-sample pairs in which an observation from the first sample exceeds
one from the second, with half credit commonly assigned to ties.
The test is also called the Wilcoxon rank-sum test. Under the null hypothesis of identical continuous distributions, its permutation distribution is distribution-free. Interpreting it solely as a test of medians requires additional shape assumptions.