Skip to content
Cambridge AS & A Level9231

Non-parametric tests

Further Mathematics 9231 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Non-parametric tests notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Non-parametric tests notes as text: skim, search, and jump between subtopics.

~17 min read

1. Non-parametric tests and what they assume

A non-parametric test is useful when sampling from a population which cannot be assumed to be normally distributed. That is why a Wilcoxon matched-pairs test can replace a paired t-test when the population of differences may not be normally distributed.

Three tests are in this note. The sign test uses only the signs of the differences. The Wilcoxon signed-rank test (single sample, or matched pairs) uses the signs and the ranks of the differences. The Wilcoxon rank-sum test ranks two independent samples together.

The Wilcoxon tests are valid only for symmetrical distributions. When the data has outliers or is skewed, the population may not be symmetrical, so a sign test is used instead.

Examiner insight

“That the population distribution of the differences is unknown is the crucial fact which renders use of a paired t-test as inappropriate.” “Most reasons did not include any mention of differences and/or referred to the sample rather than the population.”

Worked example 11 mark

A large school sets an English exam for all students in a particular year group. Two teachers will be marking the scripts. To check for consistency of marking between the teachers, 10 scripts are selected at random and independently marked by each teacher.

Give a reason why a Wilcoxon matched-pairs signed-rank test might be more appropriate than a paired sample t-test in this situation.

  1. 1

    The population of differences may not be normally distributed, so the t-test may not be valid. [1]

2. The sign test

Find the sign of each difference. For a single sample the difference is observation minus the claimed median. For paired samples it is one value minus the other. Count the signs of one kind.

Under H₀ the signs are equally likely, so the count is binomial with p = 0.5. State hypotheses about the population median. Work out the probability of a result at least as extreme as yours, in the direction of H₁.

Compare that probability with the significance level. Then give a conclusion in words, with a level of doubt.

X ∼ B(n, 0.5)

H₀: m = m₀ or median difference = 0

Examiner insight

“The first step in applying the sign test is to find the sign of the difference between each piece of data and the stated median 5.50.” “However, a substantial number of candidates appeared unfamiliar with the basic methodology required to carry out a sign test and could make little or no progress with it.”

Worked example 17 marks

The manager of a village store is interested in the shopping habits of his customers. From previous records, the median number of items bought per customer was found to be 8. The manager believes the median number of items bought per customer has increased. He selects a random sample of 15 customers and records the number of items each customer buys at his store. The results are given in the table, in ascending order.

(a) Suggest a reason why using a Wilcoxon signed-rank test to examine the manager's belief might not be appropriate in this situation.

(b) Use a sign test at the 5% significance level to investigate the manager's belief.

Items bought66799101517
(continued)17232634405674
  1. 1

    (a) The data has outliers and is skewed, so the population may not be symmetrical. [1]

  2. 2

    H₀: population median is 8; H₁: population median is greater than 8 [1]

  3. 3

    Three values (6, 6, 7) are below 8. Let X be the number below 8: X ∼ B(15, 0.5) [1]

  4. 4

    P(X ≤ 3) = 0.5¹⁵[binom150 + binom151 + binom152 + binom153] [1]

  5. 5

    = (1 + 15 + 105 + 455)/32768 = 0.0176 [1]

  6. 6

    0.0176 < 0.05, so reject H₀ [1]

  7. 7

    There is sufficient evidence to support the manager's belief [1]

3. Wilcoxon signed-rank and matched-pairs tests

Find the differences: from the claimed median for one sample, between the pairs for matched pairs. Rank their sizes, ignoring signs, from smallest. Then put each sign back on its rank.

Let P be the sum of the ranks of the positive differences and Q the sum for the negative ones. The test statistic T is the smaller sum for a two-tail test. For H₁ that the median is greater, the mark scheme uses Q. Reject H₀ if T is less than or equal to the critical value.

The test is valid only if the population of differences is symmetrical. Write hypotheses in terms of the population median.

P + Q = (n(n+1))/2

reject H₀ if T ≤ critical value

Examiner insight

“It is worth noting that a tabular approach to this is a helpful aid to accuracy.” “The second common error was to give a conclusion that was too assertive. The outcome of a test provides evidence which is either sufficient or insufficient to reject H0; the outcome never proves anything so care should be taken to avoid definite statements in conclusions.”

Worked example 17 marks

A large school sets an English exam for all students in a particular year group. Two teachers will be marking the scripts. To check for consistency of marking between the teachers, 10 scripts are selected at random and independently marked by each teacher. The marks awarded are given in the table.

Carry out a Wilcoxon matched-pairs signed-rank test at the 5% significance level to investigate whether, on average, there is a difference between the marks awarded by the two teachers.

StudentABCDEFGHIJ
Teacher 142735321618363374655
Teacher 246816824608168305761
  1. 1

    H₀: difference in population medians = 0; H₁: difference in population medians ≠ 0 [1]

  2. 2

    Differences (teacher 2 minus teacher 1): 4, 8, 15, 3, -1, -2, 5, -7, 11, 6 [1]

  3. 3

    Signed ranks: 4, 8, 10, 3, -1, -2, 5, -7, 9, 6 [1]

  4. 4

    P = 45, Q = 10, so T = 10 [1]

  5. 5

    Critical value (two-tail, 5%) = 8 [1]

  6. 6

    10 > 8, so do not reject H₀ [1]

  7. 7

    Insufficient evidence that there is a difference between the marks awarded by the teachers [1]

4. The Wilcoxon rank-sum test

Use this for two independent samples, not paired data. Let the smaller sample have size m and the other size n. Rank all m + n values together from 1, smallest first. Add the ranks of the smaller sample to get R_m.

The other possible statistic is m(m+n+1) - R_m. For a two-tail test use the smaller of the two. For a one-tail test use the one that H₁ makes small. Reject H₀ if the statistic is less than or equal to the critical value.

Hypotheses are about the population medians of the two populations.

R_m' = m(m+n+1) - R_m

R_m + Rn = ((m+n)(m+n+1))/2

Examiner insight

“This question clearly stated that the Wilcoxon rank-sum test was required, but a significant minority of candidates attempted to use either other Wilcoxon tests or a paired-sample test.” “Few candidates recognised that a paired sample t-test was inappropriate because the data was not paired.”

Worked example 16 marks

A trainer claims that a new warm-up method (A) shortens the time to complete a course compared with the usual method (B). Five athletes use method A and six use method B. Their times, in minutes, are in the table. Test the claim at the 5% significance level. The critical value for this one-tail test is 20.

Method A12.913.114.215.816.4
Method B14.815.116.917.217.618.3
  1. 1

    H₀: the population medians are equal; H₁: the population median for A is less than for B [1]

  2. 2

    Rank all 11 times. A has ranks 1, 2, 3, 6, 7 [1]

  3. 3

    R_A = 1 + 2 + 3 + 6 + 7 = 19 [1]

  4. 4

    H₁ makes the A ranks small, so the test statistic is 19 [1]

  5. 5

    19 ≤ 20, so reject H₀ [1]

  6. 6

    Sufficient evidence that method A shortens the time [1]

5. Normal approximations for larger samples

When the sample sizes are not covered in the table of critical values, approximate the statistic by a normal distribution. Use the mean and variance below. The statistic takes whole-number values, so apply a continuity correction: for P(T ≤t) use t + 0.5.

Standardise to z. Compare with -1.645 for a one-tail 5% test, or ± 1.96 for a two-tail 5% test. The mark scheme for the village store sign test credits z = (3.5 - 7.5)/(√(3.75)) = -2.07, and 2.07 > 1.645.

Keep H₁ and the critical value consistent: a one-tail H₁ needs a one-tail value.

sign: X ≈ N(n/2, n/4)

signed-rank: T ≈ N((n(n+1))/4, (n(n+1)(2n+1))/24)

rank-sum: R_m ≈ N((m(m+n+1))/2, (mn(m+n+1))/12)

Examiner insight

“Because of the sizes of the samples involved, a normal approximation is required. Most candidates realised this and found the mean and variance of the relevant distribution from the usual formulae.” “A minority of candidates miscopied the formula for the variance, with 2 instead of 12 in the denominator. Some candidates omitted the continuity correction when finding the z-value to compare with the tabular value of 1.96.”

Worked example 15 marks

A random sample of 30 observations is used to test H₀: m = 50 against H₁: m > 50 at the 5% significance level, using a Wilcoxon signed-rank test. The sum of the ranks of the positive differences is P = 315. The sum of the ranks of the negative differences is Q = 150. Use a normal approximation.

  1. 1

    H₀: population median is 50; H₁: population median is greater than 50. H₁ makes Q small, so T = Q = 150 [1]

  2. 2

    Mean = (30 × 31)/4 = 232.5; variance = (30 × 31 × 61)/24 = 2363.75 [1]

  3. 3

    With continuity correction: z = (150.5 - 232.5)/(√(2363.75)) = -1.69 [1]

  4. 4

    -1.69 < -1.645, so reject H₀ [1]

  5. 5

    Sufficient evidence that the population median is greater than 50 [1]

Recap

  • A non-parametric test does not assume the population is normal, so it suits populations which cannot be assumed normally distributed.
  • Wilcoxon tests are valid only for symmetrical distributions. The sign test does not need symmetry.
  • Sign test: count the signs, then X ∼ B(n, 0.5) and find the tail in the direction of H₁.
  • Signed-rank and matched-pairs: rank the absolute differences, find P and Q, reject if T ≤ critical value.
  • Rank-sum: rank both samples together and find R_m for the smaller sample. Compare R_m or m(m+n+1) - R_m, whichever the test calls for, with the critical value.
  • Normal approximation: use the right mean and variance and a continuity correction.
  • Write hypotheses about the population median, and conclude with a level of doubt.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State one situation in which a non-parametric test is useful.1 mark
    Answer
    1. When sampling from a population which cannot be assumed to be normally distributed.

    Trap: Say the population, not the sample. Examiners reported reasons that referred to the sample rather than the population.

  2. State one assumption about the population that a Wilcoxon signed-rank test needs but a sign test does not.1 mark
    Answer
    1. The population distribution is symmetrical.

    Trap: Symmetrical is not the same as normal. The test does not need a normal population.

  3. The median time for students to finish a puzzle is claimed to be 40 minutes. A teacher believes it is less. Ten students are timed, in minutes: 38, 45, 36, 41, 35, 39, 37, 44, 33, 34. Use a sign test at the 5% significance level.5 marks
    Answer
    1. H₀: population median is 40; H₁: population median is less than 40.
    2. Seven times are below 40. Let X be the number below 40: X ∼ B(10, 0.5).
    3. P(X ≥ 7) = P(X ≤ 3) = (1 + 10 + 45 + 120)/1024 = 0.172.
    4. 0.172 > 0.05, so do not reject H₀.
    5. There is insufficient evidence to support the teacher's belief.

    Trap: The tail points the same way as H₁: seven or more below 40, not seven or fewer.

  4. A paired-sample sign test is carried out on 11 athletes' times before and after a training course. Nine times improved and two got worse. Test at the 5% significance level whether there is a difference in the population median time.4 marks
    Answer
    1. H₀: population median difference is 0; H₁: population median difference is not 0.
    2. Let X be the number that got worse: X ∼ B(11, 0.5).
    3. P(X ≤ 2) = (1 + 11 + 55)/2048 = 0.0327. Two-tail, so compare with 0.025.
    4. 0.0327 > 0.025, so do not reject H₀. Insufficient evidence of a difference.

    Trap: Examiners reported confusion about whether a test was one-tail or two-tail. Comparing 0.0327 with 0.05 would wrongly reject: a two-tail 5% test puts 0.025 in each tail.

  5. A Wilcoxon signed-rank test is used to test H₀: m = 50 against H₁: m < 50 at the 5% significance level. The sample is 43, 46, 47, 41, 40, 52. The one-tail 5% critical value for n = 6 is 2.5 marks
    Answer
    1. Differences from 50: -7, -4, -3, -9, -10, +2.
    2. Ranks of sizes: 2 → 1, 3 → 2, 4 → 3, 7 → 4, 9 → 5, 10 → 6.
    3. Signed ranks: -4, -3, -2, -5, -6, +1, so P = 1 and Q = 20.
    4. H₁ makes P small, so T = 1 ≤ 2: reject H₀.
    5. Sufficient evidence that the population median is less than 50.

    Trap: Use P, the positive ranks, because H₁ says values lie below 50. Q = 20 would never reject.

  6. Eight people record their weight, in kg, before and after a diet. A nutritionist claims the diet reduces weight. Carry out a Wilcoxon matched-pairs signed-rank test at the 5% significance level. The one-tail 5% critical value for n = 8 is 5. | Person | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Before | 62 | 58 | 70 | 65 | 74 | 60 | 68 | 72 | | After | 57 | 60 | 63 | 64 | 65 | 63 | 64 | 66 |6 marks
    Answer
    1. H₀: population median difference (before minus after) is 0; H₁: it is greater than 0.
    2. Differences: 5, -2, 7, 1, 9, -3, 4, 6.
    3. Signed ranks: 5, -2, 7, 1, 8, -3, 4, 6.
    4. P = 31, Q = 5. H₁ makes Q small, so T = 5.
    5. 5 ≤ 5, so reject H₀.
    6. Sufficient evidence that the diet reduces weight.

    Trap: Subtract in the direction of H₁. Reversing the subtraction swaps P and Q.

  7. A sign test of H₀: m = 120 against H₁: m > 120 uses 40 observations, none equal to 120. Of these, 27 are above 120. Use a normal approximation to test at the 5% significance level.5 marks
    Answer
    1. H₀: population median is 120; H₁: population median is greater than 120. X is the number above 120: X ∼ B(40, 0.5) ≈ N(20, 10).
    2. P(X ≥ 27) becomes P(X > 26.5) with a continuity correction.
    3. z = (26.5 - 20)/(√10) = 2.06.
    4. 2.06 > 1.645, so reject H₀. Sufficient evidence that the population median is above 120.

    Trap: The boundary is 26.5, not 27.5. P(X ≥ 27) starts half a unit below 27.

  8. A Wilcoxon signed-rank test of H₀: m = 30 against H₁: m ≠ 30 uses a sample of 25. The smaller of P and Q is 95. Use a normal approximation to test at the 5% significance level.6 marks
    Answer
    1. H₀: population median is 30; H₁: population median is not 30.
    2. Mean = (25 × 26)/4 = 162.5.
    3. Variance = (25 × 26 × 51)/24 = 1381.25.
    4. z = (95.5 - 162.5)/(√(1381.25)) = -1.80.
    5. Two-tail, so compare with -1.96: -1.80 > -1.96, so do not reject H₀.
    6. Insufficient evidence that the population median is not 30.

    Trap: Using -1.645 would wrongly reject. A two-tail 5% test needs ± 1.96.

  9. A gardener grows 5 plants with fertiliser A and 6 different plants with fertiliser B. The heights, in cm, after four weeks are in the table. (a) Explain why a Wilcoxon matched-pairs signed-rank test should not be used. (b) The gardener cannot assume the populations are normal. Use a Wilcoxon rank-sum test to test at the 5% significance level whether the population median heights differ. The two-tail 5% critical value is 18. | Fertiliser A | 20.5 | 21.4 | 23.6 | 25.0 | 26.1 | | | --- | --- | --- | --- | --- | --- | --- | | Fertiliser B | 17.6 | 18.9 | 19.1 | 19.8 | 21.0 | 22.7 |9 marks
    Answer
    1. (a) The data is not paired: the plants given A are different plants from those given B.
    2. H₀: the population medians are equal; H₁: the population medians differ.
    3. Rank all 11 heights: 17.6, 18.9, 19.1, 19.8 (B) are ranks 1 to 4; 20.5 (A) is 5; 21.0 (B) is 6; 21.4 (A) is 7; 22.7 (B) is 8; 23.6, 25.0, 26.1 (A) are 9, 10, 11.
    4. Sample A is smaller: R_A = 5 + 7 + 9 + 10 + 11 = 42.
    5. Other statistic: 5 × 12 - 42 = 18.
    6. Two-tail, so the statistic is the smaller, 18. 18 ≤ 18, so reject H₀.
    7. Sufficient evidence of a difference between the population median heights.

    Trap: Examiners reported candidates who found the correct rank sum and then chose the wrong one of R_m and m(m+n+1) - R_m as the test statistic. Here the smaller is 18, not 42: using 42 would never reject.

  10. A café owner times the wait for service at two branches. A random sample of 10 customers is taken at the Riverside branch and 12 at the Station branch. All 22 times are ranked together, shortest first. The sum of the ranks of the 12 Station customers is 168. The owner claims that waiting times at Riverside tend to be shorter. Use a Wilcoxon rank-sum test with a normal approximation to test the claim at the 5% significance level.8 marks
    Answer
    1. H₀: the population median waiting times are equal; H₁: the population median waiting time at Riverside is less than at Station.
    2. Sum of all ranks = (22 × 23)/2 = 253, so the Riverside rank sum is R_m = 253 - 168 = 85, with m = 10.
    3. H₁ makes the Riverside ranks small, so the statistic is 85 (the other is 10 × 23 - 85 = 145).
    4. Mean = (10 × 23)/2 = 115; variance = (10 × 12 × 23)/12 = 230.
    5. z = (85.5 - 115)/(√(230)) = -1.95.
    6. One-tail, so compare with -1.645: -1.95 < -1.645, so reject H₀. Sufficient evidence to support the owner's claim.

    Trap: Examiners reported the variance miscopied with 2 instead of 12 in the denominator: that gives z = -0.79 and the wrong conclusion. Also, 168 is the larger sample's rank sum, not R_m.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
H0: the mean difference is 0, or H0: μ = 0H₀: population median difference is 0
A t-test is wrong because the sample is not normal.The population of differences may not be normally distributed.
Accept H0, so the manager is right.Insufficient evidence to support the manager's belief.
The differences in the sample are symmetrical.The population of differences is symmetrical.

Frequently asked questions

When should I use a non-parametric test instead of a t-test?
Use a non-parametric test when sampling from a population which cannot be assumed to be normally distributed. A Wilcoxon matched-pairs test can replace a paired t-test when the population of differences may not be normally distributed. The Wilcoxon tests need symmetrical distributions, so use a sign test when the data is skewed or has outliers.
What is the difference between the sign test and the Wilcoxon signed-rank test?
The sign test uses only the signs of the differences, and it does not need symmetry. The Wilcoxon signed-rank test uses the signs and the ranks of the differences. It is valid only for symmetrical distributions, so the population of differences must be symmetrical.
How do I carry out a sign test on a median?
Find the sign of each difference from the claimed median, then count the signs of one kind. Under H₀ the count X follows a binomial distribution B(n, 0.5). Find the probability of a result at least as extreme as yours in the direction of H₁, compare it with the significance level, and conclude in words with a level of doubt.
How do I use the Wilcoxon rank-sum test for two independent samples?
Rank all the values together from 1, smallest first. Add the ranks of the smaller sample to get R_m. For a two-tail test use the smaller of R_m and m(m+n+1) - R_m. Reject H₀ if the statistic is less than or equal to the critical value.
How do I use a normal approximation for a large sign or Wilcoxon test?
Use a normal distribution with the mean and variance for that test, and apply a continuity correction. For P(T ≤ t) use t + 0.5. Compare z with -1.645 for a one-tail 5% test, or with ± 1.96 for a two-tail 5% test.
What is wrong with writing the hypotheses for a Wilcoxon test as H0: mu = 0?
That form is wrong here, because the hypotheses are about the population median, not the mean. Write H₀ as the population median difference is 0, so H₀: population median difference is 0 rather than μ = 0.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters