# Interpret Wilcoxon-Mann-Whitney Result in R [duplicate]

I am doing a Wilcoxon rank sum test (aka Wilcoxon-Mann-Whitney) with R. There are two variables "ScorePerView", that is metric and "HasCodeElement", that is binary.

So the syntax is like that

wilcox.test(ScorePerView ~ HasCodeElement, data=Datenmatrix, paired=FALSE, alternative='less')

When the result is significant (p-value < 0.005), then one distribution is lower or equal to the other.

But which one is lower? Is the one where HasCodeElement is 0 is lower (or equal) then the one where HasCodeElement is 1. Or is it the other way where HasCodeElement is 1 is lower (or equal) then the one where HasCodeElement is 0.

How can I interpret the R output on an one tailed test?

Here is my result with the syntax above. Found the answer here: How do I interpret the Mann-Whitney U when using R's formula interface

Also marked the Question as duplicated.

• Thanks for going to the effort involved in finding the answer yourself and marking the question as a duplicate; this helps to make our site work better. Aug 30, 2015 at 2:09

I don't think you should use the formula interface with ~. If you look at the syntax of the function wilcox.test here you will see that you can also separate your two samples as x and y and use wilcox.test(x,y,...). This will remove any ambiguity. If you use wilcox.test(x,y,paired=FALSE,alternative="less"), and the p-value is significant, then it means that x and y come from different populations, and that y comes from a population with larger values than x.
• I corrected my answer at the same time your wrote your comment I guess. And I was proposing to split x into x and y based on your binary factor Aug 30, 2015 at 8:49