1

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:

https://statistics.laerd.com/premium-sample/mwut/mann-whitney-test-in-spss-2.php

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.

joesyc
  • 163

1 Answers1

1

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).

Nick Cox
  • 56,404
  • 8
  • 127
  • 185
Sympa
  • 7,732
  • So go with the MWW? Sorry just need to confirm. – joesyc Mar 31 '15 at 16:39
  • Broadly agree: but note that MWW, or the same test under any other name, is not a test for different means. – Nick Cox Mar 31 '15 at 16:40
  • @NickCox this link https://statistics.laerd.com/premium-sample/mwut/mann-whitney-test-in-spss-2.php 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? – joesyc Mar 31 '15 at 16:43
  • 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. – Nick Cox Mar 31 '15 at 16:49
  • @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? – joesyc Mar 31 '15 at 17:02
  • Not the point at all; you are interested in the means of your data, not mean ranks. I doubt that there is a concise, definite answer that will satisfy you. Sometimes when distributions are very non-normal, means are not what you should be comparing. Nevertheless, it is also not the case that comparing means requires normality: for example, people will happily compare means of exponentials or Poissons. Further, comparing means can make sense when variables are additive, meaning that totals make sense, regardless of distributions. If you post your data, people might make more suggestions. – Nick Cox Mar 31 '15 at 17:09
  • Looking at your data: it is hard to see much as each plot is rather small. But what you are comparing is sometimes negative, sometimes positive; some high positive values are noticeable, but no corresponding low negative values. It is not clear whether 0 is even any kind of mode. I wouldn't expect normal distributions to be good reference distributions for such data, but trimmed means might be useful. – Nick Cox Mar 31 '15 at 18:30