The ranks sum test (Wilcoxon rank-sum test or Mann–Whitney U test) is a
non-parametric test to determine if two independent samples and
are have the same distribution. It can be regarded as the non-parametric
equivalent of the 2-sample t-test.
Hypotheses:
The null hypothesis and alternative hypothesis can be written as:
: the distributions of and are equal.
: the distributions of and are not equal.
Procedure:
The Mann–Whitney U statistic is calculated for each sample as follows:
where is the sum of ranks of sample set
and is the sample size of sample set .
The final U statistic is:
The procedure takes into consideration tied ranks.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Module Procedures
public impure subroutine s_tst_ranksum(x1, x2, u, p, h1)