This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Scipy's Wilcoxon signed-rank test directionality

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 directionality 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!

pvalue python statistics

1 answer

  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.

Log in to answer this question.