Everything from the 3 lessons of this topic on a few pages: the key idea of each lesson, the diagram to remember, the points to learn and the traps examiners set. Read it, cover it, test yourself.
For a random sample of size \(n\) from a NORMAL population with unknown variance, estimate the variance by \(s^{2} = \dfrac{\sum x^{2} - n\bar{x}^{2}}{n - 1}\). Then \(T = \dfrac{\bar{X} - \mu}{s/\sqrt{n}}\) has a t-distribution with \(\nu = n - 1\) degrees of freedom. Use it for tests (compare \(t\) with the table value \(t_{n-1}\)) and for the interval \(\bar{x} \pm t_{n-1}\,\dfrac{s}{\sqrt{n}}\).
Two different \(n\)'s to watch. Divide by \(n - 1\), not \(n\), for the unbiased variance; and read the table at \(\nu = n - 1\), not \(n\). With a sample of 6, using \(\nu = 6\) gives 2.447 instead of 2.571.
Do not write 'the mean IS less than 20' or 'H0 is true'. A test only gives evidence: say 'there is (in)sufficient evidence at the 5% level that ...'. And state the assumption that the population is normal, or the t-test is not justified.
For a 95% interval use the 2.5% one-tail value (\(t_{9} = 2.262\)), not the 5% value (1.833). Using 1.833 gives only a 90% interval. And never use 1.96 with a small sample and unknown variance.
Two independent samples, sizes \(n_x\) and \(n_y\). Small samples, both populations normal with a common variance: pool the variance, \(s_p^{2} = \dfrac{\sum (x - \bar x)^{2} + \sum (y - \bar y)^{2}}{n_x + n_y - 2}\), and use \(t = \dfrac{\bar x - \bar y - k}{\sqrt{s_p^{2}\left(\frac{1}{n_x} + \frac{1}{n_y}\right)}}\) with \(n_x + n_y - 2\) degrees of freedom. Large samples (or known variances): use \(z = \dfrac{\bar x - \bar y - k}{\sqrt{\frac{\sigma_x^{2}}{n_x} + \frac{\sigma_y^{2}}{n_y}}}\) with the normal distribution, replacing \(\sigma^{2}\) by \(s^{2}\) when it is unknown. Here \(k\) is the difference \(\mu_x - \mu_y\) stated in \(\mathrm{H}_0\), usually 0.
Do not average the two variances, and do not divide by \(n_x + n_y\) or \(n_x + n_y - 1\). Weight each \(s^{2}\) by its own \(n - 1\), and divide by \(n_x + n_y - 2\). If you are given standard deviations, square them first.
Subtract \(k\) in the numerator: testing 'more than 2 minutes' with \(\bar x - \bar y = 3.4\) on top would wildly overstate the evidence. And the degrees of freedom are \(n_x + n_y - 2\), not \(n_x + n_y - 1\) or \(n - 1\) for one sample.
A normal test with \(s^{2}\) in place of \(\sigma^{2}\) needs LARGE samples. With samples of 6 and 8 and unknown variances you must use the 2-sample \(t\)-test, and then you must state the normal and common-variance assumptions.
Paired data (two measurements on the same subject or on matched subjects) are analysed through the differences \(d\). With \(n\) pairs, \(\bar{d}\) and the unbiased variance \(s_{d}^{2}\) of the differences, test \(H_{0}: \mu_{d} = k\) with \[t = \dfrac{\bar{d} - k}{s_{d}/\sqrt{n}}, \quad n - 1 \text{ degrees of freedom},\] assuming the differences are normally distributed. For two independent samples, a confidence interval for \(\mu_{x} - \mu_{y}\) is \((\bar{x} - \bar{y}) \pm t\,s_{p}\sqrt{\tfrac{1}{n_{x}} + \tfrac{1}{n_{y}}}\) with \(n_{x} + n_{y} - 2\) degrees of freedom, or \((\bar{x} - \bar{y}) \pm z\sqrt{\tfrac{s_{x}^{2}}{n_{x}} + \tfrac{s_{y}^{2}}{n_{y}}}\) when both samples are large.
| Student | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| Before | 52 | 61 | 47 | 70 | 58 | 64 | 49 | 55 |
| After | 55 | 60 | 51 | 72 | 63 | 65 | 55 | 59 |
Do not treat paired data as two independent samples. For the scores above, the before and after columns each vary by more than 20 marks between students, so a two-sample test sees a mean gap of 3 buried in that spread and finds nothing. Pairing removes the student-to-student variation, which is the whole point. Also use \(n - 1\) degrees of freedom where \(n\) is the number of PAIRS (7 here), not \(2n - 2\).
Two slips cost marks here. First, the wrong tail: a 95% interval needs \(t(0.975)\), not the one-tailed 5% value \(t(0.95)\). Second, the wrong degrees of freedom: paired intervals use \(n - 1\) (pairs), pooled intervals use \(n_{x} + n_{y} - 2\). And a 95% interval does not mean 'a 95% probability that \(\mu\) lies in THIS interval': it means 95% of intervals built this way would contain \(\mu\).
Do not pool the variances in the large-sample \(z\) interval: it uses \(\tfrac{s_{x}^{2}}{n_{x}} + \tfrac{s_{y}^{2}}{n_{y}}\) under ONE square root. Adding the two standard errors \(\tfrac{s_{x}}{\sqrt{n_{x}}} + \tfrac{s_{y}}{\sqrt{n_{y}}}\), or forgetting the square root, gives the wrong width. And use \(z\) only when the samples are large or the variances known; for small samples with estimated variances use \(t\).