Question: Scipy's Wilcoxon signed-rank test directionality
0
4.7 years ago by
joan.frigola0 wrote:

Hello,

I need to perform a wilcoxons signed-rank test in python and I've chosen "scipy" library to do it. However I have some problems when interpreting the results, as I don't know how to asses the directionallity of the difference when they are statistically significant.

According to the description of the Wilcoxon function, the output is the following:

T : float. The sum of the ranks of the differences above or below zero, whichever is smaller.

p-value : float. The two-sided p-value for the test.

So, my question is: when the p-value is significant, how can I know if its due to the fact that A > B or A < B? Is T giving me this information? Would it be as easy as comparing the medians of both groups?

python statistics pvalue • 2.2k views
modified 4.7 years ago by Giovanni M Dall'Olio27k • written 4.7 years ago by joan.frigola0
0
4.7 years ago by
London, UK
Giovanni M Dall'Olio27k wrote:

1) plot them

2) use a one-tailed Wilcoxon test. I am not familiar with python but I believe it's implemented as a rank-sum test.