Tests whether two independent groups differ, working from ranks rather than the values themselves. It assumes no normal distribution, so it holds up with outliers and with ordinal data, standing in where a t-test is hard to justify.
This tests whether two independent groups differ, using ranks rather than the values themselves. Unlike a t-test, it does not assume the populations are normally distributed.
The two groups are pooled, sorted and ranked together. Writing for the sum of the ranks in group A, the statistic is as follows.
counts how many pairs have a group A value above a group B value. If the groups do not differ, should land near . Given a reasonable sample, is well approximated by a normal distribution.
With group A at 12, 15, 18, 20, 25, 28, 31 and group B at 5, 7, 9, 10, 11, 14, 16, the rank sum for A is 74 and is 3. That gives and a p-value of 0.006, so the groups differ at the 5% level.
It suits data with outliers, ordinal data such as a five-point satisfaction scale, and anything hard to treat as normal. Working from ranks keeps extreme values from dragging the result about.
Repeated values share a rank. They are given the average rank and the variance is corrected for it; without that correction the test finds significance too readily.
The normal approximation weakens in small samples. Around ten in each group is a reasonable minimum.