17.5.4.2 Algorithms (Mann-Whitney Test)

Consider two independent samples \(F(x)\,\) and \(G(y)\,\), with the size of \(n_1\,\!\) and \(n_2\,\! \), and the sample data is denoted as \(x_1,x_2,\ldots ,x_{n_1}\,\!\) and \(y_1,y_2,\ldots ,y_{n_1}\,\!\) respectively.

The null hypothesis, \(H_0: F(x) = G(y)\,\), is that the two distributions are the same. And this is to be tested against an alternative hypothesis \(H_1\,\) which is:

\(H_1: F(x) \neq G(y)\,\); or
\(H_1: F(x) < G(y)\,\!\), the \(x\,\)'s tend to be greater than the \(y\,\)'s; or
\(H_1: F(x) > G(y)\,\!\), the \(x\,\)'s tend to be less than the \(y\,\)'s.

The test procedure includes the following steps:

For more details of the algorithm, please refer to nag_mann_whitney (g08amc)