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


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?


Thanks a lot in advance!


python statistics pvalue • 2.2k views
ADD COMMENTlink modified 4.7 years ago by Giovanni M Dall'Olio27k • written 4.7 years ago by joan.frigola0
gravatar for Giovanni M Dall'Olio
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.

ADD COMMENTlink written 4.7 years ago by Giovanni M Dall'Olio27k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1083 users visited in the last hour