3.4 Zeros and Ties in the Signed-Rank Test
Two things can go wrong with the data before the statistic is even formed, and the variance above assumes neither has happened.
Zeros. A difference of exactly \(0\) has no sign, so it cannot be ranked. The usual treatment is to discard such pairs and reduce \(n\) accordingly, so that \(n\) in every formula means the number of non-zero differences, not the number of pairs collected. Reporting the original sample size after discarding zeros overstates the evidence.
Ties. Tied absolute differences are given the average of the ranks they would otherwise have occupied. Averaging leaves \(E(T_+)\) unchanged but reduces the variance, and the correct expression is \[\operatorname {var}(T_+) = \dfrac {1}{24}\left [ n(n+1)(2n+1) - \dfrac {1}{2}\sum _{p}\left (t_p^{3} - t_p\right )\right ],\] the sum running over the groups of tied absolute differences with \(t_p\) the size of the \(p\)-th group. With no ties every \(t_p = 1\), each term vanishes, and the expression returns to \(\dfrac {n(n+1)(2n+1)}{24}\).
Using the uncorrected variance when ties are present overstates the denominator, shrinks \(\left |T^{*}\right |\), and so makes the test conservative — it will fail to detect real shifts. The error is in the safe direction, which is precisely why it goes unnoticed.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.