# ANOVA on ranks vs. Mann-Whitney U test

What exactly is the difference between performing a t-test on data that has been ranked and performing a Mann-Whitney U test on the unranked data? I keep reading things like:

This rank-based procedure has been recommended as being robust to non-normal errors, resistant to outliers, and highly efficient for many distributions. It may result in a known statistic (e.g., in the two independent samples layout ranking results in the Wilcoxon rank-sum / Mann–Whitney U test).

The reason I am confused is that the Mann-Whitney U-test for differences in location assumes that samples come from identical distributions. And yet performing ANOVA on ranks has no such assumptions. Thanks!

(to long for a comment, so I guess it's an answer)

I'm not sure what makes you assert there's a substantive difference between the two cases. When you use Mann-Whitney for testing location-shift alternatives, the assumption is of identical distributions aside from the possible location shift. It's not actually necessary to assume identical distributions. The Mann-Whitney, is, for example, perfectly appropriate for testing scale shift alternatives, or a host of other alternatives, as long as you can compute the distribution of the test statistic under the null. If your rank-based anova is to have a distribution you can compute under $H_0$, you'll need at least some assumptions for the null case there also.

If your assumptions for both are the same (such as both being applied to shift alternatives) and you compute the null distribution on an ANOVA for 2 groups of ranks correctly, your p-values will be identical to the equivalent two-tailed Mann-Whitney, in the same way that $t^2 = F$ for an ordinary 2 group ANOVA compared to a two-tailed two-sample-t (the version with equal-variance).

if I had two groups and both had different, non-normal distributions, but I only wanted to test for a difference in location what test would be preferable? I was under the impression I could use a t-test on ranks, or a Welch t-test on ranks. However, if these tests are the similar to a M_W U test then I guess this is not the case.

It's somewhat of a tricky question, because if they're different shapes 'location difference' doesn't have an obvious meaning in the way it does when they're the same shape.

If you define some measure of location difference (like difference in means or difference in medians or median of pairwise differences or difference in minimum or whatever) then you can do something with it - e.g. try to compute a resampling based distribution, like a bootstrap distribution. It's important to be clear about what you are prepared to assume though.

A Mann-Whitney can be used for more general alternatives than a simple location shift. e.g. For continuous distributions, you can write the null in the form:

$P(X>Y) = \frac{1}{2}$

and the alternative as

$P(X>Y) \neq \frac{1}{2}\quad$ (for a two tailed test)

or

$P(X>Y) < \frac{1}{2}\quad$ (or "$>$", in either case as a one tailed test)

If I recall correctly, Conover's Practical Nonparametric Statistics presents them this way, for example.

• Maybe I should reword my question. If all I want to do is check for a difference in location shift, is there any advantage of choosing one test over the other? For example, can one test be used in situations where another can't?
– Jimj
Mar 25, 2013 at 23:38
• See my edit above Mar 26, 2013 at 0:00
• Thanks Glen_b, that is very helpful. I guess on that note, if I had two groups and both had different, non-normal distributions, but I only wanted to test for a difference in location what test would be preferable? I was under the impression I could use a t-test on ranks, or a Welch t-test on ranks. However, if these tests are the similar to a M_W U test then I guess this is not the case.
– Jimj
Mar 26, 2013 at 17:21
• Answer got too long; moved to an edit of the above answer Mar 26, 2013 at 22:27
• OK, that brings me to my last question then-what would be the null and alternative hypothesis for a Welch t-test on ranked data? I think I am having a hard time with this because I still don't quite understand the usefullness of a Welch t-test on ranked data vs a M-W U test. For example, people recommend a welch t-test on ranked data when variance is not homogeneous and data is non normal. But if the M-W U test can be used to test the above hypothesis, then why even bother with the welch test on ranked data? Is it because they think a MW U test can only be applied to test for a location shift?
– Jimj
Mar 27, 2013 at 0:19