# Minimum meaningful statistical level for the Mann–Whitney U test

The Mann–Whitney U test is one of the most popular nonparametric null hypothesis significance tests. However, like any statistical test, it has limitations. We should always carefully match them with our business requirements. In this post, we discuss how to properly choose the statistical level for the Mann–Whitney U test on small samples.

Let’s say we want to compare two samples $$x = \{ x_1, x_2, \ldots, x_n \}$$ and $$y = \{ y_1, y_2, \ldots, y_m \}$$ using the one-sided Mann–Whitney U test. Sometimes, we don’t have an opportunity to gather enough data and we have to work with small samples. Imagine that the size of both samples is six: $$n=m=6$$. We want to set the statistical level $$\alpha$$ to $$0.001$$ (because we really don’t want to get false-positive results). Is it a valid requirement? In fact, the minimum p-value we can observe with $$n=m=6$$ is $$\approx 0.001082$$. Thus, with $$\alpha = 0.001$$, it’s impossible to get a positive result. Meanwhile, everything is correct from the technical point of view: since we can’t get any positive results, the false positive rate is exactly zero which is less than $$0.001$$. However, it’s definitely not something that we want: with this setup the test becomes useless because it always provides negative results regardless of the input data.

This brings an important question: what is the minimum meaningful statistical level that we can require for the one-sided Mann–Whitney U test knowing the sample sizes?

The Mann–Whitney U test is a rank-based test. It means that it takes into account only the relative positions of the sample elements. The worst case for this test is a situation when all elements from one sample are less (or greater) then all samples of the other sample. Here is an example of such a configuration:

$x_1 \leq x_2 \leq \ldots \leq x_n < y_1 \leq y_2 \leq \ldots \leq y_m.$

Now let’s assume that the null hypothesis is true and that both samples were taken from the same distribution. What is the probability of getting the above configuration by chance? The answer is the same as the probability of having the first $$n$$ elements on the first $$n$$ positions among $$n+m$$ elements. Thus, the minimum p-value that we can observe is

$p_{\min} = \frac{1}{C_{n+m}^n} = \frac{n! \cdot m!}{(n+m)!}$

Here are some $$p_{\min}$$ values for $$n,m \leq 10$$:

12345678910
10.5000000.3333330.2500000.2000000.1666670.1428570.1250000.1111110.1000000.090909
20.3333330.1666670.1000000.0666670.0476190.0357140.0277780.0222220.0181820.015152
30.2500000.1000000.0500000.0285710.0178570.0119050.0083330.0060610.0045450.003497
40.2000000.0666670.0285710.0142860.0079370.0047620.0030300.0020200.0013990.000999
50.1666670.0476190.0178570.0079370.0039680.0021650.0012630.0007770.0005000.000333
60.1428570.0357140.0119050.0047620.0021650.0010820.0005830.0003330.0002000.000125
70.1250000.0277780.0083330.0030300.0012630.0005830.0002910.0001550.0000870.000051
80.1111110.0222220.0060610.0020200.0007770.0003330.0001550.0000780.0000410.000023
90.1000000.0181820.0045450.0013990.0005000.0002000.0000870.0000410.0000210.000011
100.0909090.0151520.0034970.0009990.0003330.0001250.0000510.0000230.0000110.000005

From this table, we can find the answer for the example from the beginning of this post. Fo $$n=m=6$$, the lowest p-value we can observe is $$1/C_{12}^6 \approx 0.001082$$. If we set the statistical level $$\alpha = 0.001$$, the Mann–Whitney U test will never provide a positive result.

If we want to make the use of the one-sided Mann–Whitney U test meaningful, we always should choose $$\alpha$$ which is bigger than $$1/C_{n+m}^n$$.