On this page
Loading guide controls…
Continue lessonNew guided lessons are not available yet.
Guided lesson options
You stopped at:
ContinueRevision Mode is on. Questions and activities are hidden.
The linked question or activity is hidden by Revision Mode.
A t-test needs the population to be normal, and a sample of eight or ten gives little evidence either way. Non-parametric tests drop the normality assumption. The sign test asks only whether each observation lies above or below a hypothesised median; the Wilcoxon matched-pair signed-rank test also uses how far each paired difference is from zero. This lesson carries out both tests, shows why they can reach different conclusions on the same data, and sets out what each one assumes, because the 9649 syllabus asks you to compare their advantages and disadvantages as well as to calculate.
The sign test uses only directions
The sign test tests a population median m. If H₀:m = m₀ is true, each observation is equally likely to lie above or below m₀, independently of the others. So the number X of observations above m₀ is binomial:
Discard any observation equal to m₀ and reduce n accordingly: it gives no evidence either way. The p-value is a binomial tail probability in the direction of H₁; for a two-tailed test, compare the smaller tail with half the significance level.
For paired data, apply the test to the differences, with H₀: the population median difference is 0.
Worked example 1
Is the median waiting time above 20 minutes?
Worked example 1
Is the median waiting time above 20 minutes?
A clinic claims that its median waiting time is 20 minutes. A random sample of 12 waiting times, in minutes, is
Test at the 5% level whether the median waiting time is more than 20 minutes.
Show full solutionHide solution
State the hypotheses and count signs
Method
H₀:m = 20 and H₁:m > 20, where m is the population median waiting time.Reason
A sign test needs no assumption about the shape of the distribution of waiting times, which is likely to be skewed.Working
Answer
Nine times are above 20, two are below, and one equals 20. Discard the tie, so n = 11 and the observed number above is 9.
Find the tail probability
Method
Under H₀, X∼B(11,0.5). Find P(X ≥ 9).Reason
Large values of X support H₁, so the p-value is the upper tail at the observed value.Working
Answer
P(X ≥ 9) = ((11 choose 9) + (11 choose 10) + (11 choose 11))/(2¹¹); = (55 + 11 + 1)/2048; ≈ 0.0327.Conclude in context
Working
Answer
Since 0.0327 < 0.05, reject H₀. There is sufficient evidence at the 5% level that the median waiting time is more than 20 minutes.
Quick check
Keeping the tie would have used B(12,0.5) with an observation that supports neither hypothesis. The conclusion is about the median: the test says nothing about the mean waiting time.
Eight students sat a test before and after a revision course. Their score changes (after minus before) were
To test at the 5% level whether the course tends to raise scores, take H₀: the median change is 0, and H₁: the median change is positive. Six of the 8 changes are positive, and under H₀, X∼B(8,0.5):
The sign test does not reject H₀: there is insufficient evidence that scores tend to rise.
Check your understanding 1
A two-tailed sign test
Check your understanding 1
A two-tailed sign test
Ten pairs of identical twins each try two diets, and the difference in weight loss (diet A minus diet B) is recorded. None of the differences is zero; 2 are positive and 8 negative. Test at the 5% level whether there is a difference between the diets.
Show answerHide answer
H₀: the median difference is 0; H₁: the median difference is not 0. With X∼B(10,0.5),
For a two-tailed test at 5%, compare with 0.025 (equivalently, the two-tailed p-value is 0.109). Since 0.0547 > 0.025, do not reject H₀: there is insufficient evidence at the 5% level of a difference between the diets.
The Wilcoxon test also uses sizes
The Wilcoxon matched-pair signed-rank test tests whether two paired populations have identical distributions. It assumes that the differences are symmetric about their median. The method:
- Find each difference d, discarding any that are 0.
- Rank the absolute differences |d| from 1 (smallest) to n (largest).
- Add the ranks of the positive differences to get T₊, and of the negative differences to get T₋. As a check, T₊ + T₋ = (1/2)n(n + 1).
- For a two-tailed test, T is the smaller of T₊ and T₋. For a one-tailed test, T is the rank sum of the sign that H₁ predicts should be rare.
Small T is evidence against H₀. Reject H₀ when T is less than or equal to the critical value from the table for n and the significance level.
Worked example 2
The same data, a different test
Worked example 2
The same data, a different test
Apply a one-tailed Wilcoxon matched-pair signed-rank test at the 5% level to the score changes 2,-1,5,8,-3,4,7,6. For n = 8 the one-tailed 5% critical value is 5.
Show full solutionHide solution
Rank the absolute differences
Method
The absolute differences are 1,2,3,4,5,6,7,8, so they take ranks 1 to 8.Reason
Ranking the sizes, not the signed values, lets a large decrease count as strongly as a large increase.Working
Answer
d 2 -1 5 8 -3 4 7 6 Rank of |d| 2 1 5 8 3 4 7 6 Sum the ranks by sign
Method
T₋ = 1 + 3 = 4 and T₊ = 36-4 = 32.Reason
H₁ says scores rise, so negative differences should be rare and small. The test statistic is T = T₋ = 4.Working
Answer
Check: T₊ + T₋ = (1/2)(8)(9) = 36.
Decide
Working
Answer
Since T = 4 ≤ 5, reject H₀. There is sufficient evidence at the 5% level that the course tends to raise scores. (The exact probability is P(T ≤ 4) = 7/256 ≈ 0.027.)
Quick check
This course does not treat tied ranks. If two absolute differences are equal, the method needs an adjustment outside this syllabus, so the questions you meet will have distinct absolute differences.
Check your understanding 2
Why the conclusions differ
Check your understanding 2
Why the conclusions differ
The sign test did not reject H₀ but the Wilcoxon test did. Explain why, and state one advantage and one disadvantage of each test compared with a t-test.
Show answerHide answer
The sign test uses only whether each change is positive, so the two negative changes count as much as large positive ones. The Wilcoxon test also uses their sizes: both negative changes are small (ranks 1 and 3), which is stronger evidence of improvement.
- Sign test: needs almost no assumptions and suits medians and ordinal data, but discards size information, so it can miss evidence that a test using sizes detects.
- Wilcoxon test: uses more information than the sign test, but assumes the differences are symmetric.
- Both avoid the t-test’s normality assumption, but if the data really are normal the t-test uses the information most efficiently.
Spot the mistake 1
Ranking the signed differences
Spot the mistake 1
Ranking the signed differences
For the differences 3,-6,4,-1,7,9,5,8, a student ranks the values from smallest to largest, giving -6 rank 1 and -1 rank 2. The student finds T₋ = 3 and, as 3 ≤ 5, rejects H₀ in a one-tailed test at the 5% level. Find the error and give the correct conclusion.
Write your answer, then compare it with the solution
Show full solutionHide solution
Rank the absolute differences
Method
Order |d|: 1,3,4,5,6,7,8,9.Reason
A difference of -6 is a large change, so it must receive a large rank; ranking signed values gives every negative difference the smallest ranks automatically.Working
Answer
-1 has rank 1 and -6 has rank 5, so T₋ = 1 + 5 = 6 and T₊ = 36-6 = 30. Since 6 > 5, do not reject H₀: there is insufficient evidence at the 5% level.
Common mistake
Ranking signed values makes T₋ as small as it can possibly be for the number of negative differences, so it biases the test towards rejecting H₀. Rank the sizes first, then attach the signs.
Choosing a test
| Test | Assumes | Uses | Tests |
|---|---|---|---|
Sign test | Independent observations; nothing about shape | Only the direction of each observation from m₀ | A population median, or the median of paired differences |
Wilcoxon matched-pair signed-rank test | Paired differences symmetric about their median | Directions and ranked sizes | Identical distributions for two paired populations |
Paired t-test | Differences from a normal population | The actual values | A population mean difference |
Use the test with the fewest assumptions that the situation justifies. If the differences are clearly skewed, the Wilcoxon test’s symmetry assumption fails and the sign test is safer. If only “better or worse” is recorded, only the sign test is possible.
Common mistakes
- Keeping observations equal to m₀ (or zero differences) instead of discarding them.
- Comparing a two-tailed p-value from one tail with the full significance level.
- Ranking signed differences instead of absolute differences.
- Choosing T as the larger rank sum, or rejecting when T is greater than the critical value.
- Stating hypotheses about a mean; these tests concern medians or distributions.
- Writing that the test proves H₀. A non-rejection means only that the evidence is insufficient.
Before you move on
Try it yourself 1
Two running surfaces
Try it yourself 1
Two running surfaces
Nine runners each run 400 m on surface A and on surface B. The differences in time, in tenths of a second (A minus B), are
Carry out a Wilcoxon matched-pair signed-rank test at the 5% level of whether times differ between the surfaces. For n = 9, the two-tailed 5% critical value is 5.
Try this before viewing the solution
Show full solutionHide solution
Hypotheses and ranks
Method
H₀: times on the two surfaces have identical distributions. H₁: they do not.Reason
No direction is predicted, so the test is two-tailed and T is the smaller rank sum.Working
Answer
The absolute differences 1,2,4,5,6,7,9,11,13 take ranks 1 to 9. The negative differences -1, -2 and -9 have ranks 1, 2 and 7.
Statistic and conclusion
Working
Answer
T₋ = 1 + 2 + 7 = 10 and T₊ = 45-10 = 35, so T = 10. Since 10 > 5, do not reject H₀. There is insufficient evidence at the 5% level that running times differ between the two surfaces.
Quick check
Most runners were slower on surface A, but one large negative difference (-9, rank 7) keeps T₋ above the critical value. A one-tailed test at 5% (critical value 8) would also fail to reject here.
Loading reading progress…
Lesson done
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Sunday
Checking learning on this device…
Change goal
Progress options
Loading questions…