AS & A Level · Practice questions · Wilcoxon rank-sum test

Rank, sum, compare.

Six original Cambridge-style questions on the Wilcoxon rank-sum test: ranking two independent samples together, finding \(W\), table tests at different levels, the normal approximation with a continuity correction, and the exact distribution that the tables come from.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
The method

Combine, rank, sum, take the smaller.

01
Recall
[3 marks]

Sample A: 4.7, 6.2, 5.1. Sample B: 5.8, 7.3, 6.6, 4.9, 7.0.

Find \(R_m\) and the value of the Wilcoxon rank-sum statistic \(W\).

  • Combined order: 4.7 (A), 4.9, 5.1 (A), 5.8, 6.2 (A), 6.6, 7.0, 7.3. ✓
  • A has ranks 1, 3, 5, so \(R_m = 9\). ✓
  • \(m(n + m + 1) - R_m = 3 \times 9 - 9 = 18\), so \(W = 9\). ✓
02
Calculation
[5 marks]

The times (seconds) taken to solve a puzzle were recorded for two groups. Group A (no hint): 61, 55, 48, 66, 52. Group B (a misleading hint): 70, 58, 74, 63, 68, 77.

Test at the 5% significance level whether times in group A tend to be shorter than times in group B.

  • \(H_0\): the times for A and B come from identical populations. \(H_1\): times for A tend to be shorter. One-tailed, \(m = 5,\ n = 6\). ✓
  • Combined order: 48 (A), 52 (A), 55 (A), 58, 61 (A), 63, 66 (A), 68, 70, 74, 77. A has ranks 1, 2, 3, 5, 7. ✓
  • \[ R_m = 18, \quad 5 \times 12 - 18 = 42, \quad W = 18 \] ✓
  • A ranks low, as \(H_1\) claims. Critical value for \(m = 5,\ n = 6\), one-tailed 5%: \(20\). ✓
  • \(18 \le 20\): reject \(H_0\). There is sufficient evidence at the 5% level that times in group A tend to be shorter. ✓
03
Calculation
[6 marks]

Concentrations of a pollutant (mg per litre) were measured at two rivers. River P: 12.1, 15.4, 13.8, 11.2, 14.6, 16.9. River Q: 17.3, 15.9, 18.8, 13.1, 19.4, 17.8, 20.2.

(a) Test at the 1% significance level whether the concentrations at the two rivers differ.

(b) State, with a reason, whether the conclusion would be different at the 5% level.

  • (a) \(H_0\): the concentrations at P and Q come from identical populations. \(H_1\): they differ. Two-tailed, \(m = 6,\ n = 7\). ✓
  • Combined order: 11.2 (P), 12.1 (P), 13.1, 13.8 (P), 14.6 (P), 15.4 (P), 15.9, 16.9 (P), 17.3, 17.8, 18.8, 19.4, 20.2. P has ranks 1, 2, 4, 5, 6, 8. ✓
  • \[ R_m = 26, \quad 6 \times 14 - 26 = 58, \quad W = 26 \] ✓
  • Two-tailed 1% (one-tailed 0.005) critical value for \(m = 6,\ n = 7\): \(24\). \(26 > 24\): do not reject \(H_0\). Insufficient evidence at the 1% level that the concentrations differ. ✓
  • (b) Two-tailed 5% (one-tailed 0.025) critical value: \(27\). \(26 \le 27\), so at 5% \(H_0\) would be rejected: there would be sufficient evidence that the concentrations differ. ✓
04
Analysis
[6 marks]

A teacher compares the scores of 15 students from School X with those of 20 students from School Y. In the combined ranking of all 35 scores (no ties), the School X students have rank sum 201.

Test at the 1% significance level whether scores at School X tend to be lower than those at School Y.

  • \(H_0\): the scores at X and Y come from identical populations. \(H_1\): scores at X tend to be lower. One-tailed, \(m = 15,\ n = 20\), beyond the tables. ✓
  • \(15 \times 36 - 201 = 339\), so \(W = 201\) (X ranks low, as \(H_1\) claims). ✓
  • \[ \begin{aligned} E &= \tfrac{1}{2}(15)(36) = 270 \\ \operatorname{Var} &= \tfrac{1}{12}(15)(20)(36) = 900 \end{aligned} \] ✓
  • \[ z = \frac{201.5 - 270}{30} = -2.283 \] ✓
  • One-tailed 1% critical value: \(-2.326\). Since \(-2.283 > -2.326\), do not reject \(H_0\). ✓
  • There is insufficient evidence at the 1% level that scores at School X tend to be lower. ✓
05
Proof
[5 marks]

Two independent samples have sizes \(m = 2\) and \(n = 3\), and \(H_0\) is true.

(a) List the 10 equally likely sets of ranks for the smaller sample and hence find the distribution of \(R_m\).

(b) Verify that \(E(R_m) = \tfrac{1}{2}m(m + n + 1)\) and \(\operatorname{Var}(R_m) = \tfrac{1}{12}mn(m + n + 1)\).

(c) Explain why no one-tailed test at the 5% level can reject \(H_0\) with these sample sizes.

  • (a) The sets {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {2,5}, {3,4}, {3,5}, {4,5} give sums 3, 4, 5, 6, 5, 6, 7, 7, 8, 9. ✓
  • \(R_m\) takes the values 3, 4, 5, 6, 7, 8, 9 with probabilities 0.1, 0.1, 0.2, 0.2, 0.2, 0.1, 0.1. ✓
  • (b) The distribution is symmetric about 6, so \(E(R_m) = 6 = \tfrac{1}{2}(2)(6)\). ✓
  • \[ E(R_m^{2}) = \frac{9 + 16 + 50 + 72 + 98 + 64 + 81}{10} = 39, \quad \operatorname{Var}(R_m) = 39 - 36 = 3 = \tfrac{1}{12}(2)(3)(6) \] ✓
  • (c) The smallest possible value, \(R_m = 3\), has probability 0.1, which is more than 0.05. No value of \(W\) is extreme enough, so the 5% critical region is empty. ✓
06
Analysis
[6 marks]

A researcher records the times (minutes) that two separate groups of volunteers take to fall asleep. Group A (warm drink): 42, 57, 49, 38. Group B (no drink): 61, 45, 66, 53, 71, 59, 64, 50.

(a) Give one reason why a Wilcoxon matched-pairs signed-rank test is not suitable, and one reason why the rank-sum test may be preferred to a two-sample \(t\)-test.

(b) Test at the 2.5% significance level whether volunteers in group A tend to fall asleep more quickly.

  • (a) The two groups are different people, so the data are not paired (the sizes, 4 and 8, cannot even be matched). The samples are small and there is no information that the times are normally distributed, which the \(t\)-test needs. ✓
  • (b) \(H_0\): the times for A and B come from identical populations. \(H_1\): times for A tend to be shorter. One-tailed, \(m = 4,\ n = 8\). ✓
  • Combined order: 38 (A), 42 (A), 45, 49 (A), 50, 53, 57 (A), 59, 61, 64, 66, 71. A has ranks 1, 2, 4, 7. ✓
  • \[ R_m = 14, \quad 4 \times 13 - 14 = 38, \quad W = 14 \] ✓
  • Critical value for \(m = 4,\ n = 8\), one-tailed 2.5%: \(14\). \(W = 14 \le 14\): reject \(H_0\). ✓
  • There is sufficient evidence at the 2.5% level that volunteers given a warm drink tend to fall asleep more quickly. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.