Consider two independent samples
and
, with the size of
and
, and the sample data is denoted as
and
respectively.
The null hypothesis,
, is that the two distributions are the same. And this is to be tested against an alternative hypothesis
which is:
; or
, the
's tend to be greater than the
's; or
, the
's tend to be less than the
's.The test procedure includes the following steps:
,
in a group.
be the ranks assigned to
, for
and be the ranks assigned to
, for
.
, and /math-443e369d22f03a15147ddce7585c5b22.png?v=0)
is defined as follow:
/math-42f3622e67a4b7662e78f6c155b8ec10.png?v=0)
is calculated as:
/math-2590c4a4b785dfcc8e3983885df66db6.png?v=0)
/math-28ce0d26a8607fa489594ca9a1d7cc31.png?v=0)
/math-ef94a3f17a70689ec4c0b3b8808715e6.png?v=0)
.
is the number of ties in the sample and
is the number of ties in the jth group.
reduces to
For more details of the algorithm, please refer to nag_mann_whitney (g08amc)