2
$\begingroup$

Reading about the Mann-Whitney test for simple random and independent samples I encountered a small issue. According to the book "Introductory Statistics" by Weiss, the test statistic is obtained using

$M = \text{sum of the ranks for sample data from population 1}$

As usual, we use this test statistic to decide whether we reject the null hypothesis or not.

But this was a bit confusing because it seems arbitrary to choose a given sample as the first one. However, trying to clarifiy this, I found that there are other so-called test statistic $U$, and sometimes we are supposed to choose $\min(U_{1}, U_{2})$ or the opposite $\max(U_{1}, U_{2})$.

For example, in this tutorial, this statistic is used:

$U_{1} = R_{1} - \frac{n_{1}(n_{1} + 1)}{2}$

where $R_{1}$ is the sum of ranks in population $1$ as above.

It also adds:

Note that it doesn't matter which of the two samples is considered sample 1. The smaller value of U1 and U2 is the one used when consulting significance tables.

But this procedure doesn't seem to be used in Weiss' book.

Which one is the correct procedure? Maybe I'm just confusing different tests with similar names.

$\endgroup$
  • 1
    $\begingroup$ Because the two samples of known sizes are combined first and then ranked (and the overall sum of ranks of is therefore fixed), it makes then no difference whether you base the test on min() or max(). $\endgroup$ – ttnphns Nov 17 '13 at 7:58
  • $\begingroup$ Could you elaborate a bit more? Obviously there are two test statistic to choose from and those have different values depending on sum of ranks and possibly sample size, so why using min() or max() makes no difference? $\endgroup$ – Robert Smith Nov 17 '13 at 8:08
  • 1
    $\begingroup$ Because since you know the sum of ranks, U1+U2, then if you get to know U1 you automatically know U2, and vice versa. $\endgroup$ – ttnphns Nov 17 '13 at 8:11
  • 2
    $\begingroup$ A single answer to your confusion cannot be done because different programs (implementations) differ in details. The fact is that whether to rely on U1 or U2, there always a due move is done to compute the unique correct Z or the exact p-value. Don't bother your brains. $\endgroup$ – ttnphns Nov 17 '13 at 8:25
  • 2
    $\begingroup$ All of the statistics mentioned are equally correct statistics, yielding equivalent tests. As long as you're clear which one you're using, and use the corresponding tables for that statistic, they all reject or fail to reject the same cases. There's a little bit of relevant discussion in this answer. $\endgroup$ – Glen_b -Reinstate Monica Nov 17 '13 at 14:28
1
$\begingroup$

For the Normal distribution test in the Mann Whitney U Test, note that the distribution that both $U1$ and $U2$ follow is a Normal distribution with mean equal to $n_{1}n_{2}/2$. But since $U_{1} + U_{2} = n_{1}n_{2}$, this means the null hypothesis distribution is Normal with a mean equal to the average of $U_{1}$ and $U_{2}$.

In particular, this means that both $U_{1}$ and $U_{2}$ are equally distant from the mean of the distribution (they are both exactly $[max(U_{1}, U_{2}) - min(U_{1}, U_{2})] / 2$ units away from the center of the null hypothesis distribution, by definition). Since they are equally distant and the distribution is symmetric about its mean, then both $U_{1}$ and $U_{2}$ must generate identical z-scores (up to a sign difference) in that distribution, and thus also identical p-values.

Having a consistent choice like always using the minimum, I suppose, helps with things like software implementation consistency, but it should not have any effect of the output statistics of the test itself.

Also, if you calculate the z-score based on $U_{min}$, it is guaranteed to be along the left tail of the null hypothesis distribution. Call $z_{min}$ this z-score. Then the p-value generally of interest will simply be $2 * normCDF(z_{min})$, because $z_{min}$ is already negative on the left tail and you're measuring the probability of a value smaller than what was observed. Doubling it also accounts for the other tail where you care about $P(z > z_{max})$, since by the argument mentioned above, $z_{max} = |z_{min}|$.

If you base it off of $z_{max}$ directly, you'd need the ever so slightly more complicated calculation of $2 * (1 - normCDF(z_{max}))$, which has a track record of confusing the heck out of people.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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