When \(n\) is small (\(n \le 30\)) and the population is normal but \(\sigma\) is unknown, the Z-test does not apply. Instead we use Student's t, χ² and F distributions developed precisely for small samples.
Assumption: the parent population is normal (or approximately so).
The working rule: a sample of size less than 30 is treated as small, and the tests built for such samples are the small sample tests. The boundary is a rule of thumb, not a sharp line.
What makes a test "small-sample" is not the size itself but what the test relies on. A large sample test leans on the central limit theorem: whatever the parent population, the statistic is approximately normal. A small sample cannot lean on that, so these tests use the exact sampling distributions of their statistics — \(\chi^2\), \(t\) and \(F\) (and \(z\) when the population standard deviation is known) — which are exact only when the parent population is normal. The \(\chi^2\) tests of fit and of independence (§5–6) are the exception: there \(\chi^2\) is itself a large-sample approximation, which is why they ask for expected frequencies of at least 5.
The \(t\) statistic is written in two forms that look different and are the same number. The derivations use the sample variance with divisor \(n\); the formula boxes use the one with divisor \(n-1\). On this page \(s^2\) always means divisor \(n\) and \(S^2\) divisor \(n-1\):
\[ s^2 = \frac{1}{n}\sum_{i=1}^{n}(x_i - \bar x)^2, \qquad S^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar x)^2 . \]Statement. \(\dfrac{s}{\sqrt{n-1}} = \dfrac{S}{\sqrt n}\), so \(\dfrac{\bar x - \mu_0}{s/\sqrt{n-1}}\) and \(\dfrac{\bar x - \mu_0}{S/\sqrt n}\) are the same statistic.
Proof. Both variances divide the same sum of squares, so
\[ n s^2 = \sum_{i=1}^{n}(x_i - \bar x)^2 = (n-1) S^2 . \]Divide both sides by \(n(n-1)\):
\[ \frac{s^2}{n-1} = \frac{S^2}{n} . \]Both sides are positive, so taking square roots keeps the equality: \(\dfrac{s}{\sqrt{n-1}} = \dfrac{S}{\sqrt n}\). □
The computing form of \(s^2\) used in the problems comes from expanding the square: \(\sum(x_i - \bar x)^2 = \sum x_i^2 - 2\bar x\sum x_i + n\bar x^2 = \sum x_i^2 - n\bar x^2\), because \(\sum x_i = n\bar x\). Dividing by \(n\),
\[ s^2 = \frac{1}{n}\sum x_i^2 - \bar x^2 . \]\(H_0: \mu = \mu_0\). With sample mean \(\bar X\) and sample SD \(S\) (divisor \(n-1\)):
\[ t \;=\; \dfrac{\bar X - \mu_0}{S/\sqrt n} \;\sim\; t_{n-1}. \]Let \(x_1, x_2, \ldots, x_n\) be a random sample from \(N(\mu, \sigma^2)\). Test \(H_0: \mu = \mu_0\) (the sample has been drawn from a population with mean \(\mu_0\)) against \(H_1: \mu \ne \mu_0\), \(\mu > \mu_0\) or \(\mu < \mu_0\).
Case 1: \(\sigma\) known. The sample mean of a normal sample is itself normal, \(\bar x \sim N(\mu, \sigma^2/n)\), whatever \(n\) is. Standardising it,
\[ z = \frac{\bar x - \mu_0}{\sigma/\sqrt n} \sim N(0, 1) \quad\text{under } H_0, \]so the normal test applies to a small sample too.
Case 2: \(\sigma\) unknown. Now \(\sigma\) must be estimated, and the estimate brings its own randomness. Two facts about a normal sample are used.
By the definition of Student's \(t\): a standard normal variate divided by the square root of an independent \(\chi^2\) variate over its degrees of freedom has the \(t\) distribution with those degrees of freedom. So
\[ t = \frac{Z}{\sqrt{\dfrac{n s^2/\sigma^2}{n-1}}} = \frac{\dfrac{\bar x - \mu}{\sigma/\sqrt n}}{\dfrac{s}{\sigma}\sqrt{\dfrac{n}{n-1}}} \sim t_{n-1} . \]The unknown \(\sigma\) appears once in the numerator's denominator and once in the denominator, so it cancels:
\[ t = \frac{\bar x - \mu}{\sigma/\sqrt n}\cdot\frac{\sigma}{s}\sqrt{\frac{n-1}{n}} = \frac{(\bar x - \mu)\sqrt{n-1}}{s} = \frac{\bar x - \mu}{s/\sqrt{n-1}} . \]That cancellation is the whole point: the statistic can be computed without knowing \(\sigma\), and its distribution, \(t_{n-1}\), does not depend on \(\sigma\) either. Under \(H_0\),
\[ t = \frac{\bar x - \mu_0}{s/\sqrt{n-1}} = \frac{\bar x - \mu_0}{S/\sqrt n} \sim t_{n-1} , \]the two forms being equal by §1. Inference: if \(|t|\) exceeds the table value \(t_{\alpha, n-1}\) for the test in hand (two-tailed or one-tailed), reject \(H_0\); otherwise do not reject it.
Turning the test around gives an interval. Since \(P\!\left(-t_{\alpha/2} \le \dfrac{\bar x - \mu}{s/\sqrt{n-1}} \le t_{\alpha/2}\right) = 1 - \alpha\), rearranging the inequalities for \(\mu\) gives the \(100(1-\alpha)\%\) confidence limits
\[ \bar x \pm t_{\alpha/2,\,n-1}\,\frac{s}{\sqrt{n-1}} . \]An interval has two ends, so it uses the two-tailed point: for 95% limits \(t_{0.025}\), for 99% limits \(t_{0.005}\). Worked Problem 5 below shows what goes wrong when a one-tailed table value is used instead.
A sample of 10 observations: \(\bar X = 48,\; S = 5\). Test \(H_0: \mu = 50\) at 5 %.
\(t = (48 - 50)/(5/\sqrt{10}) = -2/1.581 = -1.265\). df = 9. \(t_{0.025, 9} = 2.262\). \(|t| < 2.262\) ⇒ do not reject \(H_0\).
10 students score: 65, 70, 68, 72, 75, 73, 71, 69, 74, 70 — \(\bar X = 70.7,\; S = 2.98\). Test \(H_0: \mu = 68\).
\(t = (70.7 - 68)/(2.98/\sqrt{10}) = 2.7/0.943 = 2.86\). df = 9. \(t_{0.025, 9} = 2.262\) ⇒ reject \(H_0\). Mean exceeds 68.
\(H_0: \mu_1 = \mu_2\). With pooled variance:
\[ s_p^2 \;=\; \dfrac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}, \] \[ t \;=\; \dfrac{\bar X_1 - \bar X_2}{s_p\sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}}} \;\sim\; t_{n_1+n_2-2}. \]Assumption: \(\sigma_1 = \sigma_2\) (equal variances). Use Welch's correction otherwise.
Let \(x_1, \ldots, x_{n_1}\) be a random sample from \(N(\mu_1, \sigma_1^2)\) and \(y_1, \ldots, y_{n_2}\) an independent one from \(N(\mu_2, \sigma_2^2)\). Test \(H_0: \mu_1 = \mu_2\).
Step 1. Each mean is normal: \(\bar x \sim N(\mu_1, \sigma_1^2/n_1)\) and \(\bar y \sim N(\mu_2, \sigma_2^2/n_2)\). The samples are independent, so the variances of the two means add, and the difference is normal:
\[ \bar x - \bar y \sim N\!\left(\mu_1 - \mu_2,\; \frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}\right). \]Case 1: \(\sigma_1 = \sigma_2 = \sigma\), unknown. This is the \(t\)-test. Standardise the difference: \(\xi = \dfrac{\bar x - \bar y - (\mu_1 - \mu_2)}{\sigma\sqrt{1/n_1 + 1/n_2}} \sim N(0,1)\). With \(s_1^2, s_2^2\) the sample variances (divisor \(n\)),
\[ \frac{n_1 s_1^2}{\sigma^2} \sim \chi^2_{n_1 - 1}, \qquad \frac{n_2 s_2^2}{\sigma^2} \sim \chi^2_{n_2 - 1}, \]independently, and by the additive property of \(\chi^2\) their sum is \(\chi^2 = \dfrac{n_1 s_1^2 + n_2 s_2^2}{\sigma^2} \sim \chi^2_{n_1 + n_2 - 2}\). Divide \(\xi\) by \(\sqrt{\chi^2/(n_1+n_2-2)}\), as the definition of \(t\) requires; \(\sigma\) cancels exactly as in §2:
\[ \begin{gathered} \begin{aligned} t &= \frac{\xi}{\sqrt{\chi^2/(n_1 + n_2 - 2)}} = \frac{\bar x - \bar y - (\mu_1 - \mu_2)}{\sqrt{\dfrac{n_1 s_1^2 + n_2 s_2^2}{n_1 + n_2 - 2}}\sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}}} \\ &= \frac{\bar x - \bar y - (\mu_1 - \mu_2)}{S\sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}}} \sim t_{n_1 + n_2 - 2}, \end{aligned} \qquad S^2 = \frac{n_1 s_1^2 + n_2 s_2^2}{n_1 + n_2 - 2} . \end{gathered} \]Under \(H_0\) the term \(\mu_1 - \mu_2\) is zero: \(t = \dfrac{\bar x - \bar y}{S\sqrt{1/n_1 + 1/n_2}} \sim t_{n_1 + n_2 - 2}\); reject \(H_0\) if \(|t| > t_{\alpha,\, n_1 + n_2 - 2}\). Since \(n_1 s_1^2 = (n_1 - 1)S_1^2\), this \(S^2\) is the pooled \(s_p^2\) written above with the other divisor — the same number.
Case 2: \(\sigma_1 = \sigma_2 = \sigma\), known. The denominator of the normal variate is \(\sqrt{\sigma^2/n_1 + \sigma^2/n_2} = \sigma\sqrt{1/n_1 + 1/n_2}\), so under \(H_0\)
\[ z = \frac{\bar x - \bar y}{\sigma\sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}}} \sim N(0,1). \]Case 3: \(\sigma_1^2\) and \(\sigma_2^2\) both known. Standardise directly:
\[ z = \frac{\bar x - \bar y}{\sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}}} \sim N(0,1) \quad\text{under } H_0 . \]In Cases 2 and 3, reject \(H_0\) if \(|z| > z_\alpha\).
Why the F-test comes first. Case 1 assumes the two population variances are equal. So before applying it, it is theoretically desirable to test \(\sigma_1^2 = \sigma_2^2\) with the F-test of §8; Worked Problem 34 below does exactly that.
Method A: \(n_1 = 8,\; \bar X_1 = 75,\; s_1 = 5\). Method B: \(n_2 = 10,\; \bar X_2 = 70,\; s_2 = 6\). Test at 5 %.
\(s_p^2 = [7(25) + 9(36)]/16 = (175 + 324)/16 = 31.19;\;s_p = 5.59\).
\(t = 5/(5.59 \sqrt{1/8 + 1/10}) = 5/(5.59 \cdot 0.474) = 1.89\). df = 16. \(t_{0.025, 16} = 2.12\). \(|t| < 2.12\) ⇒ no significant difference.
Drug A: \(n_1 = 12,\bar X_1 = 25,\; s_1 = 2\). Drug B: \(n_2 = 14,\bar X_2 = 28,\; s_2 = 2.5\). Test \(H_0: \mu_A = \mu_B\) at 5 %.
\(s_p^2 = (11 \cdot 4 + 13 \cdot 6.25)/24 = 5.22\); \(s_p = 2.28\).
\(t = -3/(2.28\sqrt{1/12 + 1/14}) = -3/0.898 = -3.34\). df = 24, \(t_{0.025} = 2.06\) ⇒ reject \(H_0\).
Used when the two samples are paired (before–after, matched pairs, twin studies).
Let \(d_i = X_i - Y_i\) (paired difference) with mean \(\bar d\) and SD \(s_d\). Then
\[ t \;=\; \dfrac{\bar d - 0}{s_d/\sqrt n} \;\sim\; t_{n-1}. \]In paired data \((x_1, y_1), \ldots, (x_n, y_n)\) the two values in a pair belong to the same sample unit — the same patient before and after, the same cow on two foods. They are not independent, so the two-sample test of §3, which assumed independent samples, does not apply.
The way out is to work with one number per unit, the difference \(d_i = x_i - y_i\). The \(d_i\) are a single random sample, and \(H_0: \mu_1 = \mu_2\) becomes \(H_0: \mu_d = 0\). The single-mean test of §2 applied to the \(d_i\) is then the paired test:
\[ \bar d = \frac{1}{n}\sum d_i, \qquad s^2 = \frac{1}{n}\sum (d_i - \bar d)^2 = \frac{1}{n}\sum d_i^2 - \bar d^2, \] \[ t = \frac{\bar d}{s/\sqrt{n-1}} = \frac{\bar d}{S/\sqrt n} \sim t_{n-1}, \qquad S^2 = \frac{1}{n-1}\left[\sum d_i^2 - n\bar d^2\right]. \]Keep the direction straight. With \(d = x - y\), "the second reading is higher" means \(\mu_d < 0\), so an increase from \(x\) to \(y\) is a lower-tailed test: reject \(H_0\) when \(t < -t_\alpha\). Getting this backwards is the commonest slip in paired problems; Worked Problems 12 and 14 below set it up carefully.
Weights of 8 patients before and after a diet:
| Before | 72 | 78 | 69 | 80 | 85 | 76 | 82 | 74 |
|---|---|---|---|---|---|---|---|---|
| After | 70 | 76 | 67 | 78 | 83 | 74 | 79 | 72 |
| d | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 2 |
\(\bar d = 17/8 = 2.125;\; s_d = 0.354\). \(t = 2.125/(0.354/\sqrt 8) = 2.125/0.125 = 17.0\). df = 7, highly significant ⇒ reject \(H_0\): weights fell. (That the diet caused the fall needs a control group; a before–after design cannot show it.)
10 students' scores before and after a coaching: \(\bar d = 4.5,\; s_d = 5.2\). Test \(H_0: \mu_d = 0\).
\(t = 4.5/(5.2/\sqrt{10}) = 4.5/1.644 = 2.74\). df = 9. \(t_{0.025} = 2.26\) ⇒ reject \(H_0\); scores rose significantly after the coaching.
Let \((x_1, y_1), \ldots, (x_n, y_n)\) be a random sample of size \(n\) from a bivariate normal population, with sample correlation coefficient \(r\) and population correlation \(\rho\). Test
\(H_0: \rho = 0\) (the variables are uncorrelated) against \(H_1: \rho \ne 0\).
Under \(H_0\),
\[ t = \frac{r}{\sqrt{\dfrac{1 - r^2}{n - 2}}} = \frac{r\sqrt{n-2}}{\sqrt{1 - r^2}} \sim t_{n-2} . \]The \(n - 2\) degrees of freedom are those of the residual sum of squares in the regression of \(y\) on \(x\), where two constants (the intercept and the slope) are fitted. If \(|t| > t_{\alpha, n-2}\), reject \(H_0\).
Only for \(\rho = 0\). The statistic has the \(t_{n-2}\) distribution when \(\rho = 0\); for any other value of \(\rho\) the distribution of \(r\) is skewed. A hypothesis \(\rho = \rho_0 \ne 0\) is tested with Fisher's \(Z\)-transformation, in Unit 3.
Confidence limits. For a large sample a simple interval is \(r \pm z_{\alpha/2}\,\dfrac{1 - r^2}{\sqrt n}\), from the large-sample standard error of \(r\); Worked Problem 18 uses it and compares it with Fisher's interval.
Tests whether observed frequencies fit a hypothesized distribution.
where \(k\) = number of categories, \(r\) = number of parameters estimated from data, \(O_i\) = observed, \(E_i\) = expected frequency. Reject \(H_0\) if \(\chi^2 > \chi^2_{\alpha, df}\).
Conditions: All \(E_i \ge 5\); if any are smaller, combine adjacent categories.
For the \(\chi^2\) test of goodness of fit, and the test of independence of §6, to be valid:
Pooling. If an expected frequency is less than 5, it is pooled with the preceding or succeeding frequency until the pooled frequency exceeds 5, and the degrees of freedom are reduced by the cells lost: if three frequencies are pooled into one, two degrees of freedom are subtracted. Estimated parameters. If parameters of the fitted distribution are estimated from the data, that number is subtracted as well. So with \(k\) classes, \(K\) degrees of freedom lost to pooling and \(l\) parameters estimated,
\[ \text{d.f.} = k - 1 - K - l . \]Karl Pearson's test asks whether the deviation of experiment from theory is just chance, or is due to the inadequacy of the theory to fit the observed data. With \(O_i\) the observed and \(E_i\) the expected frequencies, \(H_0\): the fitted distribution is a good fit,
\[ \chi^2 = \sum_{i=1}^{k}\frac{(O_i - E_i)^2}{E_i} \sim \chi^2_{k-1} . \]The short form. Expand the square and use \(\sum O_i = \sum E_i = N\):
\[ \begin{aligned} \sum\frac{(O_i - E_i)^2}{E_i} &= \sum\frac{O_i^2}{E_i} - 2\sum O_i + \sum E_i = \sum\frac{O_i^2}{E_i} - 2N + N \\ &= \sum\frac{O_i^2}{E_i} - N . \end{aligned} \]The short form needs only one division per class, which is why it is convenient by hand.
Throw a die 60 times. Observed frequencies: 8, 11, 9, 12, 10, 10. Test fairness.
\(E_i = 60/6 = 10\) for each. \[ \begin{aligned} \chi^2 &= [(8-10)^2 + (11-10)^2 + (9-10)^2 + (12-10)^2 + 0 + 0]/10 \\ &= (4+1+1+4)/10 = 1.0 \end{aligned} \]. df = 5. \(\chi^2_{0.05,5} = 11.07\) ⇒ do not reject \(H_0\); the data are consistent with a fair die.
Of 800 plants: 460 round-yellow, 140 round-green, 130 wrinkled-yellow, 70 wrinkled-green. Expected: 450, 150, 150, 50.
\[ \begin{aligned} \chi^2 &= (10)^2/450 + (10)^2/150 + (20)^2/150 + (20)^2/50 \\ &= 0.222 + 0.667 + 2.667 + 8.0 = 11.56 \end{aligned} \]. df = 3, \(\chi^2_{0.05,3} = 7.81\) ⇒ reject; data deviates from Mendelian ratio.
Tests whether two categorical variables are independent.
For an \(r \times c\) contingency table with observed frequencies \(O_{ij}\):
\[ E_{ij} \;=\; \dfrac{(\text{row total}_i)(\text{col total}_j)}{N}, \] \[ \chi^2 \;=\; \sum_{i,j}\dfrac{(O_{ij} - E_{ij})^2}{E_{ij}} \;\sim\; \chi^2_{(r-1)(c-1)}. \]Attribute A has \(r\) classes \(A_1, \ldots, A_r\) and B has \(s\) classes \(B_1, \ldots, B_s\). In the \(r \times s\) contingency table, \((A_iB_j)\) is the number of units with both \(A_i\) and \(B_j\), \((A_i)\) and \((B_j)\) are the margins, and \(\sum_i (A_i) = \sum_j (B_j) = N\).
Estimate the class probabilities by their proportions, \(P[A_i] = (A_i)/N\) and \(P[B_j] = (B_j)/N\). Under \(H_0\) the attributes are independent, so the probability of a cell is the product:
\[ P[A_iB_j] = P[A_i]\,P[B_j] = \frac{(A_i)}{N}\cdot\frac{(B_j)}{N} . \]Multiplying by \(N\) gives the expected frequency,
\[ E_{ij} = N\,P[A_iB_j] = \frac{(A_i)(B_j)}{N}, \qquad \chi^2 = \sum_{i=1}^{r}\sum_{j=1}^{s}\frac{(O_{ij} - E_{ij})^2}{E_{ij}} \sim \chi^2_{(r-1)(s-1)} . \]The degrees of freedom are \((r-1)(s-1)\): once the margins are fixed, only that many cells can be filled freely; the rest follow by subtraction.
Statement. For the table with cells \(a, b\) (first row) and \(c, d\) (second row), \(N = a + b + c + d\),
\[ \chi^2 = \frac{N(ad - bc)^2}{(a+b)(c+d)(a+c)(b+d)} . \]Proof. The margins are \(a+b\), \(c+d\) (rows) and \(a+c\), \(b+d\) (columns), so the expected frequencies are
\[ \begin{gathered} E_{11} = \frac{(a+b)(a+c)}{N} ,\quad E_{12} = \frac{(a+b)(b+d)}{N} ,\quad E_{21} = \frac{(c+d)(a+c)}{N}, \\ E_{22} = \frac{(c+d)(b+d)}{N} . \end{gathered} \]Step 1: every deviation has the same size. Put \(a\) over the common denominator \(N\) and expand:
\[ \begin{aligned} a - E_{11} &= \frac{a(a+b+c+d) - (a+b)(a+c)}{N} \\ &= \frac{a^2 + ab + ac + ad - a^2 - ac - ab - bc}{N} = \frac{ad - bc}{N} . \end{aligned} \]The same expansion gives \(b - E_{12} = -\dfrac{ad - bc}{N}\), \(c - E_{21} = -\dfrac{ad - bc}{N}\) and \(d - E_{22} = \dfrac{ad - bc}{N}\). Squared, all four are \(\dfrac{(ad - bc)^2}{N^2}\).
Step 2: take the common factor out.
\[ \chi^2 = \frac{(ad - bc)^2}{N^2}\left[\frac{1}{E_{11}} + \frac{1}{E_{12}} + \frac{1}{E_{21}} + \frac{1}{E_{22}}\right]. \]Each \(E\) has \(N\) in its denominator, so each \(1/E\) has \(N\) on top, and one \(N\) cancels against the \(N^2\):
\[ \begin{aligned} \chi^2 = \frac{(ad - bc)^2}{N}\bigg[&\frac{1}{(a+b)(a+c)} + \frac{1}{(a+b)(b+d)} \\ &+ \frac{1}{(c+d)(a+c)} + \frac{1}{(c+d)(b+d)}\bigg]. \end{aligned} \]Step 3: add the four fractions. Pair the first two, which share \((a+b)\): \(\dfrac{1}{a+b}\left[\dfrac{1}{a+c} + \dfrac{1}{b+d}\right] = \dfrac{1}{a+b}\cdot\dfrac{N}{(a+c)(b+d)}\), because \((b+d) + (a+c) = N\). The last two give \(\dfrac{1}{c+d}\cdot\dfrac{N}{(a+c)(b+d)}\) the same way. Adding,
\[ \begin{aligned} \frac{N}{(a+c)(b+d)}\left[\frac{1}{a+b} + \frac{1}{c+d}\right] &= \frac{N}{(a+c)(b+d)}\cdot\frac{N}{(a+b)(c+d)} \\ &= \frac{N^2}{(a+b)(c+d)(a+c)(b+d)} . \end{aligned} \]Step 4. Substitute into Step 2: \(\chi^2 = \dfrac{(ad - bc)^2}{N}\cdot\dfrac{N^2}{(a+b)(c+d)(a+c)(b+d)} = \dfrac{N(ad - bc)^2}{(a+b)(c+d)(a+c)(b+d)}\). □
In a \(2 \times 2\) table, when a cell frequency is small (an expected frequency below 5), the continuity correction is
\[ \chi^2 = \frac{N\left(|ad - bc| - \tfrac{N}{2}\right)^2}{(a+b)(c+d)(a+c)(b+d)} . \]The \(\chi^2\) distribution is continuous and the cell counts are whole numbers; subtracting \(N/2\) moves each deviation half a unit towards zero, which makes the approximation better for small counts. Many courses use the correction even when no expected frequency is below 5, and the reason Extra Practical Problem 7 below applies it.
Smoking vs cancer in 200 people:
| Cancer | No | Total | |
|---|---|---|---|
| Smoker | 60 | 40 | 100 |
| Non-smoker | 20 | 80 | 100 |
| Total | 80 | 120 | 200 |
Expected: \(E_{11} = 100 \cdot 80/200 = 40\); rest by subtraction: \(E_{12} = 60,\; E_{21} = 40,\; E_{22} = 60\).
\[ \begin{aligned} \chi^2 &= (60-40)^2/40 + (40-60)^2/60 + (20-40)^2/40 + (80-60)^2/60 \\ &= 10 + 6.667 + 10 + 6.667 = 33.33 \end{aligned} \]. df = 1, \(\chi^2_{0.05,1} = 3.84\) ⇒ reject; smoking and cancer are not independent.
Voting preference of 200 voters in three regions, between two candidates:
| Candidate A | Candidate B | Total | |
|---|---|---|---|
| Region 1 | 25 | 15 | 40 |
| Region 2 | 27 | 33 | 60 |
| Region 3 | 68 | 32 | 100 |
| Total | 120 | 80 | 200 |
Expected counts, row total × column total / 200: Region 1: \(40 \cdot 120/200 = 24\) and 16; Region 2: 36 and 24; Region 3: 60 and 40.
\[ \begin{aligned} \chi^2 &= \dfrac{(25-24)^2}{24} + \dfrac{(15-16)^2}{16} + \dfrac{(27-36)^2}{36} + \dfrac{(33-24)^2}{24} \\ &\quad + \dfrac{(68-60)^2}{60} + \dfrac{(32-40)^2}{40} \end{aligned} \] \(= 0.042 + 0.063 + 2.250 + 3.375 + 1.067 + 1.600 = 8.40\).
df = (3−1)(2−1) = 2, \(\chi^2_{0.05,2} = 5.99\). Since \(8.40 > 5.99\), reject (p ≈ 0.015): preference depends on region. Region 2, where B is ahead, contributes most of the statistic.
\(H_0: \sigma^2 = \sigma_0^2\). Test statistic:
\[ \chi^2 \;=\; \dfrac{(n - 1) S^2}{\sigma_0^2} \;\sim\; \chi^2_{n-1}. \]For a random sample from \(N(\mu, \sigma^2)\) with sample variance \(s^2\) (divisor \(n\)), \(\dfrac{n s^2}{\sigma^2} = \dfrac{\sum (x_i - \bar x)^2}{\sigma^2} \sim \chi^2_{n-1}\). Under \(H_0: \sigma^2 = \sigma_0^2\),
\[ \chi_0^2 = \frac{n s^2}{\sigma_0^2} = \frac{(n-1)S^2}{\sigma_0^2} \sim \chi^2_{n-1}, \]the second form being the one above, since \(n s^2 = (n-1)S^2\) (§1). The rule "reject if \(\chi_0^2 > \chi^2_{\alpha, n-1}\)" is the test against \(\sigma^2 > \sigma_0^2\). Against \(\sigma^2 < \sigma_0^2\) the rejection region is the lower tail, and against \(\sigma^2 \ne \sigma_0^2\) it is both tails, as Example 1 below uses.
Sample of 25 with \(S^2 = 18\). Test \(H_0: \sigma^2 = 16\) at 5 %.
\(\chi^2 = 24 \cdot 18/16 = 27\). df = 24. \(\chi^2_{0.025, 24} = 39.36;\; \chi^2_{0.975, 24} = 12.40\). Since \(12.4 < 27 < 39.4\) ⇒ do not reject \(H_0\).
\(n = 21,\; S^2 = 6\). Test \(H_0: \sigma^2 = 4\) (one-tailed: \(\sigma^2 > 4\)).
\(\chi^2 = 20 \cdot 6/4 = 30\). df = 20. \(\chi^2_{0.05, 20} = 31.41 > 30\) ⇒ do not reject \(H_0\) at 5 %.
\(H_0: \sigma_1^2 = \sigma_2^2\). Take the ratio of larger to smaller variance:
\[ F \;=\; \dfrac{S_1^2}{S_2^2} \;\sim\; F_{n_1 - 1,\; n_2 - 1}\;\;(S_1^2 \ge S_2^2). \]Reject \(H_0\) if \(F > F_{\alpha, n_1-1, n_2-1}\) (one-tailed) or beyond two-tailed bounds.
Let a sample of size \(n_1\) come from \(N(\mu_1, \sigma_1^2)\) and an independent one of size \(n_2\) from \(N(\mu_2, \sigma_2^2)\), with sample variances \(s_1^2, s_2^2\). Then
\[ \frac{n_1 s_1^2}{\sigma_1^2} \sim \chi^2_{n_1 - 1}, \qquad \frac{n_2 s_2^2}{\sigma_2^2} \sim \chi^2_{n_2 - 1}, \]independently. By definition, the ratio of two independent \(\chi^2\) variates, each divided by its degrees of freedom, is an \(F\) variate:
\[ F = \frac{\dfrac{n_1 s_1^2}{\sigma_1^2}\Big/(n_1 - 1)}{\dfrac{n_2 s_2^2}{\sigma_2^2}\Big/(n_2 - 1)} \sim F_{(n_1 - 1,\; n_2 - 1)} . \]Under \(H_0: \sigma_1^2 = \sigma_2^2\) the population variances cancel, leaving the ratio of the unbiased estimates \(S_1^2 = \dfrac{n_1 s_1^2}{n_1 - 1}\) and \(S_2^2 = \dfrac{n_2 s_2^2}{n_2 - 1}\):
\[ F = \frac{S_1^2}{S_2^2} \sim F_{(n_1 - 1,\; n_2 - 1)} . \]F tables give only upper points, so the larger estimate is put in the numerator and the degrees of freedom follow it:
Reject \(H_0\) if \(F\) exceeds the table value. One caution: putting the larger estimate on top makes a two-sided alternative \(\sigma_1^2 \ne \sigma_2^2\) a two-tailed test in disguise, so at an exact 5% level the upper 2.5% point is the right comparison. The 5% table is often read by convention; the problems below say where the difference could matter.
An F-test also states its question in terms of the unbiased estimates \(S^2\). If a problem already gives unbiased estimates, they are used as they stand — converting them again by \(n/(n-1)\) would inflate both (Worked Problem 33).
\(n_1 = 11,\; S_1^2 = 25;\;\; n_2 = 16,\; S_2^2 = 16\). Test at 5 %.
\(F = 25/16 = 1.5625\). df = (10, 15). \(F_{0.05, 10, 15} = 2.54\) ⇒ do not reject \(H_0\); no evidence that the variances differ.
Two production lines: \(S_1^2 = 36\) (n₁=21), \(S_2^2 = 16\) (n₂=16). \(F = 36/16 = 2.25\). df = (20, 15). \(F_{0.05} = 2.33\) ⇒ do not reject \(H_0\) at 5 %.
| Question | Test |
|---|---|
| Single mean (σ known, any n) | z, standard normal |
| Single mean (σ unknown) | t with n−1 df |
| Difference of two means (independent) | Pooled t with n₁+n₂−2 df |
| Difference of paired means | Paired t with n−1 df |
| Correlation coefficient (ρ = 0) | t with n−2 df |
| Population variance | χ² with n−1 df |
| Equality of two variances | F with (n₁−1, n₂−1) df |
| Goodness of fit / independence | χ² with appropriate df |
Additional worked problems with step-by-step procedures to support self-study, matching this unit's topics.
A new greengram variety is expected to yield 12 q/ha. Tested on 10 fields: 14.3, 12.6, 13.7, 10.9, 13.7, 12.0, 11.4, 12.0, 12.6, 13.1.
\(H_0: \mu = 12\) vs \(H_1: \mu \ne 12\). Sample mean \(\bar x = 12.63\), \(s = \sqrt{\frac{\sum(x-\bar x)^2}{n-1}} = \sqrt{\frac{10.60}{9}} = 1.085\).
\(t = \dfrac{\bar x - \mu}{s/\sqrt n} = \dfrac{12.63 - 12}{1.085/\sqrt{10}} = 1.836\), df = 9. Table \(t_{0.025,9} = 2.262\) (two-tailed 5%). Since \(1.836 < 2.262\), do not reject \(H_0\) — the data are consistent with a yield of 12 q/ha.
Yields (q) under two manures: Manure I (n=8): 14, 20, 34, 48, 32, 42, 30, 44; Manure II (n=7): 31, 18, 22, 28, 40, 26, 45.
\(\bar x = 33,\ \bar y = 30\); \(\sum(x-\bar x)^2 = 968,\ \sum(y-\bar y)^2 = 554\).
\(s^2 = \dfrac{968 + 554}{8+7-2} = 117.07\), \(s = 10.82\).
\(t = \dfrac{\bar x - \bar y}{s\sqrt{\frac1{n_1}+\frac1{n_2}}} = \dfrac{33-30}{10.82\sqrt{\frac18+\frac17}} = 0.54\), df = 13. Table \(t_{0.025,13} = 2.16\). Since \(0.54 < 2.16\), do not reject \(H_0\) — no significant difference between the manures.
Body-weight increase (oz) of animals given treatments A and B from six litters:
| Litter | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| A | 28 | 32 | 29 | 36 | 29 | 34 |
| B | 25 | 24 | 27 | 30 | 30 | 29 |
Differences \(d = A - B\): 3, 8, 2, 6, −1, 5; \(\bar d = 23/6 = 3.83\), \(s^2 = \frac{50.83}{5} = 10.17\), \(s = 3.19\).
\(t = \dfrac{\bar d}{s/\sqrt n} = \dfrac{3.83}{3.19/\sqrt 6} = 2.94\), df = 5. Table \(t_{0.025,5} = 2.571\). Since \(2.94 > 2.571\), reject \(H_0\) — treatments A and B differ significantly.
Sample I (n=10): 20, 16, 26, 27, 23, 22, 18, 24, 25, 19. Sample II (n=12): 17, 23, 32, 25, 22, 24, 28, 18, 31, 33, 20, 27.
\(\bar x = 22,\ \bar y = 25\); \(s_1^2 = \frac{120}{9} = 13.33\), \(s_2^2 = \frac{314}{11} = 28.55\).
\(F = \dfrac{\text{larger } s^2}{\text{smaller } s^2} = \dfrac{28.55}{13.33} = 2.14\), df = (11, 9). Table \(F_{0.05}(11, 9) = 3.10\). Since \(2.14 < 3.10\), do not reject \(H_0\) — no evidence that the variances differ.
200 random digits with observed frequencies of 0–9: 22, 21, 16, 20, 23, 15, 18, 21, 19, 25. Expected frequency \(= 200/10 = 20\) each.
\(\chi^2 = \sum\dfrac{(O_i - E_i)^2}{E_i} = \dfrac{86}{20} = 4.3\), df = 9. Table \(\chi^2_{0.05,9} = 16.92\). Since \(4.3 < 16.92\), do not reject \(H_0\) — the data are consistent with equally frequent digits.
Cholera epidemic data:
| Attacked | Not attacked | Total | |
|---|---|---|---|
| Inoculated | 31 | 469 | 500 |
| Not inoculated | 185 | 1315 | 1500 |
| Total | 216 | 1784 | 2000 |
Expected: E(31)=54, E(469)=446, E(185)=162, E(1315)=1338. \(\chi^2 = \sum\dfrac{(O-E)^2}{E} = 14.64\), df = (2−1)(2−1) = 1. Table \(\chi^2_{0.05,1} = 3.841\). Since \(14.64 > 3.841\), reject \(H_0\) — attack is associated with inoculation: 6.2% of the inoculated were attacked against 12.3% of the others.
50 small shops:
| In Towns | In Villages | Total | |
|---|---|---|---|
| Run by men | 17 | 18 | 35 |
| Run by women | 3 | 12 | 15 |
| Total | 20 | 30 | 50 |
The counts are small (one observed cell is 3; the smallest expected count is \(15 \times 20/50 = 6\)), and many texts apply Yates' correction to every 2×2 table, so it is applied here: \(\chi^2 = \dfrac{N\left(|ad-bc| - \frac N2\right)^2}{(a+b)(c+d)(a+c)(b+d)} = \dfrac{50\left(|17\cdot12 - 18\cdot3| - 25\right)^2}{35\cdot15\cdot20\cdot30} = 2.48\), df = 1. Since \(2.48 < 3.841\), do not reject \(H_0\) — no evidence of relatively more women owners in villages. (Without the correction \(\chi^2 = 3.57\), which also does not reach 3.841.)
Thirty-four problems, grouped by the test they use: five on a single mean, six on two independent means, four on paired samples, three on a correlation coefficient, six on goodness of fit, five on independence of attributes and five on the F-test. They are numbered 1–34 separately from the seven Extra Practical Problems above, and the rest of this page calls them “Worked Problem n”. Every one runs the same steps: null hypothesis, alternative hypothesis, test statistic under \(H_0\), conclusion at the stated level (5% where none is stated). The \(\chi^2\) test for a single variance (§7) is used in the Extra Practical Problems above.
These solutions write \(s^2\) for the sample variance with divisor \(n\) and \(S^2\) for the one with divisor \(n-1\); the two forms of each statistic give the same number (§1). Values are carried at full precision and rounded only when written.
Bags of cement should weigh 24 kg on average, with standard deviation 2.4 kg. A sample of 16 bags has mean weight 23.1 kg. Is the difference significant?
Given \(\mu_0 = 24\), \(\sigma = 2.4\), \(n = 16\), \(\bar x = 23.1\).
(1) Null hypothesis. \(H_0: \mu = 24\): the bags meet the specification.
(2) Alternative hypothesis. \(H_1: \mu \ne 24\). Two-tailed test.
(3) Test statistic under \(H_0\). The population standard deviation is known, so by Case 1 of §2 the normal test applies even though the sample is small:
\[ z = \frac{\bar x - \mu_0}{\sigma/\sqrt n} = \frac{23.1 - 24}{2.4/\sqrt{16}} = \frac{-0.9}{0.6} = -1.5 . \](4) Conclusion. \(|z| = 1.5\), and the two-tailed 5% value is \(z_\alpha = 1.96\). Since \(|z| < z_\alpha\), \(H_0\) is not rejected: the difference is not significant.
Pipes from a workshop should have mean outer diameter 50 mm. A sample of 17 pipes has mean 52.1 mm and standard deviation 3.2 mm. Can the sample be regarded as coming from this population, at the 5% level?
Given \(\mu_0 = 50\), \(n = 17\), \(\bar x = 52.1\), \(s = 3.2\); \(\sigma\) is unknown.
(1) \(H_0: \mu = 50\). (2) \(H_1: \mu \ne 50\). Two-tailed.
(3)
\[ t = \frac{\bar x - \mu_0}{s/\sqrt{n-1}} = \frac{52.1 - 50}{3.2/\sqrt{16}} = \frac{2.1}{0.8} = 2.625 \sim t_{16} . \]The two-tailed 5% value for 16 d.f. is \(t_{0.025,16} = 2.12\).
(4) \(|t| = 2.625 > 2.12\), so \(H_0\) is rejected: the sample does not come from a population with mean 50 mm.
Floor tiles are specified at 4.2 mm thick. A sample of 10 tiles has mean 4.32 mm and standard deviation 0.11 mm. Test at the 1% level whether the mean thickness is more than 4.2 mm.
(1) \(H_0: \mu = 4.2\). (2) \(H_1: \mu > 4.2\). One-tailed (right).
(3)
\[ t = \frac{4.32 - 4.2}{0.11/\sqrt 9} = \frac{0.12}{0.03667} = 3.273 \sim t_9 . \]The one-tailed 1% value for 9 d.f. is \(t_{0.01,9} = 2.821\).
(4) \(t = 3.273 > 2.821\), so \(H_0\) is rejected: the mean thickness is more than 4.2 mm.
The scores of 10 trainees on an aptitude test are 45, 58, 52, 39, 61, 47, 50, 44, 55, 41. Do the data support a population mean score of 50?
| \(x\) | 45 | 58 | 52 | 39 | 61 | 47 | 50 | 44 | 55 | 41 | \(\sum x = 492\) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| \(x^2\) | 2025 | 3364 | 2704 | 1521 | 3721 | 2209 | 2500 | 1936 | 3025 | 1681 | \(\sum x^2 = 24686\) |
(1) \(H_0: \mu = 50\). (2) \(H_1: \mu \ne 50\). Two-tailed.
(3)
\[ t = \frac{49.2 - 50}{6.9253/\sqrt 9} = \frac{-0.8}{2.3084} = -0.347 \sim t_9 . \]The two-tailed 5% value for 9 d.f. is 2.262.
(4) \(|t| = 0.347 < 2.262\), so \(H_0\) is not rejected: the data are consistent with a population mean of 50.
The weights (kg) of 10 women are 54, 57, 59, 56, 52, 58, 60, 55, 57, 62. Test whether the average weight is below 55 kg, and find 95% and 99% confidence limits for the population mean.
| \(x\) | 54 | 57 | 59 | 56 | 52 | 58 | 60 | 55 | 57 | 62 | \(\sum x = 570\) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| \(x^2\) | 2916 | 3249 | 3481 | 3136 | 2704 | 3364 | 3600 | 3025 | 3249 | 3844 | \(\sum x^2 = 32568\) |
(1) \(H_0: \mu = 55\). (2) \(H_1: \mu < 55\). One-tailed (left): \(H_0\) is rejected only if \(t < -t_{0.05,9} = -1.833\).
(3)
\[ t = \frac{57 - 55}{2.7928/\sqrt 9} = \frac{2}{0.9309} = 2.148 \sim t_9 . \](4) The statistic is positive. A left-tailed test can reject only a large negative \(t\); \(t = +2.15\) is in the opposite tail, so \(H_0\) is not rejected: the data give no evidence that the average weight is below 55 kg. They could not: the sample mean, 57, is above 55. Comparing \(|t|\) with 1.833 and rejecting would ignore the direction of the alternative.
Confidence limits. An interval has two ends, so it uses the two-tailed points (§2). With \(s/\sqrt{n-1} = 0.9309\):
\[ \text{95\%:}\quad 57 \pm 2.262(0.9309) = 57 \pm 2.11 \;\Rightarrow\; (54.89,\; 59.11), \] \[ \text{99\%:}\quad 57 \pm 3.250(0.9309) = 57 \pm 3.03 \;\Rightarrow\; (53.97,\; 60.03). \]Using the one-tailed points (1.833 and 2.821) here would give 90% and 98% intervals, not 95% and 99%.
Two samples of sizes 12 and 9 have means 41 and 44. The population variances are 9.6 and 8.1. Is the difference of means significant?
(1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 \ne \mu_2\). Two-tailed.
(3) Both population variances are known, so Case 3 of §3 applies, small samples included:
\[ z = \frac{\bar x - \bar y}{\sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}}} = \frac{41 - 44}{\sqrt{\dfrac{9.6}{12} + \dfrac{8.1}{9}}} = \frac{-3}{\sqrt{0.8 + 0.9}} = \frac{-3}{1.3038} = -2.301 . \](4) \(|z| = 2.3 > 1.96\), so \(H_0\) is rejected: the population means differ.
Samples of sizes 11 and 14 have means 37 and 41.6. Test at the 1% level whether they can be regarded as coming from the same population with standard deviation 4.
(1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 \ne \mu_2\). Two-tailed.
(3) A common, known \(\sigma = 4\): Case 2 of §3.
\[ z = \frac{37 - 41.6}{4\sqrt{\dfrac{1}{11} + \dfrac{1}{14}}} = \frac{-4.6}{4(0.4029)} = -2.854 . \](4) At 1%, two-tailed, \(z_\alpha = 2.58\). \(|z| = 2.85 > 2.58\), so \(H_0\) is rejected: the samples are not from the same population.
Unit A: 11 workers, mean daily wage ₹2430, standard deviation ₹85. Unit B: 13 workers, mean ₹2350, standard deviation ₹92. Do the mean wages differ?
The population standard deviations are unknown, so the \(t\)-test (Case 1 of §3).
\[ \begin{gathered} S^2 = \frac{n_1 s_1^2 + n_2 s_2^2}{n_1 + n_2 - 2} = \frac{11(85)^2 + 13(92)^2}{22} = \frac{79475 + 110032}{22} = 8613.95, \\ S = 92.8114 . \end{gathered} \](1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 \ne \mu_2\). Two-tailed.
(3)
\[ t = \frac{2430 - 2350}{92.8114\sqrt{\dfrac{1}{11} + \dfrac{1}{13}}} = \frac{80}{92.8114(0.4097)} = 2.104 \sim t_{22} . \]The two-tailed 5% value for 22 d.f. is 2.074.
(4) \(|t| = 2.104 > 2.074\), so \(H_0\) is rejected: the mean wages differ significantly.
Make I: 9 tyres tested, mean life 42.0 thousand km, standard deviation 2.4. Make II: 8 tested, mean 36.5, standard deviation 2.9. Is make I better, at the 1% level?
The population standard deviations are unknown, so the \(t\)-test (Case 1 of §3).
\[ S^2 = \frac{n_1 s_1^2 + n_2 s_2^2}{n_1 + n_2 - 2} = \frac{9(2.4)^2 + 8(2.9)^2}{15} = \frac{51.84 + 67.28}{15} = 7.94, \qquad S = 2.818 . \](1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 > \mu_2\). One-tailed (right).
(3)
\[ t = \frac{42.0 - 36.5}{2.818\sqrt{\dfrac{1}{9} + \dfrac{1}{8}}} = \frac{5.5}{2.818(0.4859)} = 4.017 \sim t_{15} . \]The one-tailed 1% value for 15 d.f. is 2.602.
(4) \(t = 4.017 > 2.602\), so \(H_0\) is rejected: make I is better.
Two independent samples of sizes 8 and 7 gave the values below. Is the difference of means significant?
| \(x\) | 23 | 25 | 21 | 27 | 24 | 26 | 22 | 24 | \(\sum x = 192,\ \sum x^2 = 4636\) |
|---|---|---|---|---|---|---|---|---|---|
| \(y\) | 22 | 24 | 20 | 25 | 23 | 21 | 24 | \(\sum y = 159,\ \sum y^2 = 3631\) |
(1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 \ne \mu_2\). Two-tailed.
(3)
\[ t = \frac{24 - 22.7143}{1.9101\sqrt{\dfrac1{8} + \dfrac1{7}}} = \frac{1.2857}{0.9886} = 1.301 \sim t_{13} . \]The two-tailed 5% value for 13 d.f. is 2.16.
(4) \(|t| = 1.301 < 2.16\), so \(H_0\) is not rejected: the difference of means is not significant.
Heights (cm) of 6 hockey players and 10 footballers are given. Test at 5% whether hockey players are taller on average.
| \(x\) | 170 | 173 | 176 | 178 | 180 | 181 | \(\sum x = 1058,\ \sum x^2 = 186650\) | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| \(y\) | 168 | 170 | 172 | 174 | 176 | 177 | 178 | 179 | 181 | 183 | \(\sum y = 1758,\ \sum y^2 = 309264\) |
(1) \(H_0: \mu_1 = \mu_2\). (2) \(H_1: \mu_1 > \mu_2\). One-tailed (right).
(3)
\[ t = \frac{176.3333 - 175.8}{4.6054\sqrt{\dfrac1{6} + \dfrac1{10}}} = \frac{0.5333}{2.3782} = 0.224 \sim t_{14} . \]The one-tailed 5% value for 14 d.f. is 1.761.
(4) \(t = 0.224 < 1.761\), so \(H_0\) is not rejected: the data do not show that hockey players are taller on average.
Ten clerks took a speed-reading course. Their reading speeds (words per minute) before (\(x\)) and after (\(y\)) are below. Has the course increased reading speed?
| Before \(x\) | 210 | 198 | 225 | 240 | 205 | 215 | 230 | 220 | 200 | 212 |
|---|---|---|---|---|---|---|---|---|---|---|
| After \(y\) | 218 | 205 | 224 | 252 | 210 | 222 | 233 | 231 | 204 | 215 |
| \(d = x - y\) | −8 | −7 | 1 | −12 | −5 | −7 | −3 | −11 | −4 | −3 |
The same subjects are measured twice, so the samples are paired.
\[ \sum d = −59, \qquad \sum d^2 = 487, \qquad \bar d = \frac{-59}{10} = -5.9, \] \[ s^2 = \frac{487}{10} - \bar d^2 = 48.7 - 34.81 = 13.89, \qquad s = 3.7269 . \](1) \(H_0: \mu_1 = \mu_2\): the course does not change speed. (2) \(H_1: \mu_1 < \mu_2\): speed is higher after. With \(d = x - y\), that means \(\mu_d < 0\): one-tailed, left.
(3)
\[ t = \frac{\bar d}{s/\sqrt{n-1}} = \frac{-5.9}{3.7269/\sqrt{9}} = \frac{-5.9}{1.2423} = -4.749 \sim t_{9} . \](4) The left-tailed point is \(-1.833\); \(t = -4.749\) is below it, so \(H_0\) is rejected: reading speed has increased after the course.
A dose of caffeine given to 12 volunteers changed their resting pulse (beats per minute) by 4, 1, 7, −2, 3, 0, 5, 2, 6, −1, 3, 5. Does caffeine in general raise the pulse?
\[ \sum d = 33, \qquad \sum d^2 = 179, \qquad \bar d = \frac{33}{12} = 2.75, \] \[ s^2 = \frac{179}{12} - \bar d^2 = 14.9167 - 7.5625 = 7.3542, \qquad s = 2.7119 . \]The data are already differences: \(d\) = after − before.
(1) \(H_0\): \(\mu_d = 0\). (2) \(H_1\): \(\mu_d > 0\). One-tailed (right).
(3)
\[ t = \frac{\bar d}{s/\sqrt{n-1}} = \frac{2.75}{2.7119/\sqrt{11}} = \frac{2.75}{0.8177} = 3.363 \sim t_{11} . \](4) \(t = 3.363 > 1.796\), so \(H_0\) is rejected: caffeine raises the pulse.
Marks of 11 students before (\(x\)) and after (\(y\)) a month of extra classes are below. Did the students benefit?
| Before \(x\) | 22 | 26 | 19 | 27 | 20 | 21 | 23 | 21 | 24 | 22 | 23 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| After \(y\) | 20 | 27 | 23 | 27 | 22 | 25 | 23 | 22 | 21 | 25 | 22 |
| \(d = x - y\) | 2 | −1 | −4 | 0 | −2 | −4 | 0 | −1 | 3 | −3 | 1 |
The same subjects are measured twice, so the samples are paired.
\[ \sum d = −9, \qquad \sum d^2 = 61, \qquad \bar d = \frac{-9}{11} = -0.8182, \] \[ s^2 = \frac{61}{11} - \bar d^2 = 5.5455 - 0.6694 = 4.876, \qquad s = 2.2082 . \](1) \(H_0: \mu_1 = \mu_2\): no benefit. (2) \(H_1: \mu_1 < \mu_2\): marks are higher after (\(\mu_d < 0\)). One-tailed (left).
(3)
\[ t = \frac{\bar d}{s/\sqrt{n-1}} = \frac{-0.8182}{2.2082/\sqrt{10}} = \frac{-0.8182}{0.6983} = -1.172 \sim t_{10} . \](4) The left-tailed point is \(-1.812\); \(t = -1.172\) is not below it, so \(H_0\) is not rejected: the data do not show that the classes raised marks. Not rejecting \(H_0\) means no significant benefit was shown; it does not show the classes were useless either.
Two fertilisers A and B were tried on 8 plots each; the yields (kg) were:
| A \(x\) | 38 | 42 | 40 | 41 | 36 | 39 | 41 | 42 | \(\sum x = 319,\ \sum x^2 = 12751\) |
|---|---|---|---|---|---|---|---|---|---|
| B \(y\) | 41 | 44 | 41 | 43 | 39 | 42 | 43 | 43 | \(\sum y = 336,\ \sum y^2 = 14130\) |
Is B better than A (i) if the two sets of plots are independent, (ii) if each column is one plot split in two halves, one half for each fertiliser?
In both parts \(H_0: \mu_1 = \mu_2\) and \(H_1: \mu_1 < \mu_2\) (B gives more). One-tailed (left).
(i) Independent samples.
\[ \bar x = 39.875, \quad \bar y = 42, \quad s_1^2 = 3.8594, \quad s_2^2 = 2.25 , \] \[ S^2 = \frac{8(3.8594) + 8(2.25)}{14} = 3.4911, \qquad S = 1.8684 , \] \[ t = \frac{39.875 - 42}{1.8684\sqrt{\tfrac18 + \tfrac18}} = \frac{-2.125}{0.9342} = -2.275 \sim t_{14} . \]The left-tailed 5% point for 14 d.f. is \(-1.761\); \(t = -2.275\) is below it, so \(H_0\) is rejected: B is better.
(ii) Split plots. Now each plot gives a pair, so the paired test applies, with \(d = x - y\): −3, −2, −1, −2, −3, −3, −2, −1.
\[ \begin{gathered} \sum d = −17, \quad \sum d^2 = 41, \quad \bar d = -2.125, \quad s = 0.7806, \\ t = \frac{-2.125}{0.7806/\sqrt 7} = \frac{-2.125}{0.295} = -7.202 \sim t_7 . \end{gathered} \]The left-tailed 5% point for 7 d.f. is \(-1.895\); \(t = -7.202\) is far below it, so \(H_0\) is rejected: B is better.
Why (ii) is so much stronger. The mean difference is -2.125 both times, but pairing removes the plot-to-plot variation from the standard error, which falls from 0.934 to 0.295. The same difference, measured against far less noise, gives a much larger \(t\).
The correlation between rainfall and wheat yield over 22 districts is 0.21. Is it significant?
(1) \(H_0: \rho = 0\). (2) \(H_1: \rho \ne 0\). Two-tailed.
(3) By the t-test for a correlation coefficient,
\[ t = \frac{r\sqrt{n-2}}{\sqrt{1 - r^2}} = \frac{0.21\sqrt{20}}{\sqrt{1 - 0.0441}} = \frac{0.9391}{0.9777} = 0.961 \sim t_{20} . \]The two-tailed 5% value for 20 d.f. is 2.086.
(4) \(|t| = 0.961 < 2.086\), so \(H_0\) is not rejected: no correlation is shown in the population, as far as this sample can tell.
A sample of 30 pairs from a bivariate normal population gives \(r = 0.5\). Is it significant?
(1) \(H_0: \rho = 0\). (2) \(H_1: \rho \ne 0\). Two-tailed.
(3) By the t-test for a correlation coefficient,
\[ t = \frac{r\sqrt{n-2}}{\sqrt{1 - r^2}} = \frac{0.5\sqrt{28}}{\sqrt{1 - 0.25}} = \frac{2.6458}{0.866} = 3.055 \sim t_{28} . \]The two-tailed 5% value for 28 d.f. is 2.048.
(4) \(|t| = 3.055 > 2.048\), so \(H_0\) is rejected: the variables are correlated.
A bivariate sample of 250 from a normal population gives \(r = 0.35\). (i) Is it significant? (ii) Find 95% and 99% confidence limits for \(\rho\).
(1) \(H_0: \rho = 0\). (2) \(H_1: \rho \ne 0\). Two-tailed.
(3) By the t-test for a correlation coefficient,
\[ t = \frac{r\sqrt{n-2}}{\sqrt{1 - r^2}} = \frac{0.35\sqrt{248}}{\sqrt{1 - 0.1225}} = \frac{5.5118}{0.9367} = 5.884 \sim t_{248} . \]The two-tailed 5% value for 248 d.f. is 1.97.
(4) \(|t| = 5.884 > 1.97\), so \(H_0\) is rejected: the variables are correlated.
For 248 d.f. the \(t\) curve is almost the normal one: \(t_{0.025,248} = 1.97\), against the normal 1.96.
(ii) For a large sample, \(r\) has standard error approximately \((1 - r^2)/\sqrt n = 0.8775/\sqrt{250} = 0.0555\), so
\[ \text{95\%:}\quad 0.35 \pm 1.96(0.0555) \;\Rightarrow\; (0.2412,\; 0.4588), \] \[ \text{99\%:}\quad 0.35 \pm 2.58(0.0555) \;\Rightarrow\; (0.2068,\; 0.4932). \]A refinement. Away from \(\rho = 0\) the distribution of \(r\) is skewed, and Fisher's \(Z\) (Unit 3) is the more accurate route: \(Z = \tfrac12\ln\dfrac{1.35}{0.65} = 0.3654\), with standard error \(1/\sqrt{247} = 0.0636\), gives \(0.3654 \pm 1.96(0.0636) = (0.2407,\; 0.4902)\) on the \(Z\) scale, and transforming back with \(\tanh\), the 95% interval \((0.2362,\; 0.4543)\). It is not centred on \(r\); it leans towards zero, as the skewness requires.
250 digits read from a random number table gave these frequencies. Are the digits equally frequent?
| Digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| \(O_i\) | 22 | 27 | 25 | 28 | 20 | 26 | 24 | 29 | 23 | 26 |
| \(E_i\) | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 |
| \((O_i - E_i)^2/E_i\) | 0.36 | 0.16 | 0 | 0.36 | 1 | 0.04 | 0.04 | 0.64 | 0.16 | 0.04 |
(1) \(H_0\): the distribution is uniform, so each \(E_i = 250/10 = 25\). (2) \(H_1\): it is not.
(3)
\[ \chi^2 = \sum\frac{(O_i - E_i)^2}{E_i} = \frac{9 + 4 + 0 + 9 + 25 + 1 + 1 + 16 + 4 + 1}{25} = 2.8 \sim \chi^2_{9} . \](4) \(\chi^2 = 2.8 < \chi^2_{0.05,9} = 16.92\), so \(H_0\) is not rejected: the data are consistent with a uniform distribution.
Of 640 pea plants, the four classes A, B, C, D contained 352, 126, 118 and 44. Theory predicts the ratio 9 : 3 : 3 : 1. Do the data support it?
Expected frequencies: \(640 \times \tfrac{9}{16} = 360\), \(640 \times \tfrac{3}{16} = 120\), 120, \(640 \times \tfrac{1}{16} = 40\).
| Class | \(O_i\) | \(E_i\) | \(O_i - E_i\) | \((O_i - E_i)^2/E_i\) |
|---|---|---|---|---|
| A | 352 | 360 | −8 | 0.1778 |
| B | 126 | 120 | 6 | 0.3 |
| C | 118 | 120 | −2 | 0.0333 |
| D | 44 | 40 | 4 | 0.4 |
| Total | 640 | 640 | 0 | 0.9111 |
(1) \(H_0\): the data follow 9 : 3 : 3 : 1. (2) \(H_1\): they do not.
(3) \(\chi^2 = 0.9111 \sim \chi^2_3\) (4 classes, nothing estimated).
(4) \(0.911 < \chi^2_{0.05,3} = 7.81\), so \(H_0\) is not rejected: the data support the 9 : 3 : 3 : 1 ratio.
105 road accidents in a district were spread over the week as below. Are accidents uniformly distributed over the days?
| Day | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|---|
| \(O_i\) | 18 | 13 | 16 | 12 | 17 | 10 | 19 |
| \(E_i\) | 15 | 15 | 15 | 15 | 15 | 15 | 15 |
| \((O_i - E_i)^2/E_i\) | 0.6 | 0.2667 | 0.0667 | 0.6 | 0.2667 | 1.6667 | 1.0667 |
(1) \(H_0\): the distribution is uniform, so each \(E_i = 105/7 = 15\). (2) \(H_1\): it is not.
(3)
\[ \chi^2 = \sum\frac{(O_i - E_i)^2}{E_i} = \frac{9 + 4 + 1 + 9 + 4 + 25 + 16}{15} = 4.5333 \sim \chi^2_{6} . \](4) \(\chi^2 = 4.53 < \chi^2_{0.05,6} = 12.59\), so \(H_0\) is not rejected: the data are consistent with a uniform distribution.
Fit a binomial distribution (\(n = 6\)) to the data below and test the goodness of fit.
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| \(f\) | 4 | 20 | 30 | 26 | 12 | 5 | 3 |
Fitting. \(N = \sum f = 100\) and \(\sum fx = 249\), so \(\bar x = 2.49\). For a binomial with \(n = 6\), the mean is \(np\), so \(p = 2.49/6 = 0.415\) and \(q = 0.585\). Then \(P(x) = \binom{6}{x}(0.415)^x(0.585)^{6-x}\) and \(E = 100\,P(x)\):
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| \(P(x)\) | 0.0401 | 0.1706 | 0.3026 | 0.2862 | 0.1523 | 0.0432 | 0.0051 |
| \(E\) | 4.01 | 17.06 | 30.26 | 28.62 | 15.23 | 4.32 | 0.51 |
Pooling. Expected frequencies below 5 are merged with their neighbours: classes 0 to 1 are merged; classes 4 to 6 are merged. 4 classes remain:
| Class | \(O\) | \(E\) | \(O - E\) | \((O - E)^2/E\) |
|---|---|---|---|---|
| 0–1 | 24 | 21.07 | 2.93 | 0.408 |
| 2 | 30 | 30.26 | −0.26 | 0.0022 |
| 3 | 26 | 28.62 | −2.62 | 0.2395 |
| 4–6 | 20 | 20.06 | −0.06 | 0.0002 |
| Total | 100 | 100 | 0 | 0.6499 |
(1) \(H_0\): the binomial is a good fit. (2) \(H_1\): it is not.
(3) \(\chi^2 = 0.6499\). Degrees of freedom, by §5: 4 classes after pooling, less 1 for the total, less 1 for the estimated \(p\): \(4 - 1 - 1 = 2\).
(4) \(\chi^2 = 0.65 < \chi^2_{0.05,2} = 5.99\), so \(H_0\) is not rejected: the binomial fits well.
Five coins were tossed 256 times and the number of heads recorded. Are the coins fair?
| Heads | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Frequency \(O\) | 11 | 36 | 86 | 73 | 42 | 8 |
| \(E = 256\binom5x/32\) | 8 | 40 | 80 | 80 | 40 | 8 |
| \((O - E)^2/E\) | 1.125 | 0.4 | 0.45 | 0.6125 | 0.1 | 0 |
(1) \(H_0\): the coins are fair, \(p = q = \tfrac12\), so \(P(x) = \binom5x/32\). (2) \(H_1\): they are not.
(3) \(\chi^2 = 1.125 + 0.4 + 0.45 + 0.6125 + 0.1 + 0 = 2.6875\). Here \(p\) is given by the hypothesis, not estimated, and every \(E \ge 5\), so d.f. \(= 6 - 1 = 5\).
(4) \(2.688 < \chi^2_{0.05,5} = 11.07\), so \(H_0\) is not rejected: the coins may be taken as fair.
Fit a Poisson distribution to the data below and test the goodness of fit.
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| \(f\) | 120 | 108 | 51 | 16 | 4 | 1 |
Fitting. \(N = 300\), \(\sum fx = 279\), so \(\bar x = 0.93\), and the Poisson mean is estimated by \(\lambda = 0.93\). \(P(x) = e^{-0.93}0.93^x/x!\), with the last class taken as “5 or more” so that the probabilities add to 1; \(E = 300\,P(x)\):
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| \(P(x)\) | 0.3946 | 0.3669 | 0.1706 | 0.0529 | 0.0123 | 0.0027 |
| \(E\) | 118.37 | 110.08 | 51.19 | 15.87 | 3.69 | 0.81 |
Pooling. Expected frequencies below 5 are merged with their neighbours: classes 3 to 5 are merged. 4 classes remain:
| Class | \(O\) | \(E\) | \(O - E\) | \((O - E)^2/E\) |
|---|---|---|---|---|
| 0 | 120 | 118.37 | 1.63 | 0.0226 |
| 1 | 108 | 110.08 | −2.08 | 0.0393 |
| 2 | 51 | 51.19 | −0.19 | 0.0007 |
| 3–5 | 21 | 20.37 | 0.63 | 0.0197 |
| Total | 300 | 300 | 0 | 0.0823 |
(1) \(H_0\): the Poisson is a good fit. (2) \(H_1\): it is not.
(3) \(\chi^2 = 0.0823\). Degrees of freedom, by §5: 4 classes after pooling, less 1 for the total, less 1 for the estimated \(\lambda\): \(4 - 1 - 1 = 2\).
(4) \(\chi^2 = 0.082 < \chi^2_{0.05,2} = 5.99\), so \(H_0\) is not rejected: the Poisson fits well.
For the \(2 \times 2\) contingency table with cells \(a, b\) / \(c, d\) and \(N = a + b + c + d\), prove that \(\chi^2 = \dfrac{N(ad - bc)^2}{(a+b)(c+d)(a+c)(b+d)}\).
This is proved step by step in §6. In outline: each expected frequency is (row total)(column total)/\(N\); every one of the four deviations \(O - E\) works out to \(\pm(ad - bc)/N\), so \(\chi^2\) is \((ad - bc)^2/N^2\) times the sum of the four reciprocals \(1/E\); and that sum simplifies, because \((a+c) + (b+d) = N\) and \((a+b) + (c+d) = N\), to \(N^3/[(a+b)(c+d)(a+c)(b+d)]\). Multiplying gives the formula.
Two treatments were applied to 600 plots, and each plot was classified by both. Are the treatments independent?
| B₁ | B₂ | Total | |
|---|---|---|---|
| A₁ | 240 (\(a\)) | 110 (\(b\)) | 350 |
| A₂ | 60 (\(c\)) | 190 (\(d\)) | 250 |
| Total | 300 | 300 | 600 |
(1) \(H_0\): the two attributes are independent. (2) \(H_1\): they are not.
(3) By the \(2 \times 2\) formula,
\[ \chi^2 = \frac{600(240 \times 190 - 110 \times 60)^2}{350 \times 250 \times 300 \times 300} = \frac{600(39000)^2}{7875000000} = 115.886 \sim \chi^2_1 . \](4) \(115.89 > \chi^2_{0.05,1} = 3.84\), so \(H_0\) is rejected: the two treatments are associated.
Polls of 1200 voters each in towns and villages gave the votes for two candidates below. Is the kind of area related to the vote?
| P | Q | Total | |
|---|---|---|---|
| Town | 690 (\(a\)) | 510 (\(b\)) | 1200 |
| Village | 610 (\(c\)) | 590 (\(d\)) | 1200 |
| Total | 1300 | 1100 | 2400 |
(1) \(H_0\): the two attributes are independent. (2) \(H_1\): they are not.
(3) By the \(2 \times 2\) formula,
\[ \chi^2 = \frac{2400(690 \times 590 - 510 \times 610)^2}{1200 \times 1200 \times 1300 \times 1100} = \frac{2400(96000)^2}{2059200000000} = 10.741 \sim \chi^2_1 . \](4) \(10.74 > \chi^2_{0.05,1} = 3.84\), so \(H_0\) is rejected: the kind of area is related to the vote.
1000 students are classified by fitness level and by exam grade below. Test at the 1% level whether the two are independent.
| Grade A | Grade B | Grade C | Total | |
|---|---|---|---|---|
| Fit | 45 | 30 | 15 | 90 |
| Average | 250 | 260 | 190 | 700 |
| Unfit | 35 | 85 | 90 | 210 |
| Total | 330 | 375 | 295 | 1000 |
(1) \(H_0\): the two classifications are independent. (2) \(H_1\): they are not.
(3) Expected frequencies \(E_{ij} = (A_i)(B_j)/N\): for example \(E_{11} = 90 \times 330/1000 = 29.7\).
| \(O_{ij}\) | 45 | 30 | 15 | 250 | 260 | 190 | 35 | 85 | 90 |
|---|---|---|---|---|---|---|---|---|---|
| \(E_{ij}\) | 29.7 | 33.75 | 26.55 | 231 | 262.5 | 206.5 | 69.3 | 78.75 | 61.95 |
| \(O - E\) | 15.3 | −3.75 | −11.55 | 19 | −2.5 | −16.5 | −34.3 | 6.25 | 28.05 |
| \((O - E)^2/E\) | 7.8818 | 0.4167 | 5.0246 | 1.5628 | 0.0238 | 1.3184 | 16.9768 | 0.496 | 12.7006 |
(4) \(46.401 > \chi^2_{0.01,4} = 13.28\), so \(H_0\) is rejected: fitness and exam grade are related. Most of the statistic comes from the first and last rows, where grade A is more common than expected among fit students and grade C more common among unfit ones.
Two survey teams classified the households they visited by monthly spending. Do the teams' classifications differ significantly?
| Low | Middle | High | Very high | Total | |
|---|---|---|---|---|---|
| Team I | 83 | 62 | 46 | 9 | 200 |
| Team II | 41 | 32 | 24 | 3 | 100 |
| Total | 124 | 94 | 70 | 12 | 300 |
(1) \(H_0\): the two classifications are independent. (2) \(H_1\): they are not.
(3) Expected frequencies \(E_{ij} = (\text{row total})(\text{column total})/N\): row Team I 82.67, 62.67, 46.67, 8; row Team II 41.33, 31.33, 23.33, 4. The smallest, 4, is below 5, so cells must be pooled. In a contingency table the pooling has to keep the table rectangular, so the “High” and “Very high” columns are merged in every row:
| Low | Middle | High or Very high | |
|---|---|---|---|
| Team I: \(O\) (\(E\)) | 83 (82.67) | 62 (62.67) | 55 (54.67) |
| Team II: \(O\) (\(E\)) | 41 (41.33) | 32 (31.33) | 27 (27.33) |
(4) \(0.031 < \chi^2_{0.05,2} = 5.99\), so \(H_0\) is not rejected: the two teams' classifications do not differ significantly.
Pooling only the small cell's own row would leave a table that is no longer a contingency table, so its degrees of freedom would not be \((r-1)(s-1)\) of anything; merging whole columns is the regular procedure.
Two samples of sizes 11 and 9 from normal populations have standard deviations 3.1 and 2.5. Do the population variances differ?
\[ S_1^2 = \frac{n_1 s_1^2}{n_1 - 1} = \frac{11(3.1)^2}{10} = 10.571, \qquad S_2^2 = \frac{9(2.5)^2}{8} = 7.0312 . \](1) \(H_0: \sigma_1^2 = \sigma_2^2\). (2) \(H_1: \sigma_1^2 \ne \sigma_2^2\).
(3) The larger estimate goes on top (§8), and the degrees of freedom follow it:
\[ F = \frac{S_1^2}{S_2^2} = \frac{10.571}{7.0312} = 1.503 \sim F_{(10,\,8)} . \](4) \(1.503 < F_{0.05}(10, 8) = 3.35\), so \(H_0\) is not rejected: the population variances do not differ significantly.
Strictly, with a two-sided \(H_1\) at 5% the upper 2.5% point, \(F_{0.025}(10, 8) = 4.3\), is the comparison; \(F = 1.5\) is below both.
A sample of 9 has sum of squares of deviations from its mean 96.8; another of 11 has 88.0. Is the difference between the variances significant at 1%?
Since \(n s^2 = \sum(x - \bar x)^2\), the unbiased estimate is the sum of squares over \(n - 1\):
\[ S_1^2 = \frac{96.8}{8} = 12.1, \qquad S_2^2 = \frac{88.0}{10} = 8.8 . \](1) \(H_0: \sigma_1^2 = \sigma_2^2\). (2) \(H_1: \sigma_1^2 \ne \sigma_2^2\).
(3) The larger estimate goes on top (§8), and the degrees of freedom follow it:
\[ F = \frac{S_1^2}{S_2^2} = \frac{12.1}{8.8} = 1.375 \sim F_{(8,\,10)} . \](4) \(1.375 < F_{0.01}(8, 10) = 5.06\), so \(H_0\) is not rejected: the difference between the variances is not significant.
Two samples of sizes 9 and 11 are given. Test the equality of the population variances.
| \(x\) | 14 | 9 | 18 | 20 | 15 | 12 | 10 | 17 | 11 | \(\sum x = 126,\ \sum x^2 = 1880\) | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| \(y\) | 9 | 16 | 25 | 18 | 14 | 20 | 22 | 11 | 26 | 24 | 13 | \(\sum y = 198,\ \sum y^2 = 3908\) |
(1) \(H_0: \sigma_1^2 = \sigma_2^2\). (2) \(H_1: \sigma_1^2 \ne \sigma_2^2\).
(3) The larger estimate goes on top (§8), and the degrees of freedom follow it:
\[ F = \frac{S_2^2}{S_1^2} = \frac{34.4}{14.5} = 2.372 \sim F_{(10,\,8)} . \](4) \(2.372 < F_{0.05}(10, 8) = 3.35\), so \(H_0\) is not rejected: the population variances may be regarded as equal.
Two samples of sizes 12 and 16 give unbiased estimates of the population variances, 6 and 11. Can the population variances be regarded as equal?
Unbiased estimates are the \(S^2\) themselves: \(S_1^2 = 6\) (11 d.f.), \(S_2^2 = 11\) (15 d.f.). Nothing is converted; treating them as \(s^2\) and multiplying by \(n/(n-1)\) would inflate both.
(1) \(H_0: \sigma_1^2 = \sigma_2^2\). (2) \(H_1: \sigma_1^2 \ne \sigma_2^2\).
(3) The larger estimate goes on top (§8), and the degrees of freedom follow it:
\[ F = \frac{S_2^2}{S_1^2} = \frac{11}{6} = 1.833 \sim F_{(15,\,11)} . \](4) \(1.833 < F_{0.05}(15, 11) = 2.72\), so \(H_0\) is not rejected: the population variances may be regarded as equal.
Sample I: size 11, mean 22, sum of squares of deviations from the mean 120. Sample II: size 13, mean 20.5, sum of squares 150. Can the samples be regarded as drawn from the same normal population, at 5%?
“The same normal population” means the same variance and the same mean, so two tests are needed, the F-test first, because the \(t\)-test for means assumes equal variances (§3).
I. F-test. \(H_0: \sigma_1^2 = \sigma_2^2\) against \(H_1: \sigma_1^2 \ne \sigma_2^2\).
\[ S_1^2 = \frac{120}{10} = 12, \qquad S_2^2 = \frac{150}{12} = 12.5, \qquad F = 1.042 \sim F_{(12,\,10)} . \]\(1.042 < F_{0.05}(12, 10) = 2.91\): \(H_0\) is not rejected; the variances may be taken as equal.
II. t-test. \(H_0: \mu_1 = \mu_2\) against \(H_1: \mu_1 \ne \mu_2\). Since \(n_1 s_1^2 = \sum(x - \bar x)^2 = 120\) and \(n_2 s_2^2 = 150\),
\[ \begin{gathered} S = \sqrt{\frac{120 + 150}{11 + 13 - 2}} = 3.5032, \\ t = \frac{22 - 20.5}{3.5032\sqrt{\dfrac1{11} + \dfrac1{13}}} = \frac{1.5}{1.4352} = 1.045 \sim t_{22} . \end{gathered} \]\(|t| = 1.045 < t_{0.025,22} = 2.074\): \(H_0\) is not rejected; the means may be taken as equal.
Conclusion. Both hypotheses stand, so the two samples may be regarded as drawn from the same normal population.
Where this goes next. Small samples cost you the CLT, but every test in this unit still assumed the parent population was normal. Unit 5 asks what is left when even that is unavailable — ordinal data, an obviously skewed sample, an outlier you cannot justify removing. Replacing the observations by their ranks buys a test valid for any continuous distribution; the price is a little power in the case where the data really was normal after all.