The shape of the lesson
By the end of the lesson, learners can
- Why go non-parametric?: The \(t\)-tests of Section 4.2 are parametric: they test a parameter (the mean \(\mu\)) of a population assumed to be normal.
- The single-sample sign test for a median: Follow the full structure every time.
- Paired samples: signs of the differences: When each item is measured twice (before and after, or by two methods), the two samples are paired.
- Hypotheses: \(\mathrm{H}_0\): median \(= m\) (or the paired populations are identical), with the median defined in context; one or two tails from the wording.
- Signs: + above \(m\), \(-\) below; for paired data use the signs of the differences, all taken the same way round.
- Distribution: under \(\mathrm{H}_0\) the number of + signs is \(X \sim \mathrm{B}(n, 0.5)\).
- Tail: find \(P(X \ge x)\) or \(P(X \le x)\), the observed value and beyond, exactly with \(\binom{n}{r}\left(\frac{1}{2}\right)^{n}\).
- Compare with the level, or with half the level for a two-tailed test.
- Conclude in context: 'there is (in)sufficient evidence at the ...% level that ...'.
One picture every idea returns to
A non-parametric test makes no assumption about the shape of the population (no normality needed). In a sign test of \(\mathrm{H}_0\): median \(= m\), replace each observation by + (above \(m\)) or \(-\) (below \(m\)). Under \(\mathrm{H}_0\) each sign is + with probability \(\frac{1}{2}\), independently, so the number of + signs is \(X \sim \mathrm{B}(n, 0.5)\). Find the probability of a result at least as extreme as the one observed, \(P(X \le x)\) or \(P(X \ge x)\), and compare it with the significance level (with HALF the level in each tail for a two-tailed test). For paired data, apply the same test to the signs of the differences.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Only the signs count.. A t-test needs a normal population. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Why go non-parametric? | The \(t\)-tests of Section 4.2 are parametric: they test a parameter (the mean \(\mu\)) of a population assumed to be normal. Model the worked example From data to signs to a probability on the board, one line at a time. | Whole class, then pairs |
| 13 to 21 min | Teach and check: The single-sample sign test for a median | Follow the full structure every time. Project tab 3 of the lab (Distributions lab, sign test) and let a student drive it while the class predicts. Model the worked example One-tailed: just not significant on the board, one line at a time. Your turn: In a random sample of 8 values, 7 are above 30 and 1 is below. Test \(\mathrm{H}_0\): median \(= 30\) against \(\mathrm{H}_1\): median \(> 30\) at the 5% level. | Pairs |
| 21 to 30 min | Teach and check: Paired samples: signs of the differences | When each item is measured twice (before and after, or by two methods), the two samples are paired. Model the worked example Paired, one-tailed on the board, one line at a time. | Frayer Model |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 27 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Paired samples: signs of the differences, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Frayer Model
Pairs fill a four-box grid for the key term: definition, characteristics, examples and non-examples. The non-examples box is where the misconceptions surface, so give it the most time.
The full structure, with its PIES check and a worked example for every subject, is on the cooperative-learning page, one of fifteen structures there.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| The critical region is a TAIL, so add the probabilities: \(P(X \le 2)\), not \(P(X = 2)\). | And it is the largest tail with probability at most the significance level, which is why the actual significance level (here 1.93%) is usually below the nominal 5%. |
| In a two-tailed test, do not compare the tail probability with the full significance level: \(0.0193\) must be compared with \(0.025\), not \(0.05\). | Equivalently, double the tail probability and compare with 5%. Never compare \(P(X = x)\) alone: you need the whole tail. |
| Keep one direction for every difference (always \(P - Q\), never sometimes \(Q - P\)) and decide which sign \(\mathrm{H}_1\) predicts BEFORE you count. | The paired sign test tests whether the populations are identical; it says nothing about the size of the difference. |
Sign tests: worksheet
6 questions, 27 marks. Written in the style of the papers; no past paper question is reproduced.
(a) Explain what is meant by a non-parametric test, and give one situation in which such a test might be preferred to a \(t\)-test.
(b) A sign test of \(\mathrm{H}_0\): median \(= m\) uses a random sample of 9 observations, none equal to \(m\). State the distribution of the number of + signs under \(\mathrm{H}_0\), and explain why.
A sign test of \(\mathrm{H}_0\): median \(= m\) against \(\mathrm{H}_1\): median \(\ne m\) uses a random sample of 15 and the 5% significance level. Find the critical region for the number of + signs, and the actual significance level of the test.
Packets of rice are labelled with a median mass of 250 g. A consumer group suspects the median is less than this. The masses, in grams, of 13 randomly chosen packets are
248, 251, 246, 249, 247, 252, 245, 249, 248, 253, 247, 244, 249.
Carry out a sign test at the 5% level.
The reaction times, in milliseconds, of 9 people are measured without caffeine and again after drinking coffee.
Without: 312, 298, 305, 321, 289, 330, 301, 315, 296
With: 301, 290, 308, 310, 280, 318, 295, 309, 288
Use a paired-sample sign test at the 5% level to test whether caffeine changes reaction times.
(a) Find the smallest sample size \(n\) for which a one-tailed sign test at the 5% level could lead to rejecting \(\mathrm{H}_0\).
(b) Find the corresponding smallest \(n\) for a two-tailed test at the 5% level.
A machine is set to cut rods with a median length of 40.0 cm. A random sample of 10 rods has lengths, in cm,
40.2, 40.5, 40.8, 41.0, 40.3, 40.6, 40.9, 40.4, 41.1, 31.5.
(a) Use a sign test at the 5% level to test whether the median length differs from 40.0 cm.
(b) The sample mean is 39.73 cm, below 40.0 cm. Explain why the sign test is more suitable than a \(t\)-test for these data.
(c) State one disadvantage of the sign test.
Answer key and marking notes
- (a) A non-parametric test makes no assumption about the distribution of the population (for example, it does not assume normality). It might be preferred when the sample is small and the population cannot be assumed to be normal, for instance if the data are clearly skewed.
- (b) \(\mathrm{B}(9, 0.5)\): if the median is \(m\), each observation is above \(m\) with probability \(\frac{1}{2}\), independently of the others, and there are 9 observations.
- \(X \sim \mathrm{B}(15, 0.5)\), \(2^{15} = 32768\). Each tail may hold at most 2.5%.
- \(P(X \le 3) = \dfrac{1 + 15 + 105 + 455}{32768} = \dfrac{576}{32768} = 0.0176 \le 0.025\).
- \(P(X \le 4) = \dfrac{576 + 1365}{32768} = \dfrac{1941}{32768} = 0.0592 > 0.025\), so the lower tail is \(X \le 3\); by symmetry the upper tail is \(X \ge 12\).
- Critical region \(X \le 3\) or \(X \ge 12\); actual significance level \(2 \times 0.0176 = 0.0352\), that is 3.52%.
- \(\mathrm{H}_0\): the population median mass is 250 g; \(\mathrm{H}_1\): it is less than 250 g.
- Above 250: 251, 252, 253, so 3 + signs and 10 \(-\) signs.
- Under \(\mathrm{H}_0\), \(X \sim \mathrm{B}(13, 0.5)\): \[P(X \le 3) = \frac{1 + 13 + 78 + 286}{8192} = \frac{378}{8192} = 0.0461\]
- \(0.0461 < 0.05\), so reject \(\mathrm{H}_0\).
- There is sufficient evidence at the 5% level that the median mass of the packets is less than 250 g.
- \(\mathrm{H}_0\): the populations of reaction times without and with caffeine are identical; \(\mathrm{H}_1\): they are not.
- Differences (without \(-\) with): 11, 8, \(-3\), 11, 9, 12, 6, 6, 8: 8 + signs and 1 \(-\) sign.
- Let \(X\) be the number of \(-\) signs; under \(\mathrm{H}_0\), \(X \sim \mathrm{B}(9, 0.5)\): \[P(X \le 1) = \frac{1 + 9}{512} = 0.0195\]
- Two-tailed at 5%: \(0.0195 < 0.025\), so reject \(\mathrm{H}_0\).
- There is sufficient evidence at the 5% level that caffeine changes reaction times.
- The most extreme result is all \(n\) signs the same way, with probability \(\left(\frac{1}{2}\right)^{n}\).
- (a) Need \(\left(\frac{1}{2}\right)^{n} \le 0.05\): \(\left(\frac{1}{2}\right)^{4} = 0.0625 > 0.05\) but \(\left(\frac{1}{2}\right)^{5} = 0.03125 \le 0.05\), so \(n = 5\).
- (b) Need \(\left(\frac{1}{2}\right)^{n} \le 0.025\): \(\left(\frac{1}{2}\right)^{5} = 0.03125 > 0.025\) but \(\left(\frac{1}{2}\right)^{6} = 0.015625 \le 0.025\), so \(n = 6\).
- (a) \(\mathrm{H}_0\): the population median length is 40.0 cm; \(\mathrm{H}_1\): it is not 40.0 cm.
- 9 + signs and 1 \(-\) sign. Under \(\mathrm{H}_0\), \(X \sim \mathrm{B}(10, 0.5)\): \(P(X \ge 9) = \dfrac{10 + 1}{1024} = 0.0107\).
- Two-tailed at 5%: \(0.0107 < 0.025\), so reject \(\mathrm{H}_0\). There is sufficient evidence at the 5% level that the median length differs from 40.0 cm.
- (b) The value 31.5 is an outlier, so the population cannot be assumed normal and the \(t\)-test is not valid. The outlier drags the mean below 40, although 9 of the 10 rods are longer than 40.0 cm. The sign test needs no normality and counts the outlier as only one \(-\) sign.
- (c) It ignores the sizes of the deviations from 40.0 cm, so it uses less information and is less powerful than a test that uses the magnitudes.
8 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
A sign test of \(\mathrm{H}_0\): median \(= m\) against \(\mathrm{H}_1\): median \(> m\) uses a random sample of 9 values. There are 7 + signs. Find the probability used to make the decision.
- A\(P(X \ge 8) = 0.0195\)
- B\(2P(X \ge 7) = 0.180\)
- C\(P(X \ge 7) = 0.0898\)
- D\(P(X = 7) = 0.0703\)
Which statement correctly compares the single-sample sign test with the Wilcoxon signed-rank test for a population median?
- AThe sign test uses the sizes of the differences from the median
- BThe sign test does not need the population to be symmetric
- CThe sign test needs the population to be normally distributed
- DThe sign test is a test of the population mean, not the median
The masses, in grams, of 10 randomly chosen apples are 27.3, 22.1, 29.8, 31.4, 26.0, 28.7, 24.5, 30.2, 33.1, 27.9. A sign test at the 5% level is used to test whether the median mass is greater than 25 g. Which is correct?
- A\(P(X \ge 8) = 0.0547 > 0.05\): insufficient evidence that the median exceeds 25 g
- B\(P(X \ge 9) = 0.0107 < 0.05\): evidence that the median exceeds 25 g
- C\(P(X \ge 8) = 0.0547 > 0.05\): evidence that the median exceeds 25 g
- D\(P(X = 8) = 0.0439 < 0.05\): evidence that the median exceeds 25 g
A sign test uses a random sample of 16, with \(\mathrm{H}_0\): median \(= m\) and \(\mathrm{H}_1\): median \(\ne m\), at the 5% level. \(X\) is the number of + signs. Find the critical region.
- A\(X \le 3\) or \(X \ge 12\)
- B\(X \le 5\) or \(X \ge 11\)
- C\(X \le 4\) or \(X \ge 12\)
- D\(X \le 3\) or \(X \ge 13\)
Twelve people do a memory task before and after a training course. Before: 64, 58, 71, 66, 59, 73, 62, 68, 55, 70, 61, 67. After: 69, 63, 70, 72, 64, 78, 66, 67, 60, 74, 65, 71 (same person in each position). A paired-sample sign test at the 5% level tests whether scores tend to increase. Which is correct?
- A\(P(X \ge 10) = 0.0193 < 0.05\): evidence that scores tend to increase
- B\(P(X = 10) = 0.0161 < 0.05\): evidence that scores tend to increase
- C\(2P(X \ge 10) = 0.0386 < 0.05\): evidence that scores tend to increase
- D\(P(X \le 10) = 0.997 > 0.05\): no evidence that scores tend to increase
A sign test of \(\mathrm{H}_0\): median \(= m\) against \(\mathrm{H}_1\): median \(< m\) uses a random sample of 20 at the 5% level. \(X\) is the number of + signs. Find the critical region and the actual significance level.
- A\(X \le 6\), actual level \(5.77\%\)
- B\(X \le 5\), actual level \(2.07\%\)
- C\(X \le 5\), actual level \(1.48\%\)
- D\(X \le 5\), actual level \(5\%\)
In a sign test on a random sample of 40, there are 27 + signs. Using a normal approximation, test \(\mathrm{H}_0\): median \(= m\) against \(\mathrm{H}_1\): median \(> m\) at the 5% level. Which is correct?
- A\(z = 2.37 > 1.645\): evidence that the median exceeds \(m\)
- B\(z = 1.45 < 1.645\): insufficient evidence that the median exceeds \(m\)
- C\(z = 2.06 > 1.645\): evidence that the median exceeds \(m\)
- D\(z = 2.21 > 1.645\): evidence that the median exceeds \(m\)
It is claimed that the median journey time is 40 minutes. Thirteen randomly chosen journeys took 36.2, 41.5, 33.8, 38.9, 37.4, 44.1, 35.0, 39.6, 31.7, 38.2, 42.8, 36.9, 34.5 minutes. A sign test at the 5% level tests whether the median differs from 40 minutes. Which is correct?
- A\(P(X \le 3) = 0.0461 < 0.05\): evidence that the median differs from 40
- B\(P(X = 3) = 0.0349 < 0.05\): evidence that the median differs from 40
- C\(P(X \le 2) = 0.0112 < 0.025\): evidence that the median differs from 40
- D\(P(X \le 3) = 0.0461 > 0.025\): insufficient evidence that the median differs from 40
Quiz key
\(X \sim \mathrm{B}(9, 0.5)\) and \(\mathrm{H}_1\) predicts many + signs, so use the upper tail: \(P(X \ge 7) = \dfrac{\binom{9}{7} + \binom{9}{8} + \binom{9}{9}}{2^{9}} = \dfrac{36 + 9 + 1}{512} = \dfrac{46}{512} = 0.0898\). \(0.0703\) is \(P(X = 7)\) alone, not the whole tail. \(0.0195\) leaves out the observed value 7. \(0.180\) doubles the tail as if the test were two-tailed.
The sign test keeps only whether each value is above or below the hypothesised median, so it assumes nothing about the shape of the distribution; the Wilcoxon signed-rank test also uses the ranks of the sizes and is valid only for a symmetric population. Using the sizes describes the Wilcoxon test, not the sign test. Normality is the assumption of the \(t\)-test. Both non-parametric tests are about the median, not the mean.
Values above 25: all except 22.1 and 24.5, so 8 + signs. \(X \sim \mathrm{B}(10, 0.5)\): \(P(X \ge 8) = \dfrac{45 + 10 + 1}{1024} = \dfrac{56}{1024} = 0.0547\). Since \(0.0547 > 0.05\), do not reject \(\mathrm{H}_0\): there is insufficient evidence that the median mass exceeds 25 g. \(0.0439\) is \(P(X = 8)\) only. The third option has the right probability but reads the comparison the wrong way round. \(0.0107\) leaves out the observed value 8.
\(2^{16} = 65536\). \(P(X \le 3) = \dfrac{1 + 16 + 120 + 560}{65536} = 0.0106 \le 0.025\), but \(P(X \le 4) = \dfrac{697 + 1820}{65536} = 0.0384 > 0.025\). So the lower tail is \(X \le 3\) and, by symmetry, the upper tail is \(X \ge 16 - 3 = 13\). \(X \le 4\) or \(X \ge 12\) puts the whole 5% in each tail. \(X \ge 12\) with \(X \le 3\) mirrors the tail wrongly (\(16 - 3 - 1\)). \(X \le 5\) or \(X \ge 11\) includes the first value whose cumulative probability goes past the level.
Differences (after minus before): 5, 5, \(-1\), 6, 5, 5, 4, \(-1\), 5, 4, 4, 4, so 10 + signs and 2 \(-\) signs. \(\mathrm{H}_0\): the median difference is 0; \(\mathrm{H}_1\): it is positive. \(X \sim \mathrm{B}(12, 0.5)\): \(P(X \ge 10) = \dfrac{66 + 12 + 1}{4096} = \dfrac{79}{4096} = 0.0193 < 0.05\), so reject \(\mathrm{H}_0\): there is evidence that scores tend to increase. \(0.0161\) is \(P(X = 10)\) only. \(P(X \le 10)\) uses the wrong tail. Doubling to 0.0386 treats a one-tailed test as two-tailed.
\(X \sim \mathrm{B}(20, 0.5)\). \(P(X \le 5) = \dfrac{1 + 20 + 190 + 1140 + 4845 + 15504}{1048576} = \dfrac{21700}{1048576} = 0.0207 \le 0.05\), but \(P(X \le 6) = \dfrac{21700 + 38760}{1048576} = 0.0577 > 0.05\). So the critical region is \(X \le 5\) and the actual significance level is \(P(X \le 5) = 2.07\%\). \(X \le 6\) goes past 5%. Quoting 5% gives the nominal level, not the actual one. \(1.48\%\) is \(P(X = 5)\) alone.
\(X \sim \mathrm{B}(40, 0.5) \approx N(20, 10)\). \(P(X \ge 27) \approx P(Y > 26.5)\), so \(z = \dfrac{26.5 - 20}{\sqrt{10}} = 2.06 > 1.645\). Reject \(\mathrm{H}_0\): there is evidence that the median exceeds \(m\) (the exact binomial tail, 0.0192, agrees). \(2.21\) has no continuity correction, \(2.37\) corrects the wrong way (27.5), and \(1.45\) uses the variance \(np = 20\) instead of \(npq = 10\).
Times above 40: 41.5, 44.1, 42.8, so 3 + signs and 10 \(-\) signs. \(X \sim \mathrm{B}(13, 0.5)\): \(P(X \le 3) = \dfrac{1 + 13 + 78 + 286}{8192} = \dfrac{378}{8192} = 0.0461\). Two-tailed, so compare with 0.025: \(0.0461 > 0.025\), do not reject \(\mathrm{H}_0\). There is insufficient evidence that the median journey time differs from 40 minutes. Comparing with 0.05 forgets to halve the level for a two-tailed test. \(0.0349\) is \(P(X = 3)\) only, and \(0.0112\) leaves out the observed value 3.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.