【发布时间】:2014-10-11 19:58:27
【问题描述】:
我想知道为什么在 python 和 R 中进行 mann whitney u 测试时我的答案如此不同。在 python 中:
from scipy.stats import mannwhitneyu
t = [1,2,3]
g = [4,5,6,7,8,9]
mannwhitneyu(t,g)
(0.0, 0.014092901073953692)
在 R 中:
t = c(1,2,3)
g = c(4,5,6,7,8,9)
wilcox.test(t,g, paired = FALSE)
Wilcoxon rank sum test
data: t and g
W = 0, p-value = 0.02381
alternative hypothesis: true location shift is not equal to 0
我想知道为什么 python 看起来更像是单面测试。
【问题讨论】:
标签: python r statistics