2. Theory
Suppose there are two samples with sample
sizes n1 and n2 such that n15n2. The n1n2
elements are combined into a single ordered sample
and rank numbers from 1 to n1n2 are
assigned to the combined sample values from the
smallest to the largest value, irrespective of the
population each value came from. The rank sum
Rgroup1 is calculated for the smaller group (with n1
elements). Similarly, the rank sum Rgroup2 is obtained
for the larger group (with n2 elements). The
sum of the two rank sums equals the sum of all
rank numbers, so that the equation Rgroup1
Rgroup2(n1n2)(n1n21):2 can be used as a
quick check that all values have been included in
ranking.