3
$\begingroup$

I have 4 averages from 4 samples and I want to test if the means are significantly different. When I look at the QQ plots and the shapiro wilk test (all have very low p values) the data is not normal so I was thinking of using the WIlcoxon signed rank test but that seems to be for "matched pair samples". My data is not paired. They are 4 independent samples.

What tests can I use to test if the means are significantly different from each other?

Thank you.

$\endgroup$
  • 1
    $\begingroup$ What do your data consist of (are these counts, measurements of some quantity, times, proportions, exchange rates, angles, Likert scores, category labels recorded as integers, ...)? $\endgroup$ – Glen_b Mar 30 '15 at 0:29
3
$\begingroup$

If you are willing to assume that - under the alternative hypothesis - the four population distributions may differ only by a shift in location (e.g. they have the same variance), then the "standard" distribution-free test to compare means would be the famous Kruskal-Wallis test. It generalizes the Wilcoxon rank sum test to more than two groups.

For not too small groups (and if above mentioned equal variance assumption seems plausible), it usually yields the same test decision as the classic F-test, even if the samples do not look very normal.

If the shift in location alternative is not plausible however (and again the groups are not too small), one of the least problematic ways to compare four means would be by using F-test with Welch correction for unequal variances.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Michael -- To make the assumption of same variance do i just compare the variance and standard deviation of the 4 groups to decide if I can use the Kruskal Wallis test? And if the variances are NOT equal your last paragragh mentions using an F-test with Welch correction. Do you know what formula that is in R? THank you. $\endgroup$ – joesyc Mar 29 '15 at 20:38
  • $\begingroup$ Michael - wouldn't the Mann-Whitney-Wilcoxon Test work. In R the notes on the function state: if both x and y are given and paired is FALSE, a Wilcoxon rank sum test (equivalent to the Mann-Whitney test: see the Note) is carried out. In this case, the null hypothesis is that the distributions of x and y differ by a location shift of mu and the alternative is that they differ by some other location shift......so wouldn' tthis be what I want:: wilcox.test(A ~ B,mu=0) $\endgroup$ – joesyc Mar 29 '15 at 20:53
  • $\begingroup$ MIchael - when I run wilcox.test(A, B,mu=0) and kruskal.test(list(A, B)) I get the pretty much the same p-value out to 2 or 3 decimals so these 2 test must be doing the same thing. kruskal.test is the test you referred to and wilcox.test is the man-whitley wicoxon sum rank test where A and B are 2 of the 4 sample. But you are saying this only works I the variance of the samples I compare are the same? $\endgroup$ – joesyc Mar 29 '15 at 21:09
  • $\begingroup$ The Wilcoxon rank sum test is the two group special case of Kruskal-Wallis. It can, in addition, do one-sided comparisons. $\endgroup$ – Michael M Mar 30 '15 at 6:08
  • $\begingroup$ Unequal variance F tests are available in R using 'oneway.test'. $\endgroup$ – Michael M Mar 30 '15 at 6:10
2
$\begingroup$

One possibility if you can assume identical distributions when the null is true* would be to use a permutation test with the difference in means as the test statistic.

*(not necessarily restricted to a shift alternative, though it's the one that would be the most readily interpretable)

However, with four groups (and six pairwise comparisons), you might be better starting with some overall test for a difference ($H_0$ all population means equal against an omnibus alternative ... at least one population mean differs from at least one other) and then perform some kind of multiple comparisons procedure.

You could do a permutation test for that case too, but depending on the characteristics of the distribution your data comes from you may be better off with a Kruskal Wallis test (essentially a permutation-test for ANOVA-on-the-ranks).

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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