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.

**Contents**hide

#### Best Answer

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`

.