Wilcoxon Signed-Rank Test to check improvement in the group

181 Views Asked by At

I want to check whether a non-normal distributed group has improved over a period of time or not. To check the statistically significant difference between the group at time t1 and time t2, we can use Wilcox Signed-Rank non parametric test. The scipy's wilcoxon will provide us p-value and based on that we can check whether there's a significant difference between the group at different time or not, but how can I check whether there's an improvement at time t2 compared to time t1 in the group?

1

There are 1 best solutions below

0
On

My understanding of what you are looking for is a 'one-sided' test instead of the default 'two-sided'. In this case we don't have enough information as to what would be an improvement, but to give you an example, if you are looking for an improvement in blood pressure as a result of exercise you would be looking for your post exercise blood pressure sample to be less than your pre exercise sample group. In this case, you would want to give the argument "less"

statistic, pvalue = wilcoxon(x, y, alternative="less")

I shamelessly adapted an example from this website which has a fantastic explanation: https://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Nonparametric/BS704_Nonparametric6.html

And you can find the bit about greater/less for the scipy signed rank test here: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.wilcoxon.html