Suppose we want to determine if there is a significant difference in the average test scores between two classes. Class A has 5 students, and Class B has 5 students. Here are their test scores:
-
Class A: 85, 88, 90, 95, 78
-
Class B: 80, 83, 79, 92, 87
Hypotheses:
-
Null Hypothesis (H₀): \(\mu_1 = \mu_2\) (The means of both classes are equal)
-
Alternative Hypothesis (H₁): \(\mu_1 \neq \mu_2\) (The means of both classes are not equal)
We will use a significance level (\(\alpha\)) of 0.05.
To illustrate the mathematics behind the calculations performed for the independent samples t-test, let’s break down each step using the provided scores for Class A and Class B:
Calculate the means (\(\bar{X}_1\) and \(\bar{X}_2\)):
For Class A: \[ \bar{X}_1 = \frac{85 + 88 + 90 + 95 + 78}{5} = 87.2 \]
For Class B: \[ \bar{X}_2 = \frac{80 + 83 + 79 + 92 + 87}{5} = 84.2 \]
Calculate the sample variances (\(s_1^2\) and \(s_2^2\)):
For Class A: \[ s_1^2 = \frac{(85 - 87.2)^2 + (88 - 87.2)^2 + (90 - 87.2)^2 + ....}{4} \]
\[ s_1^2 = \frac{(-2.2)^2 + (0.8)^2 + (2.8)^2 + (7.8)^2 + (-9.2)^2}{4} \] \[ s_1^2 = \frac{4.84 + 0.64 + 7.84 + 60.84 + 84.64}{4} = 39.7 \]
For Class B: \[ s_2^2 = \frac{(80 - 84.2)^2 + (83 - 84.2)^2 + (79 - 84.2)^2 + ....}{4} \] \[ s_2^2 = \frac{(-4.2)^2 + (-1.2)^2 + (-5.2)^2 + (7.8)^2 + (2.8)^2}{4} \] \[ s_2^2 = \frac{17.64 + 1.44 + 27.04 + 60.84 + 7.84}{4} = 28.7 \]
Calculate the pooled variance (\(s_p^2\)):
\[ s_p^2 = \frac{(4 \times 39.7) + (4 \times 28.7)}{8} \] \[ s_p^2 = \frac{158.8 + 114.8}{8} = 34.2 \]
Calculate the t-statistic:
\[ t = \frac{87.2 - 84.2}{\sqrt{34.2} \cdot \sqrt{\frac{1}{5} + \frac{1}{5}}} \] \[ t = \frac{3}{\sqrt{34.2} \cdot \sqrt{\frac{2}{5}}} \] \[ t = \frac{3}{\sqrt{34.2} \cdot \sqrt{0.4}} \] \[ t = \frac{3}{5.85 \cdot 0.6325} = 0.8111 \]
Degrees of freedom:
\[ \text{df} = 5 + 5 - 2 = 8 \]
The critical t-value and p-value:
The t-value needs to be compared against the critical value from a t-distribution table for df = 8 and a two-tailed test with \(\alpha = 0.05\).
If t > 2.306, the null hypothesis is rejected.
In this case, t = 0.8111, so the null hypothesis is not rejected.