Date: Fri, 15 Nov 1996 16:06:18 -0600 "Nichols, David" "SPSSX(r) Discussion" "Nichols, David" Re: Wilcoxon handling of "ties" or equal ranks

The algorithm for the Wilcoxon matched pairs signed rank test in SPSS works as follows:

Compute the differences between each pair. Sort nonzero absolute differences in order and assign ranks to them, giving the mean rank to tied sets. The sum of the positive ranks and the sum of the negative ranks is then computed. The Z-statistic is then computed as:

min(Sp,Sn) - (n(n+1)/4) Z = ----------------------- SQRT[n(n+1)(2n+1)/24]

in releases prior to 6.1.2. For release 6.1.2 and later, the Z-statistic is:

min(Sp,Sn) - (n(n+1)/4) Z = --------------------------------------- SQRT[n(n+1)(2n+1)/24-SUM(Ti^3-Ti)/48]

In each case, min(Sp,Sn) is the minimum of the sum of the positive or negative ranks. The n is the number of untied pairs. The Ti are the numbers of differences that are tied in the ith tied set.

So there are really two kinds of ties at issue. One is a tie between the members of a pair. These are eliminated from the analysis in all releases. The second kind are nonzero pair differences that are of the same magnitude. These are used in obtaining sums of positive and negative ranks of the differences. In the older releases, there is no correction to the standard error (denominator of the Z) for these ties. In 6.1.2 and later releases, there is a correction for such ties (the latter is preferable).

Incidentally, there are further assumptions for the Wilcoxon test in addition to continuity. See, e.g., Conover's _Practical Nonparametric Statistics_.

David Nichols Senior Support Statistician SPSS Inc. nichols@spss.com