In the Wilcoxon test, ranks are based on the absolute value of the difference between the two test variables. The sign of the difference is used to classify cases into one of three groups: differences below 0 (negative ranks), above 0 (positive rank), or equal to 0 (ties). Tied cases are ignored.

In these data, 5 cases have negative differences whose absolute values are ranked 3, 4, 6, 7, and 11 among all differences. The sum of these ranks equals 31. The other cases have positive differences, whose ranks sum to 60.