Subjects statistics

Two Sample T Test 93E510

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem Statement:** We have two samples and want to test if they come from the same population at a 5% significance level. 2. **Hypotheses:** - Null hypothesis $H_0$: The two samples come from the same population (means are equal). - Alternative hypothesis $H_a$: The two samples come from different populations (means are not equal). 3. **Data:** Sample 1: $15, 25, 16, 20, 22, 24, 21, 17, 19, 23$ (n=10) Sample 2: $35, 31, 25, 38, 26, 29, 32, 34, 33, 27, 29, 31$ (n=12) 4. **Test to use:** Since population variances are unknown and sample sizes are small, use the two-sample t-test assuming unequal variances (Welch's t-test). 5. **Calculate sample means:** $$\bar{x}_1 = \frac{15+25+16+20+22+24+21+17+19+23}{10} = \frac{202}{10} = 20.2$$ $$\bar{x}_2 = \frac{35+31+25+38+26+29+32+34+33+27+29+31}{12} = \frac{370}{12} \approx 30.83$$ 6. **Calculate sample variances:** For Sample 1: $$s_1^2 = \frac{\sum (x_i - \bar{x}_1)^2}{n_1 - 1}$$ Calculate each squared deviation and sum: $(15-20.2)^2=27.04$, $(25-20.2)^2=23.04$, $(16-20.2)^2=17.64$, $(20-20.2)^2=0.04$, $(22-20.2)^2=3.24$, $(24-20.2)^2=14.44$, $(21-20.2)^2=0.64$, $(17-20.2)^2=10.24$, $(19-20.2)^2=1.44$, $(23-20.2)^2=7.84$ Sum = $105.6$ $$s_1^2 = \frac{105.6}{9} \approx 11.73$$ For Sample 2: Calculate squared deviations: $(35-30.83)^2=17.39$, $(31-30.83)^2=0.03$, $(25-30.83)^2=33.97$, $(38-30.83)^2=51.39$, $(26-30.83)^2=23.33$, $(29-30.83)^2=3.35$, $(32-30.83)^2=1.37$, $(34-30.83)^2=10.06$, $(33-30.83)^2=4.72$, $(27-30.83)^2=14.67$, $(29-30.83)^2=3.35$, $(31-30.83)^2=0.03$ Sum = $163.26$ $$s_2^2 = \frac{163.26}{11} \approx 14.84$$ 7. **Calculate test statistic:** $$t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} = \frac{20.2 - 30.83}{\sqrt{\frac{11.73}{10} + \frac{14.84}{12}}} = \frac{-10.63}{\sqrt{1.173 + 1.237}} = \frac{-10.63}{\sqrt{2.41}} = \frac{-10.63}{1.55} \approx -6.86$$ 8. **Degrees of freedom (Welch-Satterthwaite equation):** $$df = \frac{\left(\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}\right)^2}{\frac{(s_1^2/n_1)^2}{n_1-1} + \frac{(s_2^2/n_2)^2}{n_2-1}} = \frac{(1.173 + 1.237)^2}{\frac{1.173^2}{9} + \frac{1.237^2}{11}} = \frac{2.41^2}{\frac{1.376}{9} + \frac{1.53}{11}} = \frac{5.81}{0.153 + 0.139} = \frac{5.81}{0.292} \approx 19.9$$ Use $df \approx 20$. 9. **Critical t-value:** For two-tailed test at 5% significance and 20 df, $t_{critical} \approx \pm 2.086$. 10. **Decision:** Since $|t| = 6.86 > 2.086$, reject $H_0$. 11. **Conclusion:** There is sufficient evidence at the 5% level to conclude the two samples come from different populations.