Maths4U
Menu

Maths4U Original · Learn, check, explain

Single-sample Wilcoxon signed-rank test — 9231 FPS

Use signed ranks and recognise the symmetry and continuity assumptions.

Notes and key methods

Remove zero differences, rank their absolute values, and sum ranks separately for positive and negative differences. Ties in absolute magnitude receive average ranks. State whether the test statistic is \(\displaystyle W^{+}, W^{−}\) or the smaller of the two.

The exact no-tie distribution treats all \(\displaystyle 2^{n}\) sign allocations as equally likely under a continuous symmetric null distribution of differences. For a directional alternative, select the matching tail before interpreting the result.

Check the conditions

Three worked examples

Example 1 · Wilcoxon signed-rank tests

Independent paired differences are \(-1,-2,3,4,5,6,7,8,9\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.

Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.

  1. Find W+, the sum of positive ranks.
  2. Find W−, the sum of negative ranks.
  3. Find the exact upper-tail p-value for W+.
  4. Find the sum of all ranks.
Show the reasoning

(a)

\(W^+=42\)

Answer: \(42\).

(b)

\(W^-=3\)

Answer: \(3\).

(c)

\(\displaystyle P(W^+\ge 42)=\frac{5}{512}\) by all 512 equally likely sign allocations.

Answer: \(\displaystyle \frac{5}{512}\).

(d)

\(\displaystyle \frac{n(n+ 1)}{2}= 45\)

Answer: \(45\).

The p-value is \(0.009765625\). Since it is at most 0.05, reject \(\displaystyle H_{0}\): there is evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.

Example 2 · Wilcoxon signed-rank tests

Independent paired differences are \(-1,2,-3,4,5,6\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.

Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.

  1. Find W+, the sum of positive ranks.
  2. Find W−, the sum of negative ranks.
  3. Find the exact upper-tail p-value for W+.
  4. Find the sum of all ranks.
Show the reasoning

(a)

\(W^+=17\)

Answer: \(17\).

(b)

\(W^-=4\)

Answer: \(4\).

(c)

\(\displaystyle P(W^+\ge 17)=\frac{7}{64}\) by all 64 equally likely sign allocations.

Answer: \(\displaystyle \frac{7}{64}\).

(d)

\(\displaystyle \frac{n(n+ 1)}{2}= 21\)

Answer: \(21\).

The p-value is \(0.109375\). Since it exceeds 0.05, do not reject \(\displaystyle H_{0}\): the sample gives insufficient evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.

Example 3 · Wilcoxon signed-rank tests

Independent paired differences are \(-1,2,3,-4,5,6,7\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.

Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.

  1. Find W+, the sum of positive ranks.
  2. Find W−, the sum of negative ranks.
  3. Find the exact upper-tail p-value for W+.
  4. Find the sum of all ranks.
Show the reasoning

(a)

\(W^+=23\)

Answer: \(23\).

(b)

\(W^-=5\)

Answer: \(5\).

(c)

\(\displaystyle P(W^+\ge 23)=\frac{5}{64}\) by all 128 equally likely sign allocations.

Answer: \(\displaystyle \frac{5}{64}\).

(d)

\(\displaystyle \frac{n(n+ 1)}{2}= 28\)

Answer: \(28\).

The p-value is \(0.078125\). Since it exceeds 0.05, do not reject \(\displaystyle H_{0}\): the sample gives insufficient evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.

Common mistakes

Practise with answer checking

Original exam-style problems

Write complete solutions before opening the worked solution. The marking guidance rewards reasoning as well as answers.

Examination practice · 2020–2026

Apply the method to recent source-labelled questions from this chapter.

Browse recent examination questions · All topic resources and the full bank

Next skill: Paired-sample sign test →