0

all! I want to conduct the Wilcoxon rank-sum test on two datasets, i.e., x1 and x2. My code is as follows,

from scipy import stats

x1 = [9,5,8,7,10,6,7] # len(x1) = 7
x2 = [7,4,5,6,3,6,4,4] # len(x2) = 8
stats.mannwhitneyu(x1, x2)

Then I get the result like this,

> MannwhitneyuResult(statistic=6.5, pvalue=0.006966479792405637)

I do know how the statistic variable is calculated. But whether should I reject the null hypothesis or not according to the result generated by function mannwhitneyu()?

I also noticed that some other python functions return the statistic and pvalue variables. I am quite confused about the meaning of p-value generated by these functions, such as ranksums(), wilcoxon(), etc. Can I simply compare it with 0.05 to judge whether I should reject it or not?

Zac Hatfield-Dodds
  • 2,455
  • 6
  • 19
Yongfeng
  • 345
  • 1
  • 3
  • 15
  • Some guys told me that I only need to compare the **p-value** with **0.05**, perhaps right? In that case, p-value=0.0069<0.05, which indicates me to reject the null hypothesis. – Yongfeng Aug 31 '18 at 14:58
  • A question about the interpretation of the p-value of a statistical test should be asked over at [Cross Validated (stats.stackexchange.com)](https://stats.stackexchange.com/). – Warren Weckesser Sep 01 '18 at 15:12
  • I know your means, but I just want to know how to judge whether I should reject or accept the hypothesis according to the `statistic` and `pvalue`. – Yongfeng Sep 03 '18 at 08:58

0 Answers0