5.2 Wilcoxon Rank Sum Test

The Wilcoxon rank sum test6 is a nonparametric alternative to the independent-samples t-test. Use the the test when the samples are not normally distributed or when the response variables are ordinal rather continuous. In the first case where the normality assumption fails, the test evaluates H0 that the two samples are from the same population distribution. In the second case where the response variables are ordinal, the test evaluates the difference in medians.

The Wilcoxon Rank Sum test ranks the response values, then sums the ranks for the reference group, \(W = \sum R_1\). The test statistic is \(U = W - \frac{n_2(n_2 + 1)}{2}\) where \(n_2\) is the number of observations in the test group. \(U\) will equal 0 if there is complete separation between the groups, and \(n_1 n_2\) if there is complete overlap. Reject H0 if \(U\) is sufficiently small.


  1. The Mann-Whitney U test is also called the Mann-Whitney U test, Wilcoxon-Mann-Whitney test, and the two-sample Wilcoxon test↩︎