I was digging in the scipy code for this test Wilcoxon signed-rank test (stats.wilcoxon
) and I found that in scipy they compute the sum of the ranks for the differences that are positives and separately for the ones that are negatives. Then they picked the smaller one and use that as W.
That is substantially different from the test explanation in Wikipedia, or other sites(http://vassarstats.net/textbook/ch12a.html) where W = sum(all the differences).
Is this approach valid?