Skip to the content
How to use this manual: In the lab, copy the blank working table at the start of each experiment's Calculation and fill in the test statistic, critical value and decision yourself. The Calculation section then shows the completed working. Per the syllabus, every conclusion is stated from both the critical-value and the p-value approach.

List of Practical Experiments (Official Syllabus)

  1. Large sample test for mean and difference of means.
  2. Large sample test for proportion and difference of proportions.
  3. Large sample test for SD and difference of SDs.
  4. Large sample test for correlation coefficient.
  5. Small sample test for mean and difference of means.
  6. Small sample test for correlation coefficient.
  7. Paired t-test (paired samples).
  8. Small sample test for single variance (χ² test) and difference of variances (F test).
  9. χ² test for goodness of fit and independence of attributes.
  10. Non-parametric tests for single sample (run test, sign test, Wilcoxon signed-rank).
  11. Non-parametric tests for related samples (sign test, Wilcoxon signed-rank).
  12. Non-parametric tests for two independent samples (Median, Mann–Whitney U, Wald–Wolfowitz).

Experiment 1 — Large-Sample Test for Mean & Difference of Means

1. Problem

(a) A sample of 100 students has average IQ 105 with \(\sigma = 15\). Test \(H_0: \mu = 100\) at 5 %.
(b) City A: \(n_1 = 200,\ \bar X_1 = 28,\ \sigma_1 = 4\); City B: \(n_2 = 250,\ \bar X_2 = 26,\ \sigma_2 = 5\). Test \(H_0: \mu_1 = \mu_2\).

2. Aim

To apply the large-sample (Z) test to a single mean and to the difference of two means.

3. Formula

\[ Z = \frac{\bar X - \mu_0}{\sigma/\sqrt{n}}, \qquad Z = \frac{\bar X_1 - \bar X_2}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}} \]

Applying it:

  1. State \(H_0, H_1\); the statistic follows the standard normal for large \(n\).
  2. Compute \(Z\); compare \(|Z|\) with 1.96 (two-tailed, 5 %) and find the p-value \(= 2[1 - \Phi(|Z|)]\).

4. Calculation

Blank working table:

PartZCritical (±1.96)p-valueDecision
(a)
(b)

(a) \(Z = (105 - 100)/(15/\sqrt{100}) = 5/1.5 = 3.33\); p \(= 2[1 - \Phi(3.33)] = 0.00087\).

(b) \(Z = (28 - 26)/\sqrt{16/200 + 25/250} = 2/\sqrt{0.18} = 4.71\); p \(< 0.0001\).

5. Result

(a) \(|Z| = 3.33 > 1.96\) and p \(= 0.00087 < 0.05\) ⇒ reject \(H_0\); the mean IQ differs from 100. (b) \(|Z| = 4.71 > 1.96\), p \(< 0.0001\) ⇒ reject \(H_0\); the city means differ.

Experiment 2 — Large-Sample Test for Proportion(s)

1. Problem

(a) 120 of 200 voters favour candidate A. Test \(H_0: p = 0.5\).
(b) Factory 1: 60 defective in 500; Factory 2: 40 in 400. Test \(H_0: p_1 = p_2\).

2. Aim

To apply the large-sample Z-test to a single proportion and to the difference of two proportions.

3. Formula

\[ Z = \frac{\hat p - p_0}{\sqrt{p_0(1-p_0)/n}}, \qquad Z = \frac{\hat p_1 - \hat p_2}{\sqrt{\hat p(1-\hat p)(1/n_1 + 1/n_2)}} \]

Applying it:

  1. Single proportion: use \(p_0\) in the standard error.
  2. Two proportions: pool the estimate \(\hat p = (x_1 + x_2)/(n_1 + n_2)\) for the standard error.

4. Calculation

Blank working table:

PartZCritical (±1.96)p-valueDecision
(a)
(b)

(a) \(\hat p = 120/200 = 0.6\); \(Z = (0.6 - 0.5)/\sqrt{0.5\cdot 0.5/200} = 0.1/0.03536 = 2.83\); p \(= 0.0047\).

(b) \(\hat p_1 = 0.12,\ \hat p_2 = 0.10\); pooled \(\hat p = 100/900 = 0.111\); \(Z = (0.12 - 0.10)/\sqrt{0.111\cdot 0.889(1/500 + 1/400)} = 0.02/0.0212 = 0.94\); p \(= 0.34\).

5. Result

(a) \(|Z| = 2.83 > 1.96\), p \(= 0.0047 < 0.05\) ⇒ reject \(H_0\); A is favoured by more than half. (b) \(|Z| = 0.94 < 1.96\), p \(= 0.34 > 0.05\) ⇒ accept \(H_0\); the defective rates are equal.

Experiment 3 — Large-Sample Test for SD(s)

1. Problem

(a) A sample of 100 has \(s = 14.2\). Test \(H_0: \sigma = 15\).
(b) \(n_1 = 144,\ s_1 = 8\); \(n_2 = 100,\ s_2 = 6\). Test \(H_0: \sigma_1 = \sigma_2\).

2. Aim

To apply the large-sample Z-test to a single standard deviation and to the difference of two SDs.

3. Formula

\[ Z = \frac{s - \sigma_0}{\sigma_0/\sqrt{2n}}, \qquad Z = \frac{s_1 - s_2}{\sqrt{s_1^2/2n_1 + s_2^2/2n_2}} \]

Applying it:

  1. For large \(n\), the sample SD is approximately normal with SE \(= \sigma/\sqrt{2n}\).
  2. Compute \(Z\); compare with ±1.96 and find the p-value.

4. Calculation

Blank working table:

PartZCritical (±1.96)p-valueDecision
(a)
(b)

(a) \(Z = (14.2 - 15)/(15/\sqrt{200}) = -0.8/1.061 = -0.75\); p \(= 0.45\).

(b) \(Z = (8 - 6)/\sqrt{64/288 + 36/200} = 2/\sqrt{0.402} = 3.15\); p \(= 0.0016\).

5. Result

(a) \(|Z| = 0.75 < 1.96\), p \(= 0.45 > 0.05\) ⇒ accept \(H_0\). (b) \(|Z| = 3.15 > 1.96\), p \(= 0.0016 < 0.05\) ⇒ reject \(H_0\); the SDs differ.

Experiment 4 — Large-Sample Test for the Correlation Coefficient

1. Problem

(a) \(r = 0.6,\ n = 50\). Test \(H_0: \rho = 0\).
(b) \(r = 0.7,\ n = 28\). Test \(H_0: \rho = 0.5\) using Fisher's Z-transformation.

2. Aim

To test a sample correlation coefficient against \(\rho = 0\) (t-test) and against a specified \(\rho_0\) (Fisher's Z).

3. Formula

\[ t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}}, \qquad Z' = \tfrac12\ln\frac{1+r}{1-r}, \qquad Z = (Z' - \zeta_0)\sqrt{n-3} \]

Applying it:

  1. For \(H_0: \rho = 0\), use the t-statistic with \(n - 2\) df.
  2. For \(H_0: \rho = \rho_0 \ne 0\), transform both \(r\) and \(\rho_0\) by Fisher's Z and use the normal test.

4. Calculation

Blank working table:

PartStatisticCriticalDecision
(a)
(b)

(a) \(t = 0.6\sqrt{48}/\sqrt{1 - 0.36} = 4.16/0.8 = 5.20\); df \(= 48\), \(t_{0.025} \approx 2.01\).

(b) \(Z' = \tfrac12\ln(1.7/0.3) = 0.867\), \(\zeta_0 = \tfrac12\ln(1.5/0.5) = 0.549\); \(Z = (0.867 - 0.549)\sqrt{25} = 1.59\).

5. Result

(a) \(t = 5.20 > 2.01\) (p \(< 0.001\)) ⇒ reject \(H_0\); the correlation is significant. (b) \(|Z| = 1.59 < 1.96\) (p \(= 0.11\)) ⇒ accept \(H_0\); \(\rho\) is not significantly different from 0.5.

Experiment 5 — Small-Sample Test for Mean & Difference of Means

1. Problem

(a) A sample of 9 has \(\bar X = 47.5,\ s = 4\). Test \(H_0: \mu = 50\).
(b) \(n_1 = 10,\ \bar X_1 = 22,\ s_1 = 3\); \(n_2 = 12,\ \bar X_2 = 19,\ s_2 = 2.5\). Test \(H_0: \mu_1 = \mu_2\).

2. Aim

To apply the Student's t-test to a single mean and to the difference of two means (small samples).

3. Formula

\[ t = \frac{\bar X - \mu_0}{s/\sqrt{n}}, \qquad t = \frac{\bar X_1 - \bar X_2}{s_p\sqrt{1/n_1 + 1/n_2}}, \quad s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2} \]

Applying it:

  1. Single mean: t with \(n - 1\) df.
  2. Difference: pool the variances; t with \(n_1 + n_2 - 2\) df.

4. Calculation

Blank working table:

ParttdfCritical \(t_{0.025}\)Decision
(a)
(b)

(a) \(t = (47.5 - 50)/(4/3) = -1.875\); df \(= 8\), \(t_{0.025} = 2.306\).

(b) \(s_p^2 = (9\cdot 9 + 11\cdot 6.25)/20 = 7.49,\ s_p = 2.74\); \(t = 3/(2.74\sqrt{1/10 + 1/12}) = 3/1.171 = 2.56\); df \(= 20\), \(t_{0.025} = 2.086\).

5. Result

(a) \(|t| = 1.875 < 2.306\) (p \(> 0.05\)) ⇒ accept \(H_0\). (b) \(|t| = 2.56 > 2.086\) (p \(< 0.05\)) ⇒ reject \(H_0\); the means differ.

Experiment 6 — Small-Sample Test for the Correlation Coefficient

1. Problem

For 18 pairs, \(r = 0.55\). Test \(H_0: \rho = 0\).

2. Aim

To test the significance of a correlation coefficient from a small sample using the t-test.

3. Formula

\[ t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}}, \qquad \text{df} = n - 2 \]

Applying it:

  1. Compute the t-statistic with \(n - 2\) df; compare with \(t_{0.025}\).

4. Calculation

Blank working table:

tdfCritical \(t_{0.025}\)Decision

\(t = 0.55\sqrt{16}/\sqrt{1 - 0.3025} = 2.2/0.835 = 2.635\); df \(= 16\), \(t_{0.025} = 2.12\).

5. Result

\(|t| = 2.635 > 2.12\) (p \(< 0.05\)) ⇒ reject \(H_0\); the correlation is significant.

Experiment 7 — Paired t-test

1. Problem

Heart rate before and after a workout for 12 patients gives the differences \(d\): 5, 7, 4, 6, 8, 3, 5, 7, 6, 4, 5, 6. Test whether the workout changes the heart rate.

2. Aim

To test the mean of paired differences using the paired t-test.

3. Formula

\[ \bar d = \frac{\sum d}{n}, \qquad s_d = \sqrt{\frac{\sum (d - \bar d)^2}{n-1}}, \qquad t = \frac{\bar d}{s_d/\sqrt n} \]

Applying it:

  1. Compute \(\bar d\) and \(s_d\) (with \(n - 1\) divisor).
  2. Compute \(t = \bar d/(s_d/\sqrt n)\) with \(n - 1\) df.

4. Calculation

Blank working table (fill in the deviation-squared column, then total):

d(d − d̄)²
5
7
…
ΣdΣ(d − d̄)²

\(\sum d = 66,\ \bar d = 5.5\); \(\sum (d - \bar d)^2 = 23\), so \(s_d = \sqrt{23/11} = 1.446\).

\(t = 5.5/(1.446/\sqrt{12}) = 5.5/0.4174 = 13.18\); df \(= 11\), \(t_{0.025} = 2.201\).

5. Result

\(|t| = 13.18 \gg 2.201\) (p \(< 0.001\)) ⇒ reject \(H_0\); the workout changes the heart rate significantly.

Experiment 8 — χ² Test for a Variance & F-test for Equality of Variances

1. Problem

(a) \(n = 20,\ s^2 = 12\). Test \(H_0: \sigma^2 = 9\) (two-tailed).
(b) \(n_1 = 21,\ s_1^2 = 20\); \(n_2 = 16,\ s_2^2 = 8\). Test \(H_0: \sigma_1^2 = \sigma_2^2\) against \(H_1: \sigma_1^2 > \sigma_2^2\).

2. Aim

To test a single variance using the χ² statistic and the equality of two variances using the variance-ratio (F) test.

3. Formula

\[ \chi^2 = \frac{(n-1)s^2}{\sigma_0^2}, \qquad F = \frac{s_1^2}{s_2^2} \]

Applying it:

  1. χ² test: statistic \((n-1)s^2/\sigma_0^2\) with \(n - 1\) df; two-tailed critical values \(\chi^2_{0.975}\) and \(\chi^2_{0.025}\).
  2. F-test: put the larger variance in the numerator; compare with \(F_{0.05}(\text{df}_1, \text{df}_2)\).

4. Calculation

Blank working table:

PartStatisticdfCriticalDecision
(a)
(b)

(a) \(\chi^2 = 19\cdot 12/9 = 25.33\); df \(= 19\); two-tailed critical values \(\chi^2_{0.975} = 8.91\) and \(\chi^2_{0.025} = 32.85\).

(b) \(F = 20/8 = 2.5\); df \(= (20, 15)\); \(F_{0.05}(20, 15) = 2.33\).

5. Result

(a) \(8.91 < 25.33 < 32.85\) (p \(> 0.05\)) ⇒ accept \(H_0\); the variance is consistent with 9. (b) \(F = 2.5 > 2.33\) (p \(< 0.05\)) ⇒ reject \(H_0\); the first variance is significantly larger.

Experiment 9 — χ² Test for Goodness of Fit & Independence

1. Problem

(a) Among 100 patients, recoveries by week are 22, 27, 25, 26 (expected 25 each). Test whether the recovery rate is uniform across weeks.
(b) A 2×2 table of smoking × cancer has observed counts (60, 40, 20, 80). Test independence.

2. Aim

To apply the χ² test to a goodness-of-fit problem and to a test of independence in a contingency table.

3. Formula

\[ \chi^2 = \sum \frac{(O - E)^2}{E}, \qquad E_{ij} = \frac{R_i\,C_j}{N} \]

Applying it:

  1. Compute expected frequencies (equal shares for goodness of fit; row×col/N for independence).
  2. Compute \(\chi^2 = \sum (O - E)^2/E\); df \(= k - 1\) (GoF) or \((r-1)(c-1)\) (independence).

4. Calculation

Blank working table (goodness of fit):

WeekOE(O−E)²/E
12225
22725
32525
42625
Σ100100

(a) \(\chi^2 = (9 + 4 + 0 + 1)/25 = 14/25 = 0.56\); df \(= 3\), \(\chi^2_{0.05} = 7.81\).

(b) Expected \(= (40, 60, 40, 60)\); \(\chi^2 = \dfrac{20^2}{40} + \dfrac{20^2}{60} + \dfrac{20^2}{40} + \dfrac{20^2}{60} = 10 + 6.67 + 10 + 6.67 = 33.33\); df \(= 1\), \(\chi^2_{0.05} = 3.84\).

5. Result

(a) \(0.56 < 7.81\) (p \(> 0.05\)) ⇒ accept \(H_0\); recovery is uniform across weeks. (b) \(33.33 > 3.84\) (p \(< 0.001\)) ⇒ reject \(H_0\); smoking and cancer are not independent.

Experiment 10 — Non-parametric Tests for One Sample

1. Problem

(a) Runs test: the signs of 12 successive stock returns are + + − − − + + + − − + +. Test for randomness.
(b) Sign & Wilcoxon signed-rank test: test \(H_0:\) median \(= 50\) for the sample 45, 48, 52, 47, 55, 49, 53, 50, 51, 46.

2. Aim

To test randomness (runs test) and a hypothesised median (sign test and Wilcoxon signed-rank test).

3. Formula

\[ E(R) = \frac{2n_1 n_2}{n_1 + n_2} + 1, \qquad \operatorname{Var}(R) = \frac{2n_1 n_2(2n_1 n_2 - n_1 - n_2)}{(n_1 + n_2)^2(n_1 + n_2 - 1)}, \qquad Z = \frac{R - E(R)}{\sqrt{\operatorname{Var}(R)}} \]

Applying it:

  1. Runs test: count runs \(R\), and \(n_1, n_2\) of each sign; use the normal approximation.
  2. Sign test: count plus/minus signs about the median (drop exact ties); use the binomial \(B(m, 0.5)\).
  3. Wilcoxon: rank \(|d|\), attach signs, and take \(W = \min(W^+, W^-)\).

4. Calculation

Blank working table (Wilcoxon: rank the absolute differences):

xd = x − 50|d|rank of |d|signed rank
45
48
…

(a) Runs: \(n_1 = 7\) (+), \(n_2 = 5\) (−), \(R = 5\). \(E(R) = 2(7)(5)/12 + 1 = 6.83\), \(\operatorname{Var}(R) = 2(7)(5)(70 - 12)/(144\cdot 11) = 2.56\), SD \(= 1.60\); \(Z = (5 - 6.83)/1.60 = -1.14\); p \(= 0.25\).

(b) Sign test: drop the value 50; among the remaining 9, there are 4 plus and 5 minus signs. \(P(B(9, 0.5) \le 4) = 0.5\), so p is large.
Wilcoxon: the signed differences are −5, −2, +2, −3, +5, −1, +3, +1, −4; ranking \(|d|\) (ties averaged) gives \(W^+ = 19,\ W^- = 26\), so \(W = 19\). For \(n = 9\), the 5 % two-tailed critical value is 5.

5. Result

(a) \(|Z| = 1.14 < 1.96\) (p \(= 0.25 > 0.05\)) ⇒ accept \(H_0\); the sequence is random. (b) Sign test: p large ⇒ accept. Wilcoxon: \(W = 19 > 5\) ⇒ accept \(H_0\); the median is consistent with 50.

1. Problem

(a) Sign test: for 10 paired observations, 7 differences are positive and 3 negative. Test \(H_0:\) no difference.
(b) Wilcoxon signed-rank test: for 10 pairs the rank sums are \(W^+ = 48,\ W^- = 7\). Test \(H_0:\) no difference.

2. Aim

To test the equality of two related (paired) samples using the sign test and the Wilcoxon signed-rank test.

3. Formula

\[ S \sim B(n, 0.5), \qquad W = \min(W^+, W^-) \]

Applying it:

  1. Sign test: the number of positive signs follows \(B(n, 0.5)\) under \(H_0\).
  2. Wilcoxon: take \(W = \min(W^+, W^-)\) and compare with the critical value; reject if \(W \le\) critical.

4. Calculation

Blank working table:

TestStatisticCritical / p-valueDecision
Sign
Wilcoxon

(a) \(S = 7\) positives out of 10. \(P(B(10, 0.5) \ge 7) = 0.172\); two-tailed p \(= 0.344\).

(b) \(W = \min(48, 7) = 7\). For \(n = 10\), the 5 % two-tailed critical value is 8.

5. Result

(a) p \(= 0.344 > 0.05\) ⇒ accept \(H_0\) (sign test). (b) \(W = 7 \le 8\) ⇒ reject \(H_0\) (Wilcoxon). The Wilcoxon test, using the magnitudes of the differences, is more powerful and detects a difference that the sign test does not.

Experiment 12 — Non-parametric Tests for Two Independent Samples

1. Problem

(a) Median test: two groups of 10 observations each; relative to the grand median, Group 1 has 2 above and 8 below, Group 2 has 8 above and 2 below. Test equality of medians.
(b) Mann–Whitney U: \(n_1 = 5,\ n_2 = 6\), rank sum \(R_1 = 20\).
(c) Wald–Wolfowitz runs test: the combined ordered sequence is A B B A B A B A (\(n_1 = n_2 = 4\)).

2. Aim

To compare two independent samples using the median test, the Mann–Whitney U test and the Wald–Wolfowitz runs test.

3. Formula

\[ U_1 = R_1 - \frac{n_1(n_1+1)}{2}, \qquad U_2 = n_1 n_2 - U_1, \qquad E(R) = \frac{2n_1 n_2}{n_1 + n_2} + 1 \]

Applying it:

  1. Median test: build a 2×2 table of above/below the grand median; apply χ² with 1 df.
  2. Mann–Whitney: \(U_1 = R_1 - n_1(n_1+1)/2\), \(U = \min(U_1, U_2)\); compare with the critical U.
  3. Wald–Wolfowitz: count runs \(R\) in the ordered sequence; use the normal approximation.

4. Calculation

Blank working table:

TestStatisticCriticalDecision
Median (χ²)
Mann–Whitney U
Wald–Wolfowitz

(a) The 2×2 table is (2, 8; 8, 2); with 10 above and 10 below over 20 observations, each expected cell \(= 5\). \(\chi^2 = \dfrac{(2-5)^2}{5}\times 4 = \dfrac{36}{5} = 7.2\); df \(= 1\), \(\chi^2_{0.05} = 3.84\).

(b) \(U_1 = 20 - 5(6)/2 = 5\), \(U_2 = 30 - 5 = 25\), so \(U = 5\). Critical U at 5 % two-tailed for \((5, 6)\) is 3.

(c) Runs in A B B A B A B A: \(R = 7\). \(E(R) = 2(4)(4)/8 + 1 = 5\), \(\operatorname{Var}(R) = 1.71\), SD \(= 1.31\); \(Z = (7 - 5)/1.31 = 1.53\); p \(= 0.13\).

5. Result

(a) \(7.2 > 3.84\) (p \(< 0.05\)) ⇒ reject \(H_0\); the medians differ. (b) \(U = 5 > 3\) ⇒ accept \(H_0\); no significant difference. (c) \(|Z| = 1.53 < 1.96\) (p \(= 0.13\)) ⇒ accept \(H_0\); the two samples come from the same distribution.

Lab Record Format (to be followed for every experiment)

  1. Problem — the data and the hypotheses \(H_0, H_1\).
  2. Aim — the objective of the experiment.
  3. Formula — the test statistic and its distribution, the formula(e), then the steps that apply them.
  4. Calculation — the computed statistic and critical/tabulated value.
  5. Result — the decision stated from both the critical-value and the p-value approach, with interpretation.