The Wilcoxon-Mann-Whitney test, often just referred to as the Mann-Whitney U test, is a nonparametric test of the null hypothesis that two samples come from the same population against an alternative hypothesis, especially that a particular population tends to have larger values than the other.
It’s often used when the data are not normally distributed and is especially useful for comparing two small sets of observations.
Here’s a step-by-step process of how it works:
1. Combine and Rank the Data: First, you’ll combine all the data from the two samples. Then, you’ll rank the combined data in ascending order, assigning each observation a rank.
2. Calculate U Statistics: The next step is to calculate the U statistic for each sample. The U statistic for a sample is the sum of the ranks in that sample minus the theoretical minimum of the sum of ranks if all the smallest ranked observations were in that sample. This is often expressed as: U = R – [n(n+1)/2] where R is the sum of the ranks in the sample and n is the number of observations in the sample.
3. Determine the Smaller U value: In a two-sample test, there will be two U statistics. Choose the smaller of the two U statistics.
4. Compare to Critical Value: The final step is to compare the smaller U statistic to a critical value from the U distribution. If the U statistic is less than or equal to the critical value, then the null hypothesis can be rejected.
If the Mann-Whitney U test leads to the rejection of the null hypothesis, the conclusion is that there is evidence that the two samples do not come from populations with the same median, i.e., one sample tends to have larger values than the other.
Note: The Mann-Whitney U test only provides ordinal information. For example, it can tell you which group is superior, but it can’t tell you by how much (unlike a t-test). It also does not assume normality in the data and can thus be used when this assumption is violated.