1.3 - Mann-Whitney U test

1.3 - Mann-Whitney U test

Learn how to compare two independent groups using ranked scores, handle tied scores fairly, calculate U and reach a justified significance decision.

When Mann-Whitney U is appropriate

Mann-Whitney U tests for a difference between two independent groups using scores that can be ranked.

Imagine that one group learns a word list using pictures and a different group learns it by repetition. Each person produces a recall score. The research question concerns a difference between groups, the design is independent measures, and the scores are at least ordinal: their order has meaning. These are the three selection decisions. Interval or ratio scores may also be ranked, particularly when the assumptions of an appropriate parametric analysis are not met. Two separate groups can have different sample sizes.

Mann-Whitney U

A non-parametric test comparing the distributions of ranked scores from two independent groups.

The observations must be independent: recording five attempts from one person does not create five independent participants. Scores must measure a comparable outcome in both groups. The test does not require normal distributions. However, describing a significant result specifically as a difference in population medians requires comparable distribution shapes; otherwise differences in spread or shape may contribute. A rank test has assumptions even though it is non-parametric.

For the picture/repetition example, a non-directional alternative predicts a difference in recall, while the null predicts no population difference in the distributions of recall scores. A directional alternative predicts which group tends to score higher and must be chosen before inspecting the results. The analysis does not repair a confounded design: if the picture group also has more revision time, a significant result alone cannot establish the effect of pictures.

Pool the scores and handle ties

Mann-Whitney ranking uses all scores from both groups together, while retaining each score's group identity.

Give the lowest score rank 1, the next rank 2 and continue to the total number of observations. Ranking each group separately would erase the between-group ordering that the test needs. A tie occurs when two or more scores are equal. Every tied score receives the mean of the rank positions they occupy. If three equal scores occupy positions 4, 5 and 6, each receives (4+5+6)/3=5(4+5+6)/3=5; the next score receives rank 7. Equal scores must never be arbitrarily given different ranks.

This original example uses recall scores from two independent groups, A and B:

Group AGroup B
61
82
93
104
127

The pooled calculation table makes the ordering visible:

ScoreGroupRank
1B1
2B2
3B3
4B4
6A5
7B6
8A7
9A8
10A9
12A10

Therefore RA=5+7+8+9+10=39R_A=5+7+8+9+10=39 and RB=1+2+3+4+6=16R_B=1+2+3+4+6=16. The total is 55, which agrees with 10(10+1)/210(10+1)/2, the sum of ranks 1 to 10. Average ties preserve this total too. A failed rank-total check signals an error before the formula is used.

Calculate both U values

The rank sums are converted into two U values, and the smaller value is used with the usual lower-tail critical-value table.

Use the formula supplied in the task. The following form matches OCR's current Mann-Whitney guidance:

U1=R1−n1(n1+1)2,U2=R2−n2(n2+1)2U_1=R_1-\frac{n_1(n_1+1)}{2},\qquad U_2=R_2-\frac{n_2(n_2+1)}{2}

Here R1,R2R_1,R_2 are group rank sums and n1,n2n_1,n_2 are their sample sizes. The observed statistic is U=min⁡(U1,U2)U=\min(U_1,U_2).

In the example, nA=nB=5n_A=n_B=5, so:

UA=39−5(6)2=24,UB=16−5(6)2=1.U_A=39-\frac{5(6)}{2}=24,\qquad U_B=16-\frac{5(6)}{2}=1.

The observed U is 1. As a check, UA+UB=25=nAnBU_A+U_B=25=n_An_B. A small U means the group scores have relatively little overlap. U has no recall-score unit: it is a statistic derived from ranks, rather than the number of words remembered.

Calculate both values rather than automatically using the smaller raw rank sum. With unequal sample sizes, each group has a different subtraction term. Another valid supplied formula can label the complementary U values in the opposite order; consistent use still gives the same smaller U. Follow the task's formula and definitions, rather than mixing two conventions halfway through.

Use the correct critical value

A Mann-Whitney significance decision compares the observed U with the entry for both group sizes, the chosen significance level and the hypothesis direction.

The following supplied extract is for a two-tailed test at α=0.05\alpha=0.05. It follows the OCR workbook table. Rows give n1n_1; columns give n2n_2.

n1n_1n2=5n_2=5n2=6n_2=6
523
635

For the worked example, the correct entry is 2 because each group contains five people. The result is significant when observed U is less than or equal to the critical U. Thus 1≤21\leq2, so reject the null hypothesis at the 5% level: there is evidence of a difference between the recall-score distributions. Group A's ranks indicate the higher scores in this sample. A low U alone does not identify the higher group; inspect the original scores or group ranks.

The significance level is a decision threshold for the probability of outcomes at least as extreme under the null model. Significance does not give the probability that the null is true, prove causation, or tell us that the difference is educationally large. If U exceeds the critical value, fail to reject the null; that does not prove identical populations.

The example has no ties. Although average ranks correctly calculate U when ties occur, ordinary small-sample exact tables assume untied ranks. A real analysis with many ties needs a suitable tie-aware or permutation procedure. In a supplied exam task, use its stated formula/table support and give the decision requested; do not silently invent an adjustment. Never switch to a one-tailed table after noticing an attractive result, and confirm that a directional result is in the predicted direction.