Statistic Mann-Whitney Table how to calculate the table

548 Views Asked by At

In this link there's a tutorial about Mann-Whitney: https://www.real-statistics.com/non-parametric-tests/mann-whitney-test/ . It uses critical values of U test that is given in a table.

However, it doesn't say how to calculate the table itself. I've searched a few more pages and they all use the tables directly, without showing how to calculate it.

So, given 3 values alpha, n1, n2; how to calculate Ucrit(alpha,n1,n2) ?

1

There are 1 best solutions below

1
On BEST ANSWER

The table of critical values is generated from the probability distribution of the $U$-statistic, as described in the original paper by Mann and Whitney. In particular, the authors describe a recursion relation

$$p_{n,m}(U) = \begin{cases} \mathbb 1(U = 0), & n = 0 \text{ or } m = 0 \\ \displaystyle\frac{n p_{n-1,m}(U-m) + m p_{n,m-1}(U)}{n+m}, & n, m > 0, \end{cases}$$ where $n, m$ denote the group sample sizes, and $U$ is the value of the $U$ statistic. Then $p_{n,m}(U)$ describes the probability of observing $U$ for the given $n, m$.

For example, we have the following table for $n = 7$, $1 \le m \le 7$, and $0 \le U \le 6$ (although the rows go up to $U = n^2 = 49$):

$$ \begin{array}{c|ccccccc} & & & & m & & & \\ U & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 0 & \frac{1}{8} & \frac{1}{36} & \frac{1}{120} & \frac{1}{330} & \frac{1}{792} & \frac{1}{1716} & \frac{1}{3432} \\ 1 & \frac{1}{8} & \frac{1}{36} & \frac{1}{120} & \frac{1}{330} & \frac{1}{792} & \frac{1}{1716} & \frac{1}{3432} \\ 2 & \frac{1}{8} & \frac{1}{18} & \frac{1}{60} & \frac{1}{165} & \frac{1}{396} & \frac{1}{858} & \frac{1}{1716} \\ 3 & \frac{1}{8} & \frac{1}{18} & \frac{1}{40} & \frac{1}{110} & \frac{1}{264} & \frac{1}{572} & \frac{1}{1144} \\ 4 & \frac{1}{8} & \frac{1}{12} & \frac{1}{30} & \frac{1}{66} & \frac{5}{792} & \frac{5}{1716} & \frac{5}{3432} \\ 5 & \frac{1}{8} & \frac{1}{12} & \frac{1}{24} & \frac{1}{55} & \frac{7}{792} & \frac{7}{1716} & \frac{7}{3432} \\ 6 & \frac{1}{8} & \frac{1}{9} & \frac{7}{120} & \frac{3}{110} & \frac{5}{396} & \frac{1}{156} & \frac{1}{312} \\ \end{array}$$ and then we compute the cumulative distribution as the sum of entries in all the rows above a cell in a given column:

$$\begin{array}{c|ccccccc} & & & & m & & & \\ U& 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 0 & 0.125 & 0.0277778 & 0.00833333 & 0.0030303 & 0.00126263 & 0.000582751 & 0.000291375 \\ 1 & 0.25 & 0.0555556 & 0.0166667 & 0.00606061 & 0.00252525 & 0.0011655 & 0.000582751 \\ 2 & 0.375 & 0.111111 & 0.0333333 & 0.0121212 & 0.00505051 & 0.002331 & 0.0011655 \\ 3 & 0.5 & 0.166667 & 0.0583333 & 0.0212121 & 0.00883838 & 0.00407925 & 0.00203963 \\ 4 & 0.625 & 0.25 & 0.0916667 & 0.0363636 & 0.0151515 & 0.00699301 & 0.0034965 \\ 5 & 0.75 & 0.333333 & 0.133333 & 0.0545455 & 0.0239899 & 0.0110723 & 0.00553613 \\ 6 & 0.875 & 0.444444 & 0.191667 & 0.0818182 & 0.0366162 & 0.0174825 & 0.00874126 \\ 7 & 1. & 0.555556 & 0.258333 & 0.115152 & 0.0530303 & 0.025641 & 0.0131119 \\ 8 & 1. & 0.666667 & 0.333333 & 0.157576 & 0.0744949 & 0.0367133 & 0.0189394 \\ 9 & 1. & 0.75 & 0.416667 & 0.206061 & 0.10101 & 0.0506993 & 0.0265152 \\ 10 & 1. & 0.833333 & 0.5 & 0.263636 & 0.133838 & 0.0687646 & 0.0364219 \\ 11 & 1. & 0.888889 & 0.583333 & 0.324242 & 0.171717 & 0.0903263 & 0.0486597 \\ 12 & 1. & 0.944444 & 0.666667 & 0.393939 & 0.215909 & 0.117133 & 0.0641026 \\ 13 & 1. & 0.972222 & 0.741667 & 0.463636 & 0.265152 & 0.147436 & 0.0824592 \\ 14 & 1. & 1. & 0.808333 & 0.536364 & 0.319444 & 0.182984 & 0.104312 \\ 15 & 1. & 1. & 0.866667 & 0.606061 & 0.377525 & 0.222611 & 0.129662 \\ 16 & 1. & 1. & 0.908333 & 0.675758 & 0.438131 & 0.2669 & 0.1588 \\ 17 & 1. & 1. & 0.941667 & 0.736364 & 0.5 & 0.314103 & 0.191434 \\ 18 & 1. & 1. & 0.966667 & 0.793939 & 0.561869 & 0.365385 & 0.227855 \\ 19 & 1. & 1. & 0.983333 & 0.842424 & 0.622475 & 0.417832 & 0.267483 \\ 20 & 1. & 1. & 0.991667 & 0.884848 & 0.680556 & 0.472611 & 0.310023 \\ \end{array}$$

Since the cumulative table is the one we need to look at, I have shown more rows.

Then if we want to find the critical value for a given $\alpha$ and $(n,m)$, we find the largest $U$ in the respective cumulative table for which the corresponding cell entry does not exceed $\alpha/2$. For example, the critical value for $\alpha = 0.10$ and $(n, m) = (7,6)$ is $U = 8$, since the corresponding entry in the above table is $0.0367133$, the largest value in the $m = 6$ column that does not exceed $0.05$.