Home

MannWhitneyUTest

The MannWhitneyUTest, commonly called the Mann-Whitney U test or the Wilcoxon rank-sum test, is a nonparametric method for assessing whether there is a difference between two independent groups on a single ordinal or continuous outcome. It does not assume normality of the data and is appropriate when the sample distributions are not normally distributed or when sample sizes are small.

The test operates by ranking all observations from both samples combined, handling ties by assigning average

Assumptions of the test include two independent samples, data measured at least on an ordinal scale, and

Interpretation centers on whether the observed value is unlikely under the null hypothesis that the two populations

ranks.
Let
the
two
samples
have
sizes
n1
and
n2,
and
let
R1
be
the
sum
of
ranks
for
group
1.
The
U
statistics
are
U1
=
n1*n2
+
n1(n1+1)/2
−
R1
and
U2
=
n1*n2
−
U1.
The
test
statistic
is
U
=
min(U1,
U2).
For
small
samples,
exact
critical
values
of
U
determine
significance.
For
larger
samples,
a
normal
approximation
is
used
with
mean
μ_U
=
n1*n2/2
and
variance
σ_U^2
=
n1*n2(n1+n2+1)/12,
often
with
a
continuity
correction
applied.
The
resulting
p-value
indicates
whether
the
two
distributions
differ.
random
sampling
within
each
group.
While
it
is
robust
to
non-normal
data
and
unequal
variances,
the
test
assumes
similar-shaped
distributions
if
one
aims
to
interpret
a
difference
in
central
tendency
as
a
shift
in
location.
are
stochastically
identical.
A
small
p-value
suggests
a
difference
in
distributions
between
the
groups.