# Mann Whitney Wilcoxon test [duplicate]

My stats background is not very strong so I was hoping I'd be able to get some help. In my MSc thesis I am using R to test for significant differences in means between populations. My data is not normally distributed (based on QQplots, Shapiro-Wilk's and histograms), therefore I cannot use parametric tests. So I am using a Mann Whitney Wilcoxon test instead (wilcox.test in R).

Now from my understanding Mann Whitney Wilcoxon test for significant differences in medians, not means. I have a table with my data reported as means, but I report significance testing results in my thesis based on medians as calculated by R. Is this an appropriate approach? Or do I need to convert the means to medians in my table?

Thanks.

• It doesn't test for difference in medians. It corresponds to a test for the median pairwise difference (in the population). You can get a rejection when the sample medians are equal. Many posts on site discuss this issue. – Glen_b -Reinstate Monica Mar 18 '18 at 9:37

The Wilcoxon test is acutally not a test of medians but of ranks. There is a median test, but that apparently has low power(1) ist thus rarely used (R obviously has a package - you know! (2)). You might also want to look in the wilcox.test- help pages to read about a "pseudomedian": help(wilcox.test)

There is no logical problem with presenting means whilst proving difference in ranks. You may consider it "not elegant", if you are so inclined. There is no problem in reporting the mean as well as the median, if that helps.

Chances are, that you can actually use parametric tests in the absence of normality, if you have enough data. It is hard to tell, how much data is enough for how big a deviance from normality. Some say $n>30$ or $n>50$ might bie good rules of thumb.

And finally, if you have enough observations, you might compare means of non-normal data by bootstrapping...

• Thank you for your comment. In my methods I said " Non-parametric Mann Whitney Wilcoxon test was used to test for differences in medians..", so I guess I should take out the medians from that sentence? – chrisuw92 Mar 14 '18 at 7:00
• Yes, you should take it out, as it is wrong. The median is a common way to report the same kind of data that the Wilcoxon tests are used to examine, which makes this a common misconception. You probably do not want to know about the median, you want to know, whether values in one group are systematically higher then in the other group. That, the Wilcoxon tests do. – Bernhard Mar 14 '18 at 7:21
• The test is actually about testing equality of distributions with respect to location based on ranks. It is not a test of ranks. The idea is that if the distributions are shifted significantly the low ranks would tend to come mostly from distribution and the high ranks from distribution B. If the distributions are the same the ranks would be intertwined and so the low ranks and the high ranks would tend to come "equally from both A and B. – Michael R. Chernick Mar 14 '18 at 9:25
• If the distributions are shifted and the means exist the test would indicate both a difference in means and medians. – Michael R. Chernick Mar 14 '18 at 9:27

Mann-Whitney only tests for a difference in medians when you assume that the only difference in the distributions of the two samples is the location, and not the scale or shape, of the distribution, which is very often too strong an assumption.

In fact, if you just want a test for a difference in means (which is often the case), t-testing will work just fine even if the data aren't normal provided that you have a reasonable sample size, as Bernhard mentioned.

• (+1) But note that under the location-shift assumption, a test for a difference in medians is a test for a difference in means. – Scortchi - Reinstate Monica Aug 9 '19 at 7:04
• With large samples a t-test will (usually) work okay as far as significance level goes. Power can sometimes be a different matter. – Glen_b -Reinstate Monica Sep 23 '19 at 5:08