Filipe,

When you chose a different alternative argument you are asking a different
null hypothesis.  You are looking at a two-tailed, lesser than, and greater
than hypotheses.  Which one you chose is dependent upon your initial
question.  Are you asking generically if your two populations (a and b) are
different?  Are you asking if a > b or a < b?  It is my understanding that
you shouldn't just do all of them to see which fits, it depends on what you
initially were intending to test.  If you can answer that question then you
can determine if your appropriate run is significant.

Regards,

-- 
Charles Determan
Integrated Biosciences PhD Candidate
University of Minnesota


On Wed, Oct 2, 2013 at 10:33 AM, Filipe Correia <fcorreia@gmail.com> 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).
>
> Am I misinterpreting the results?
>
> Thanks!
>
> Filipe
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

