3
$\begingroup$

I have noticed an inconsistency in the formula for the Mann-Whitney U test. Sites like wikipedia often report it as $$U_1={\frac{n_1(n_1+1)}2}-R_1$$ However, the original paper by Mann and Whitney reports it as $$U_1=n_1n_2+{\frac{n_1(n_1+1)}2}-R_1$$ What difference does $n_1n_2$ make?

Or are these different tests?

$\endgroup$
2
2
$\begingroup$

It's the same test, but you're actually reading it wrong. Wikipedia defines $U_1$ as:

$$ U_1 = R_1 - \frac{n_1(n_1+1)}{2} $$

And, using the same notation, the Mann-Whitney paper defines $U_1$ as:

$$ U_1 = n_1n_2 + \frac{n_2(n_2+1)}{2}-R_2 $$

Note that aside from the $n_1n_2$ piece, the rest of the definition of $U_1$ is actually in terms of $n_2$ and $R_2$ ($m$ and $T$ in the paper). Actually you can do some rearranging to get $U_1$ directly in terms of $U_2$:

$$ U_1 = n_1n_2 - (R_2-\frac{n_2(n_2+1)}{2}) $$

The bracketed term is of course just $U_2$, so:

$$ U_1 = n_1n_2 - U_2 $$

You can see that this is true by considering the fact that the sum of all ranks is just $\frac{(n_1+n_2)(n_1+n_2+1)}{2}$, so:

$$ R_1+R_2=\frac{(n_1+n_2)(n_1+n_2+1)}{2} $$

Putting $R_1$ and $R_2$ in terms of $U_1$ and $n_1$ and $U_2$ and $n_2$ yields:

$$ U_1+\frac{(n_1)(n_1+1)}{2}+U_1+\frac{(n_2)(n_2+1)}{2}=\frac{(n_1+n_2)(n_1+n_2+1)}{2} $$

Then you can do some algebra and see the relationship between $U_1$ and $U_2$:

$$U_1=n_1n_2-U_2$$

$\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.