I have 4 groups and I want to test if the pairwise difference in means are significantly different. There are 6 pairwise differences.

enter image description here

The QQnorm plots of the 4 groups look like this: The Shapiro-Wilk p value looks like this:

> round(shapiro.test(G)$p.value,16)
[1] 4.784327e-06
> round(shapiro.test(B)$p.value,16)
[1] 1.421101e-10
> round(shapiro.test(D)$p.value,16)
[1] 2.436e-13
> round(shapiro.test(R)$p.value,16) #HO is normal
[1] 0.004189489

Given the qqplots and p-values I think the data is not normal so I was not going to use a t-test to test the pairwise difference in means. Instead I was going to use a Wilcoxon rank sum test?

Is this the correct approach?

JUST FYI when I run the t-test I get these p-values

> round(t.test(B,G)$p.value,6)
[1] 0.060317
> round(t.test(B,R)$p.value,6)
[1] 0.005074
> round(t.test(B,D)$p.value,6)
[1] 0.266044
> round(t.test(G,R)$p.value,6)
[1] 0.077648
> round(t.test(G,D)$p.value,6)
[1] 0.422073
> round(t.test(R,D)$p.value,6)
[1] 0.038625

With wilcox.test I get these p-values

> wilcox.test(B, G, mu=0)$p.value 
[1] 3.363941e-05
> wilcox.test(B, R,mu=0)$p.value 
[1] 1.010833e-06
> wilcox.test(B, D,mu=0)$p.value 
[1] 0.02616785
> wilcox.test(G,R ,mu=0)$p.value  
[1] 0.06497015
> wilcox.test(G, D,mu=0)$p.value 
[1] 0.05084219
> wilcox.test(R, D,mu=0)$p.value 
[1] 0.001667653

So should I use the t-test or the Wilcoxon rank sum test?

Note this articel here:


If I assume my shapes are the same then I am testing if there is a shift (i.e. difference in means) so to me it seems like WRS is appropriate as long as I assume shape is same.


marked as duplicate by gung, kjetil b halvorsen, John, whuber Mar 31 '15 at 18:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You nicely answered your own question. None of the four samples come anywhere near being Normally distributed, especially in the tails which is where distribution deviation most often occurs. It is always a good idea to run both hypothesis tests, the parametric and the nonparametric versions, because often the Normality condition is a close call. Often, the two tests t-test and Wilcoxon directionally give you the same answer. It seems it is not always the case in your specific situation. Given that, you should put a lot more weight in your hypothesis confirmation and finding on the Wilcoxon one. Just as a side note, the Wilcoxon Rank test is more often called the Mann-Whitney test. It is also referred to as the Mann-Whitney-Wilcoxon test (to acknowledge all three statisticians that came up with this test).

  • $\begingroup$ So go with the MWW? Sorry just need to confirm. $\endgroup$ – joesyc Mar 31 '15 at 16:39
  • $\begingroup$ Broadly agree: but note that MWW, or the same test under any other name, is not a test for different means. $\endgroup$ – Nick Cox Mar 31 '15 at 16:40
  • $\begingroup$ @NickCox this link statistics.laerd.com/premium-sample/mwut/… talks about if you assume the shapes of the 2 distributions are the same then MWW tests for a shift in location (i.e. mean). Do you agree? $\endgroup$ – joesyc Mar 31 '15 at 16:43
  • $\begingroup$ That's the key point: if you make very strong extra assumptions, then it's true. Otherwise, my unsubtle and unqualified statement stands: MWW can't be expected to tell you anything about means, as it never even looks at them. Lots of discussion around these issues on this forum. $\endgroup$ – Nick Cox Mar 31 '15 at 16:49
  • $\begingroup$ @NickCox it looks at mean ranks. Do you have an alternative solution when you want to compare means for non normal distributions? What would you do here? $\endgroup$ – joesyc Mar 31 '15 at 17:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.