Suppose the data for the first sample (Samp1) are 22, 24, 25, 29, 30 and the data for the second sample (Samp2) are 16, 21, 22, 23. The output from the Mann-Whitney test is:
The point estimate for η1 – η2 is the median of all possible pairwise differences between the two samples.
For this example, there are 5*4 = 20 pairwise differences. The possible pairwise differences for this example are: 22-16 = 6, 22-21 = 1, 22-22= 0, 22-23= −1, 8, 3, 2, 1, 9, 4, 3, 2, 13, 8, 7, 6, 14, 9, 8, 7.
You can get all the pairwise differences between 2 columns in Minitab by choosing
.The median of these differences is 6.
W = (number of positive differences) + 0.5(number of differences that equal 0) + 0.5(n1(n1+1)) where n1 = number of observations in the first sample.
For this example, W = 18 + 0.5(1) + 0.5*5*6 = 18 + 0.5 + 15 = 33.5.
The p-value is based on the test statistic for W. The test statistic, Z, (which is not part of the output) is a normal approximation using the mean and variance of W.
Mean of W = 0.5(n1 (n1 + n2 + 1)) variance of W = n1*n2(n1+n2+1)/12 where n1 and n2 are the number of observations in the first and second sample, respectively.
Z = (|W - mean of W| - .5)/square root of the variance of W.
Subtracting the .5 from the numerator is the continuity correction factor.
The p-value for Ha: η1 < η2 is CDF(Z). The p-value for Ha: η1 > η2 is (1 - CDF(Z)). The p-value for Ha: η1 ≠ η2 is 2*(1 - CDF(Z)). Where CDF is the cumulative probability of a standard normal distribution.
Z = (|33.5 - 25| - .5)/sqrt(16.6667) = 1.9596
The p-value for Ha: η1 ≠ η2 is 2*(1 - 0.974979.) = 0.05.
You can get the cumulative probabilities in Minitab by choosing
.