The Mann-Whitney test is a nonparametric method for comparing two independent groups when a two-sample test may not be appropriate. It is commonly used when data are ordinal, skewed, or measured on a scale where normality is doubtful. This cheat sheet helps students organize the full walkthrough, from hypotheses to ranking, calculating , finding a -value, and stating a conclusion.
It is especially useful because small ranking errors can change the final test statistic.
The core idea is to combine both samples, rank all observations, and compare the rank totals between groups. For group sizes and , compute and , then use for many table-based tests. For large samples, can be standardized with , where and when there are no ties.
The final interpretation should connect the statistical result to the original context, not just report whether .
Key Facts
- The Mann-Whitney test compares two independent groups using ranks rather than raw data values.
- The null hypothesis is usually : the two population distributions are the same, while the alternative states that one distribution tends to have larger values or that the distributions differ.
- After combining both samples and ranking all observations, the rank sum for group is and the rank sum for group is .
- The test statistics are and .
- The two statistics satisfy , which is a useful arithmetic check.
- For many small-sample procedures, the reported statistic is .
- For large samples with no ties, use and to compute .
- A common rank-biserial effect size is when is the smaller statistic.
Vocabulary
- Mann-Whitney U test
- A nonparametric test that compares two independent groups by analyzing the ranks of all observations.
- Rank sum
- The total of the assigned ranks for one group after all observations from both groups are combined and ordered.
- Independent samples
- Samples are independent when observations in one group are not paired with or directly related to observations in the other group.
- Tie
- A tie occurs when two or more observations have the same value and must receive the average of their rank positions.
- Normal approximation
- A large-sample method that converts the statistic to a score so a normal distribution can estimate the -value.
- Rank-biserial correlation
- An effect size that describes the strength and direction of the difference between two groups based on rank dominance.
Common Mistakes to Avoid
- Ranking the two groups separately is wrong because the Mann-Whitney test requires ranking all observations together in one combined list.
- Ignoring ties is wrong because tied observations should receive average ranks, and many large-sample calculations need a tie correction when ties are frequent.
- Using the larger when a table expects is wrong because many critical-value tables are built for the smaller of the two statistics.
- Treating the test as automatically comparing means is wrong because the Mann-Whitney test primarily compares rank distributions and is often interpreted as a difference in typical values only under similar distribution shapes.
- Reporting only is incomplete because a good conclusion should include the context, direction of the difference, and an effect size such as when appropriate.
Practice Questions
- 1 Two independent samples have , , and group rank sum . Compute , , and .
- 2 For and with no ties, compute and .
- 3 A study reports , , and . Compute the rank-biserial effect size using .
- 4 Explain why the Mann-Whitney test may be preferred over an independent two-sample test for ordinal survey ratings or strongly skewed data.
Understanding Mann-Whitney U Test Walkthrough
A helpful way to understand this test is through every possible cross-group pair. Match each observation from the first group with each observation from the second group. For each match, note which value is higher.
The U statistic is closely connected to the number of times one group wins these pairwise comparisons. This gives the test a practical meaning. If a randomly chosen student from group one usually has a higher score than a randomly chosen student from group two, the results will tend to show it.
The test does not use the size of each numerical gap. A difference of one point and a difference of fifty points affect ordering in the same basic way.
Independence matters most. Each person or object should contribute one observation, and membership in one group must not affect membership in the other group. A treatment group and a separate control group can fit this design.
Scores before and after training from the same students do not fit, because those measurements are paired. That situation needs a paired rank test instead. The method works well for ratings such as pain levels, satisfaction scales, or ordered performance categories.
It can be used with numerical measurements too, but it is not automatically a test of medians. Interpreting it as a median comparison is safest when the two population distributions have a similar shape and spread.
Ties need careful handling because equal values cannot receive different positions in the ordered list. Give every tied value the average of the ranks it would have occupied. For example, if three equal observations would occupy ranks four, five, and six, each receives rank five.
Ties make large-sample calculations less simple because they reduce the natural variation in ranks. Statistical software usually applies the needed tie correction, but students should check that the software setting is appropriate. With small samples, an exact method is often preferred.
With larger samples, the normal approximation is common. Some courses use a continuity correction in that approximation, so follow the rule required by the class or textbook.
Choose a one-sided or two-sided alternative before examining the data. A one-sided test is justified only when a direction was predicted in advance, such as expecting a new teaching method to increase scores. A two-sided test is appropriate when either direction would matter.
Report group sizes, a useful summary for each group, the test statistic, the p value, and an effect size. The rank-biserial effect size describes the direction and strength of the pairwise advantage. A result can be statistically significant with a tiny effect when samples are large.
A non-significant result does not prove the groups are identical. It means the sample did not provide strong enough evidence under the chosen test conditions.