The Mann-Whitney U test, also called the Wilcoxon rank-sum test, is a non-parametric test. It checks continuous or ordinal data for a significant difference between two independent groups. The test merges the data from the two groups. Then, it sorts the data by the value. Unlike the t-test that compares the groups' averages, the rank test compares the entire distributions.
When the two groups' distributions have a similar shape, the test will also compare the median of each group.
For symmetrical distribution, the median is the average.
Higher rank, Ri, for group i (lower Ui), says that the probability to get higher value from this group is higher.
Following an example:
RB > RC, μB < μC.
The rank of group B, 108, is greater than the rank of group C, 63. But the mean of group B, 20, is less than the mean of group C, 65.67.
There is a high probability that a random value from group B will be greater than random value from group C, but if you repeat this process 20 times, most likely you will accumulate a greater total from group C.
MedA = MedB, RB > RA.
The median of group A, 20, equals to the median of group B, 20. But the rank of group B, 101.5, is greater than the rank of group A, 69.5. There is a high probability that the random value from group B will be greater than the random value from group A.
Calculated the distribution, p(U1 or to get higher value from Group2. It calculates the U for all the combinations:
$$p(U = u) = \frac$$ The method requires high calculation power, the calculation duration grows exponentially to the total sample size (n1 + n2).
The calculation is accurate only when the data does not have ties. The tool uses pre-calculated data to save performance time.
To get more accurate results, the tool uses the ties corrections, and optionally use the continuity correction and. ties is a group of observations with the same value. $$ Z = \frac < U_2 - \mu_u + C_> $$ $$ \mu= \frac $$ $$ \sigma^2= \frac (1 - C_)$$
$$n = n_1 + n_2
\\ C_ = \sum_^>$$ t - group number of ties.
f_t - number of values in group t.
When using continuous distribution to calculate discrete data it is better to use continuity correction.
P(X < a) =>P(X < a - 0.5)
P(X > a) => P(X > a + 0.5)
As a result:
Right tail, or two tails with positive Z, (U2 > μ) , Ccontinuity = -0.5 .
Left tail, or two tails with negative Z, (U2 < μ) , Ccontinuity = 0.5 .
When we don't correct the data, Ccontinuity = 0.
The tool will use the exact method or the normal approximation per the method definition:
This is the recommended method!.
When n is small, n1 ≤ 20 and n2 ≤ 20, and the data doesn't have ties the tool will use the exact value from the pre-calculated data. Otherwise, the tool will use the normal approximation.
Using the 'Exact' method force the tool to use the exact method even when having ties.
When n is small, n1 ≤ 20 and n2 ≤ 20, the tool will use the exact value from tables. Otherwise, the tool will use the normal approximation.
The tool uses the normal approximation.
The common language effect size is the probability that a random value from Group1 is greater than random value from Group2.
$$f=\frac\\ r=\frac>$$
The following example checks the number of questions answered correctly by two independent groups. One group completed training before performed the test and the other group didn't do the training. Following the test results. The sample sizes: n1=8, n2=10. The significant level (α) is 0.05.
$$U_1 = n_1n2 + \frac - R_1\\ U_1 = 8*10+\frac - 54.5 = 61.5 \\ U_2=n_1n2+\frac - R_2 \\ U_2 =8*10+\frac - 116.5 = 18.5 \\ (U_1+U_2=61.5 + 18.5 = 80, n_1n_2=8*10 = 80)$$ U = min(61.5 , 18.5) = 18.5
The Mann-Whitney U distribution is discrete. We can calculate the exact cumulative probability, but we can not have critical value for the exact significance level. Hence we calculate the critical value that get the maximum significance level which is not greater than the required significance level (α).
When the statistic equal the critical value, you should reject the null assumption.
Since the data in this example contains ties, the exact calculation is not accurate. Therefore you should use the normal approximation with continuous correctiom.
P(X>63)=1 - P(X≤62)=0.02171. 0.02171P(X>62)=1 - P(X≤61)=0.02726. 0.02726>0.025.
The right critical value is 63, and the right edge of the region of acceptance is 62.
You may calculate as following right=n1n2-left. (8*10-17=63)
α / 2 = 0.05. $$P(X \leq 0)=\frac=\frac=0.029\\ P(X \leq 1)=\frac=\frac=0.057$$ The left critical value - the first value that gets a cumulative probability greater than 0.05 is x=1 $$P(X \geq 12)=\frac=\frac=0.029\\ P(X \geq 11)=\frac=\frac=0.057$$ The right critical value - the first value that gets cumulative probability which is greater than 0.05 is for x=11. Since the distribution is symmetrical you may get the same result as following: 12 - 1 = 11.
$$P(X \leq 1)=\frac=0.057\\ P(X \leq 2)=\frac=0.114$$ Critical value - the first value that gets cumulative probability which is greater than 0.1 is for x=2.
1+1>$$P(X \geq 11)=\frac=0.057\\ P(X \geq 10)=\frac=0.114$$ Critical value - the first value that gets cumulative probability which is greater than 0.1 is for x=10.1+1>