[R] Interpreting the result of a Wilcoxon (Mann-Whitney U) test
David Winsemius
dwinsemius at comcast.net
Wed Oct 2 19:56:37 CEST 2013
On Oct 2, 2013, at 8:33 AM, Filipe Correia wrote:
> Hello everyone,
>
> I'm having some trouble interpreting the results of a Wilcoxon
> (Mann-Whitney U) test. Hope you can help.
>
> This is the R script that I am running:
>
> a <- c(1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 5, 1, 1, 1, 3, 1, 1,
> 1, 1, 1, 1, 3, 1, 1)
> b <- c(1, 2, 1, 1, 2, 3, 2, 2, 1, 2, 1, 1, 1, 2)
> wilcox.test(a, b, alternative="t", mu=0, exact=FALSE, paired=FALSE) #1st
> wilcox.test(a, b, alternative="l", mu=0, exact=FALSE, paired=FALSE) #2nd
> wilcox.test(a, b, alternative="g", mu=0, exact=FALSE, paired=FALSE) #3rd
>
> ... and it's returning:
>
> Wilcoxon rank sum test with continuity correction data: a and b
> W = 145, p-value = 0.08969
> alternative hypothesis: true location shift is not equal to 0
>
> Wilcoxon rank sum test with continuity correction data: a and b
> W = 145, p-value = 0.04485
> alternative hypothesis: true location shift is less than 0
>
> Wilcoxon rank sum test with continuity correction data: a and b
> W = 145, p-value = 0.9582
> alternative hypothesis: true location shift is greater than 0
>
> The null hypothesis is that the populations are equivalent (mu=0). The
> alternative hypothesis are that they differ, with the 2nd and 3rd runs
> of the test above considering respectively that a<b and b>a. Plus, I'm
> considering an alfa of 0.05.
>
> My issue is that from the first run I could not conclude that there
> was a difference between the two populations (0.08969>0.05), but the
> second run leads me to think that a<b (because 0.04485<0.05).
This is not an appropriate question for R-help. You should ask your statistics instructor or pose the question in a venue where explanations of purely statistical problems are on-topic. (Just because you used R to get results that confused you does not make this an R-help-problem.)
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
--
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list