use*_*890 3 python statistics r
我想知道为什么我的答案在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)
Run Code Online (Sandbox Code Playgroud)
在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
Run Code Online (Sandbox Code Playgroud)
我想知道为什么python看起来更像是单面测试.