I have noticed that when I try to find the critical values for the Mann-Whitney U using R, the values are always 1+critical value. For example, for $\alpha=.05, n = 10, m = 5$, the (two-tailed) critical value is 8, while for $\alpha=.05, n=12, m=8$, the (two-tailed) critical value is 22 (check the tables), but:

> qwilcox(.05/2,10,5)
[1] 9
> qwilcox(.05/2,12,8)
[1] 23

Of course I'm not considering something, but... anyone could explain me why?


I think that the answer here might be that you're comparing apples and oranges.

Let $F(x)$ denote the cdf of the Mann-Whitney $U$ statistic. qwilcox is the quantile function $Q(\alpha)$ of $U$. By definition, it is therefore $$Q(\alpha)=\inf \{x\in \mathbb{N}: F(x)\geq \alpha\},\qquad \alpha\in(0,1).$$

Because $U$ is discrete, there is usually no $x$ such that $F(x)=\alpha$, so typically $F(Q(\alpha))>\alpha$.

Now, consider the critical value $C(\alpha)$ for the test. In this case, you want $F(C(\alpha))\leq \alpha$, since you otherwise will have a test with a type I error rate that is larger than the nominal one. This is usually considered to be undesirable; conservative tests tend to be prefered. Hence, $$C(\alpha)=\sup \{x\in \mathbb{N}: F(x)\leq \alpha\},\qquad \alpha\in(0,1).$$ Unless there is an $x$ such that $F(x)=\alpha$, we therefore have $C(\alpha)=Q(\alpha)-1$.

The reason for the discrepancy is that qwilcox has been designed to compute quantiles and not critical values!

  • $\begingroup$ (+1) Good, simple, concise description. :) $\endgroup$ – cardinal Jul 18 '12 at 12:31

Remember that the rank sum test statistic is discrete and so you need to use a critical value such that the tail probability is $\geq$ to the specified $\alpha$. For some sample sizes equal to alpha cannot be achieved and that is my guess as to why you need the +1.

  • 4
    $\begingroup$ So why is +1 needed in R and not in the usual tables? $\endgroup$ – MånsT Jul 17 '12 at 11:14
  • 1
    $\begingroup$ @this.is.not.a.nick: perhaps more importantly, $0.0236723<0.025$ whereas $0.02868937>0.025$, which means that in the former case the actual significance level will be $<0.05$ and that in the latter it will be $>0.05$. Usually people tend to prefer to err on the right side, i.e. to have a lower significance level than the nominal one (meaning that the values from the tables are preferable). $\endgroup$ – MånsT Jul 17 '12 at 11:33
  • 1
    $\begingroup$ Right to both Procrastinator and MansT. Actually the definiton of significance level requires that the tail probabilities do not sum to anything higher than alpha. I talk about this in my paper with Christine Liu on the sawtoothed behavior of the power function for exact binomial tests via the Clopper-Pearson method (see American Statistician (2002)). $\endgroup$ – Michael Chernick Jul 17 '12 at 11:56
  • 2
    $\begingroup$ @Michael: It's on the same page as this one. The tables follow the standard defintion, which means that the critical values aren't quantiles. $\endgroup$ – MånsT Jul 17 '12 at 12:20
  • 3
    $\begingroup$ @Michael: Agreed. In some sense, qwilcox does what it's supposed to do, but not what you'd expect it do to. $\endgroup$ – MånsT Jul 17 '12 at 12:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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