I am trying to perform Mann-Whitney test on a real data set using scipy. I extracted an example where the problem occurs. It seems that the function tiecorrect returns negative value which is the source of problem in my opinion. Here is my case
import scipy.stats x = [1.] * 163 + [2.] * 81 + [3.] * 40 + [4.] * 6 + [5.] * 2 y = [1.] * 1007 + [2.] * 362 + [3.] * 99 + [4.] * 27 + [5.] * 13 # real-world example print scipy.stats.mannwhitneyu(x,y)
I have successfully performed the MW test on the same case using SPSS and R but I would like to figure out how to do with in scipy.