1
$\begingroup$

Suppose I am calculating the p-value of a Wilcoxon Rank-Sum test where $W_s = 23$, $n=4$ and $m=5$ suppose that we have:

$pvalue = P(W_s \ge 23 | H_0)$

The way I manage to get to the right answer is to use the property that $W_s$ is simetrical around $n*((n+m)+1)/2$ and get:

  • As $n=4$ and $m=5$, $n*((n+m)+1)/2 = 20$

$P(W_s \ge 20 + 3 | H_0 ) = P(W_s \le 20 - 3 | H_0 )$

and then find $W_{x,y}$ using that $W_{x,y} = W_s - n*(n+1)/2$:

  • As $n=4$, $n*(n+1)/2 = 10$

$P(W_s \le 17 | H_0 ) = P(W_x,y \le 7) = 0.2778$

However, if I just apply the second property directly I get a different, wrong result:

  • As $n=4$, $n*(n+1)/2 = 10$

$pvalue = P(W_s \ge 23 | H_0) = P(W_{x,y} \ge 13) = 0.20$

Why?

$\endgroup$

1 Answer 1

2
$\begingroup$

Turns out that I made a mistake, I was calculating $P(Wx,y>13)$ and not $P(Wx,y \ge 13)$. The properties pointed out by me are valid regardless of the order that you apply them.

Notice that the big problem was that I was comparing

pwilcox(13,4,5,lower.tail=FALSE)

With:

pwilcox(7,4,5,lower.tail=TRUE)

In R, and as lower.tail = FALSE implies strictly greater, and not greater or equals to, I was getting a mistake.

$\endgroup$
1
  • 1
    $\begingroup$ This is being automatically flagged as low quality, probably because it is so short. At present it is more of a comment than an answer by our standards. Can you expand on it? You can also turn it into a comment. On the other hand, if you think this is the full answer to your question, you can accept it by clicking the check mark to its left below the vote total. $\endgroup$ Commented Oct 25, 2016 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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