Why are R and Python Mann Whitney different? -


i wondering why answers different when doing mann whitney u test in python , in r. in python:

from scipy.stats import mannwhitneyu t = [1,2,3] g = [4,5,6,7,8,9] mannwhitneyu(t,g) (0.0, 0.014092901073953692) 

in 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 , g w = 0, p-value = 0.02381 alternative hypothesis: true location shift not equal 0 

i'm wondering why python 1 looks more 1 sided test.

the scipy version documented return one-sided p-value. (the doc site down me @ moment can't provide link, can see if @ mannwhitneyu function.) r function documented allow specify sidedness, two-sided default.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -