The Wilcoxon Rank-Sum Test for Two Independent Samples | OCR A Level Further Maths notes

Free preview: The Wilcoxon Rank-Sum Test for Two Independent Samples

Comparing Two Groups by Ranks

Year 1 or Year 2: the rank-sum test is in OCR A's Statistics option (5.07); check your own specification for which year.

Let's start with the problem. A gardener tries a new fertiliser on 5 plots and the old one on 7. Two independent groups, small samples, and no reason to think yields are Normal. A two-sample t-test is out. Here's a clever trick: forget the actual numbers, put all the values in one line in order, and see whether one group bunches at the top.

  • That is the Wilcoxon rank-sum test: it compares the groups using only the order of the values.
  • H0: the two populations have the same distribution (in particular, the same median).
  • H1: one population tends to have larger values (one-tailed), or their medians differ (two-tailed).
  • Assumptions: the samples are independent and random, and the two distributions have the same shape (so a difference means a shift).

The method

  1. Label the sizes. Call the smaller sample size m and the larger n.
  2. Rank everything together, all m + n values, from 1 (smallest). Tied values share the average rank. Why together? We want to see where each group sits in the combined order.
  3. Add up the ranks of the smaller sample: W.
  4. Find the mirror sum m(m+n+1)−W, the rank sum the smaller sample would have if the order were reversed.
  5. Choose T: whichever of these H1 predicts to be small (two-tailed: the smaller of the two).
  6. Decide: reject H0 if T is less than or equal to the table's critical value.

T=W or m(m+n+1)−W,reject H0 if T⩽critical value

💡 In plain words

  • If the groups are alike, the ranks are well mixed, and the smaller sample's rank sum is about m(m+n+1)2.
  • If one group is mostly at the bottom of the ordering, its rank sum is very small: evidence of a difference.

Critical values for W (reject if T ≤ value)

m, none-tail 5%one-tail 2.5%one-tail 1%
4, 6131211
5, 7212018
5, 8232119
6, 8312927
6, 9333128
8, 10565349
  • A two-tailed 5% test uses the 2.5% column, as usual.

👀 Watch me do it: 3 phones of brand S last 14, 9 and 17 hours; 5 phones of brand L last 11, 20, 16, 22 and 18 hours. Find W, its mirror and the value expected under H0

What I writeWhy I do it
m = 3 (S), n = 5 (L)Step 1: the smaller sample is S.
Combined order: 9, 11, 14, 16, 17, 18, 20, 22 with ranks 1 to 8Step 2: rank all 8 together.
S has 9 (rank 1), 14 (rank 3), 17 (rank 5)Pick out the smaller sample's ranks.
W=1+3+5=9Step 3.
Mirror 3(3+5+1)−9=27−9=18Step 4: S's rank sum if the order were reversed.
Expected 3×92=13.5, halfway between 9 and 18W = 9 is below it: S's phones sit low in the order. Whether that is low enough is what the table decides.

✏️ YOUR TURN 1

Try this first:

Samples of 4 and 6 are ranked together. The smaller sample has ranks 2, 3, 5, 7. Find W, the mirror sum, and the value expected under H0.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in Non-Parametric Tests

  1. Non-Parametric Tests and the Sign Test for a Median
  2. The Wilcoxon Signed-Rank Test: Single Samples and Paired Data
  3. The Wilcoxon Rank-Sum Test for Two Independent Samples

What's inside for this topic

3 teacher notes, 68 practice questions, 45 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: The Wilcoxon Signed-Rank Test: Single Samples and Paired Data

All OCR A Level Further Maths topics · A Level Further Maths