While performing the Wilcoxon rank sum test in R, I sometimes get W values of 0, but significant p values. Since the way R calculates W is the difference between the rank sum of one group minus the expected rank sum, I don't understand how this can be 0 but then still reject the null hypothesis. If one of the groups rank sum is equal to the expected, shouldn't the other be as well and thus there is no difference, i.e. the null hypothesis holds? Thanks a lot, Ser PS I'm new here and I don't know how to cross ref to another post, but the way R calculates W is really well explained a post called 'Wilcoxon rank sum test correct vectors order'