I'm just curious about the null hypothesis of a Mann-Whitney U test. I often see it stated that the null hypothesis is that two populations have equal distributions. But I'm thinking - if I had two normal populations with the same mean but extremely unequal variance, the Mann-Whitney test would probably not detect this difference.

I have also seen it stated that the null hypothesis of the Mann-Whitney test is $\Pr(X>Y)=0.5$ or the probability of an observation from one population ($X$) exceeding an observation from the second population ($Y$) (after exclusion of ties) is equal to 0.5. This seems to make a bit more sense but does not seem equivalent to the first null hypothesis I stated.

I'm hoping to get a bit of help untangling this. Thanks!


2 Answers 2


The Mann-Whitney test is a special case of a permutation test (the distribution under the null is derived by looking at all the possible permutations of the data) and permutation tests have the null as identical distributions, so that is technically correct.

One way of thinking of the Mann-Whitney test statistic is a measure of the number of times a randomly chosen value from one group exceeds a randomly chosen value from the other group. So the P(X>Y)=0.5 also makes sense and this is technically a property of the equal distributions null (assuming continuous distributions where the probability of a tie is 0). If the 2 distributions are the same then the probability of X being Greater than Y is 0.5 since they are both drawn from the same distribution.

The stated case of 2 distributions having the same mean but widely different variances matches with the 2nd null hypothesis, but not the 1st of identical distributions. We can do some simulation to see what happens with the p-values in this case (in theory they should be uniformly distributed):

> out <- replicate( 100000, wilcox.test( rnorm(25, 0, 2), rnorm(25,0,10) )$p.value )
> hist(out)
> mean(out < 0.05)
[1] 0.07991
> prop.test( sum(out<0.05), length(out), p=0.05 )

        1-sample proportions test with continuity correction

data:  sum(out < 0.05) out of length(out), null probability 0.05
X-squared = 1882.756, df = 1, p-value < 2.2e-16
alternative hypothesis: true p is not equal to 0.05
95 percent confidence interval:
 0.07824054 0.08161183
sample estimates:

So clearly this is rejecting more often than it should and the null hypothesis is false (this matches equality of distributions, but not prob=0.5).

Thinking in terms of probability of X > Y also runs into some interesting problems if you ever compare populations that are based on Efron's Dice.

  • $\begingroup$ Hi Greg, thank you for the answer. It sounds like what you are saying is I found somewhat of a special case where the test does not work properly under the equal distributions null. And furthermore, the null hypotheses I stated are not equal. Is that correct? $\endgroup$
    – Jimj
    Commented Apr 20, 2013 at 0:27

Mann-Whitney isn't sensitive to changes in variance with equal mean, but it can - as you see with the $P(X>Y)=0.5$ form, detect differences that lead $P(X>Y)$ to deviate from $0.5$ (e.g. where both mean and variance increase together). Quite clearly if you had two normals with equal mean, their differences are symmetric about zero. Therefore $P(X>Y) = P(X-Y>0) = \frac{1}{2}$, which is the null situation.

For example, if you have the distribution of $Y$ being exponential with mean $1$ while $X$ has an exponential distribution with mean $k$ (a scale change), the Mann-Whitney is sensitive to that (indeed, taking logs of both sides, its just a location-shift, and the Mann-Whitney is unaffected by monotonic transformation).


If you're interested in tests which are conceptually very similar to the Mann-Whitney that are sensitive to differences in spread under equality of medians, there are several such tests.

There's the Siegel-Tukey test and the Ansari-Bradley test, for example, both closely related to the Mann-Whitney-Wilcoxon two sample test.

They are both based on the basic idea of ranking in from the ends.

If you use R, the Ansari-Bradley test is built in ... ?ansari.test

The Siegel-Tukey in effect just does a Mann-Whitney-Wilcoxon test on ranks computed from the sample differently; if you rank the data yourself, you don't really need a separate function for the p-values. Nevertheless, you can find some, as here:



(in relation to ttnphns' comment under my original answer)

You would be over-interpreting my response to read it as disagreeing with @GregSnow in any particularly substantive sense. There's certainly a difference in emphasis and to some extent in what we're talking about, but I'd be very surprised if there was much real disagreement behind it.

Let's quote Mann and Whitney: "A statistic $U$ depending on the relative ranks of the $x$'s and $y$'s is proposed for testing the hypothesis $f=g$." That's unequivocal; it utterly supports @GregSnow's position.

Now, let's see how the statistic is constructed: "Let $U$ count the number of times a $y$ precedes an $x$." Now if their null is true, the probability of that event is $\frac{1}{2}$ ... but there are other ways to get a probability of 0.5, and in that sense one might construe that the test can work in other circumstances. To the extent that they're estimating a (re-scaled) probability that $Y$>$X$, it supports what I said.

However, for the significance levels to be guaranteed to be exactly correct, you'd need the distribution of $U$ to match the null distribution. That's derived on the assumption that all the permutations of the $X$ and $Y$ group-labels labels to the combined observations under the null were equally likely. This is certainly the case under $f=g$. Exactly as @GregSnow said.

The question is the extent to which this is the case (i.e. that the distribution of the test statistic matches the one derived under the assumption that $f=g$, or approximately so), for the more generally expressed null.

I believe that in many situations that it does; in particular for situations including but more general than the one you describe (two normal populations with the same mean but extremely unequal variance can be generalized quite a bit without altering the resulting distribution based on ranks), I believe that the distribution of the test statistic turns out to have the same distribution under which it was derived and so should be valid there. I did some simulations that seem to support this. However, it won't always be a very useful test (it may have poor power).

I offer no proof that this is the case. I've applied some intuition/hand-wavy argument and also done some basic simulations that suggest it's true -- that the Mann-Whitney works (in that it has the 'right' distribution under the null) much more broadly than when $f=g$.

Make of it what you will, but I don't construe this as substantive disagreement with @GregSnow

Reference - Mann&Whitney's original paper

  • $\begingroup$ Did I get you right that you concur with this words from Wikipedia's Mann-Whitney talk page: the null hypothesis of Mann-Whitney U-test is not about the equality of distributions. Is is about the symmetry between two populations with respect to the probability of obtaining a larger observation. And so you don't agree with @Greg's answer, right? $\endgroup$
    – ttnphns
    Commented Apr 20, 2013 at 5:52
  • $\begingroup$ I have added some discussion in edit. $\endgroup$
    – Glen_b
    Commented Apr 20, 2013 at 7:14
  • $\begingroup$ Very nice addition. I'll be studying it (I always felt as if there are nuances in MW test that continue to elude me). Meanwhile, will you agree if I'd say: "Because MW test statistic reflects just the (in)equality of mean ranks, there can be situations when f~=g [I understand f,g as original distributions, prior ranking] but the test is nevetherless fully relevant as it continues to deal with the same H0 as under f=g. An example of such situation is symmetric distributions fully identical except for spread parameter (variance)". $\endgroup$
    – ttnphns
    Commented Apr 20, 2013 at 8:54
  • $\begingroup$ In the notation (Mann and Whitney's by the way), $f$ and $g$ are the densities of $X$ and $Y$. I'd agree that to the extent that I have verified/understood the circumstances, your statement appears to be the case. I suspect there's still plenty about the Mann-Whitney that eludes me also. $\endgroup$
    – Glen_b
    Commented Apr 20, 2013 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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