Mann Whitney Test: Clearing Up Confusion

I have been reading many statistical websites stating that the Mann Whitney test is a test of medians. However, I believe that this is not really true? It is a test of the difference in the ranks. The Mann-Whitney test only tests for a difference in medians when you assume that the only difference in the distributions of the two samples is the location, and not the scale or shape, of the distribution, which is very often too strong an assumption. Additionally, if one does make this assumption, then I believe it's also fair to say that the Mann Whitney test compares the difference in means as well.

I have a few questions that relate to this:

1. I am a bit confused why, often in research papers, the medians are reported when stating the results of a Mann Whitney test. It seems that it's only under rare occasions when the Mann Whitney test is actually able to compare the medians. Additionally, do researchers even check to see whether distributions are equal in the first place before saying that the test is a comparison of medians? If not, then it seems a bit unsound to report the medians.

2. Is the Mann Whitney test comparing the distribution of the ranks for two groups?

3. I am also a bit confused about what is stated here. Reporting Results of Mann-Whitney U Test - Means vs Medians . The first post states that "the location-difference measure that the Mann-Whitney 'sees' is neither difference in means nor difference in medians – it's the median of cross-group pairwise differences (the between samples quantity is the relevant estimate of the corresponding measure between populations)". How exactly does "the median of cross-group pairwise differences" relate to ranks.

1. It's quite reasonable to report the medians when doing a Mann-Whitney test. The median is perfectly good location summary. The problem is describing the test as a test for difference in median. I think this is the fault of statistics textbooks – it's a very common mistake in them. I don't know of the original source of this idea, though I have spent quite a lot of time looking, over the years. My guess is that someone recommended doing a Mann-Whitney test and also quoting medians, and it got misunderstood as saying the medians were what was being tested. But that's just a guess.

2. Yes. It's equivalent to the Wilcoxon rank-sum test, which is basically a t-test on the ranks. It depends on the ranks, and nothing else.

3. Suppose you fix one sample (call it $$X$$) and shift the other sample (call it $$Y$$) up or down (by adding or subtracting the same number $$\delta$$ from each observation) until the Mann-Whitney test statistic has exactly its null value. At that point, the number of pairs with $$X_i> Y_j+\delta$$ will be the same as the number of pairs with $$X_i< Y_j+\delta$$, because the test is based on the difference of those two numbers. That is, if you look at $$X_i-(Y_j+\delta)$$, over all $$(i,j)$$ pairs, half will be positive and half will be negative: the median pairwise difference will be zero. The Hodges-Lehmann estimator corresponding to a rank test is the amount you have to slide the data to make the test perfectly null, so $$\delta$$.

4. It's slightly misleading to say the Mann-Whitney is a test for the median pairwise difference. It is, but not in the same way that the t-test is a test for the mean or Mood's median test is a test for the median. If $$X$$ has a higher mean than $$Y$$ and $$Y$$ has a higher mean than $$Z$$, then you know $$X$$ has a higher mean than $$Z$$. If $$X$$ has a higher median than $$Y$$ and $$Y$$ has a higher median than $$Z$$, then you know $$X$$ has a higher median than $$Z$$. But if the median pairwise difference for $$X$$ and $$Y$$ is positive and the median pairwise difference for $$Y$$ and $$Z$$ is positive, this does not guarantee that the median pairwise difference for $$X$$ and $$Z$$ is positive. The Mann-Whitney test is not transitive, and it is not consistent with any ordering on all possible distributions – or even with any ordering on quite small sets of distributions.

• Thank you. This cleared up a lot. I have just one more question. For the situation, where I would want to extend the interpretation of the Mann Whitney test to compare medians (when the distributions for groups are equal, how would one go by checking to see if the distributions are equal? I can think of three ways, a QQ plot, a visual inspection of the two distributions, or a KS test. However, I am not sure what the convention is.
– Neal
Jun 3, 2020 at 3:28
• I don't know if there's a convention. There is a genuine test for the median or other quantiles (en.wikipedia.org/wiki/Median_test), which you should use if medians are reallly what you care about. I'd also do a visual inspection. The KS test is not specific for medians or location, so I wouldn't use it. Jun 3, 2020 at 3:34
• The Mann-Whitney is not so much equivalent to the Wilcoxon rank sum test, as it is an extension of the rank sum test to cases where the sample sizes of the two groups may be different. Excellent answer! Jun 3, 2020 at 23:10
• For those who are reading this post in the future, I recommend reading this very clear article on the Mann Whitney test. In addition to Thomas' post, the article cleared up all of my questions. statistics.laerd.com/statistical-guides/…
– Neal
Jun 3, 2020 at 23:10