AS & A Level · Practice questions · Wilcoxon signed-rank tests

Rank, sum, compare.

Six original Cambridge-style questions on Wilcoxon signed-rank tests: finding \(P\), \(Q\) and \(T\), single-sample and matched-pairs tests with the table, large samples by a normal approximation, and the power and the limits of the test.

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

Differences, ranks, \(T\), table.

01
Recall
[2 marks]

In a Wilcoxon signed-rank test on 15 differences, the sum of the positive ranks is \(P = 87\). Find \(Q\) and the value of \(T\) for a two-tailed test.

  • \(P + Q = \tfrac{1}{2}(15)(16) = 120\), so \(Q = 120 - 87 = 33\). ✓
  • \(T = \min(87, 33) = 33\). ✓
02
Calculation
[5 marks]

Packets of rice are labelled with median mass 250 g. Eleven packets have masses (g)

253.8, 248.8, 255.6, 252.1, 249.6, 257.3, 254.5, 247.3, 256.1, 251.6, 258.2.

Assuming the masses are symmetrically distributed, use a Wilcoxon signed-rank test at the 5% level to test whether the median mass differs from 250 g. (Critical value for \(n = 11\), two-tailed 5%: 10.)

  • \(H_0: m = 250\), \(H_1: m \ne 250\), where \(m\) g is the population median mass. ✓
  • Differences: 3.8, -1.2, 5.6, 2.1, -0.4, 7.3, 4.5, -2.7, 6.1, 1.6, 8.2. ✓
  • The negative differences -0.4, -1.2, -2.7 have ranks 1, 2, 5, so \(Q = 8\) and \(P = 66 - 8 = 58\). ✓
  • \(T = \min(58, 8) = 8\), and \(8 \le 10\), so reject \(H_0\). ✓
  • There is sufficient evidence at the 5% level that the median mass is not 250 g. ✓
03
Calculation
[5 marks]

Two judges, A and B, score the same ten entries.

A: 7.4, 6.2, 8.9, 5.5, 7.8, 4.6, 6.9, 5.8, 9.1, 6.0
B: 6.8, 7.6, 6.6, 5.8, 6.1, 7.5, 6.0, 6.3, 5.7, 7.1

Test at the 5% level whether there is a difference between the judges' scores. (Critical value for \(n = 10\), two-tailed 5%: 8.)

  • \(H_0\): the population median of A - B is 0 (no difference between judges). \(H_1\): it is not 0. ✓
  • Differences A - B: 0.6, -1.4, 2.3, -0.3, 1.7, -2.9, 0.9, -0.5, 3.4, -1.1. ✓
  • Ranks of the absolute values: 0.3 (1), 0.5 (2), 0.6 (3), 0.9 (4), 1.1 (5), 1.4 (6), 1.7 (7), 2.3 (8), 2.9 (9), 3.4 (10). ✓
  • Positive ranks 3, 4, 7, 8, 10: \(P = 32\); \(Q = 55 - 32 = 23\). \(T = 23\). ✓
  • \(23 > 8\), so do not reject \(H_0\): insufficient evidence at the 5% level of a difference between the judges. ✓
04
Calculation
[5 marks]

A Wilcoxon signed-rank test of \(H_0: m = m_0\) against \(H_1: m < m_0\) uses a sample of 50 values and gives \(P = 420\).

(a) Explain why \(P\) is the appropriate test statistic.

(b) Using a normal approximation, carry out the test at the 5% level and at the 1% level.

  • (a) If \(m < m_0\), most differences \(x - m_0\) are negative, so the positive ranks, and their sum \(P\), should be small. ✓
  • \[\begin{aligned} E(T) &= \tfrac{50 \times 51}{4} = 637.5 \\ \operatorname{Var}(T) &= \tfrac{50 \times 51 \times 101}{24} = 10731.25 \end{aligned}\] ✓
  • \[z = \frac{420.5 - 637.5}{\sqrt{10731.25}} = \frac{-217}{103.59} = -2.095\] ✓
  • 5%: \(-2.095 < -1.645\), so reject \(H_0\): sufficient evidence that \(m < m_0\). ✓
  • 1%: \(-2.095 > -2.326\), so do not reject \(H_0\) at the 1% level. ✓
05
Analysis
[5 marks]

Ten differences are 2.4, 5.1, -0.8, 3.7, 1.5, 6.2, -1.1, 4.4, 0.6, 2.9. Test \(H_0\): median difference 0 against \(H_1\): median difference greater than 0.

(a) Carry out a sign test at the 5% level.

(b) Carry out a Wilcoxon signed-rank test at the 5% level (critical value 10).

(c) Explain why the conclusions differ, and state the extra assumption needed in (b).

  • (a) 8 of 10 are positive; \(X \sim B(10, 0.5)\): \(P(X \ge 8) = \dfrac{45 + 10 + 1}{1024} = 0.0547 > 0.05\). Do not reject \(H_0\). ✓
  • (b) The negative differences -0.8 and -1.1 have ranks 2 and 3, so \(Q = 5\), \(P = 50\). ✓
  • \(H_1\) predicts few negative ranks, so \(T = Q = 5 \le 10\): reject \(H_0\); sufficient evidence that the median difference is positive. ✓
  • (c) The Wilcoxon test also uses the fact that both negative differences are among the smallest; the sign test only counts signs, so it is less powerful. ✓
  • The Wilcoxon test assumes the population of differences is symmetric. ✓
06
Proof
[4 marks]

(a) Show that for a sample of 4 differences a one-tailed Wilcoxon signed-rank test can never reject \(H_0\) at the 5% level.

(b) Show that for \(n = 5\) the one-tailed 5% critical value is 0.

  • (a) Under \(H_0\) each of the \(2^{4} = 16\) sign patterns is equally likely. The smallest possible \(T\) is 0 (no ranks of the predicted sign). ✓
  • \(P(T = 0) = \tfrac{1}{16} = 0.0625 > 0.05\), so even \(T = 0\) is not significant: no critical region exists. ✓
  • (b) With \(2^{5} = 32\) patterns, \(T = 0\) needs all five signs the same way: \(P(T = 0) = \tfrac{1}{32} = 0.03125 \le 0.05\). ✓
  • \(T = 1\) occurs only when rank 1 alone has the other sign, so \(P(T \le 1) = \tfrac{2}{32} = 0.0625 > 0.05\). Hence the critical value is 0. ✓

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.