Two-Sample Tests Examples in Math
Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Two-Sample Tests.
This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.
Concept Recap
Hypothesis tests and confidence intervals for comparing parameters (means or proportions) of two independent populations. The two-sample t-test compares means; the two-proportion z-test compares proportions.
You have two separate groupsβsay, students taught with Method A vs Method Bβand want to know if there's a real difference. Unlike paired tests where the same subjects appear in both groups, here the groups are completely independent. You compare the two sample statistics and ask: 'Is the gap between these groups larger than what random variation alone would produce?'
Read the full concept explanation βHow to Use These Examples
- Read the first worked example with the solution open so the structure is clear.
- Try the practice problems before revealing each solution.
- Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea: The test statistic measures the observed difference relative to how much variability you'd expect from sampling alone. Conditions: independent random samples, approximately normal sampling distributions (check sample sizes), and the two samples must be independent of each other.
Common stuck point: Students mix up paired and two-sample designs. Key question: are the observations in the two groups linked (paired) or completely separate (two-sample)?
Worked Examples
Example 1
mediumSolution
- 1 H_0: \mu_A = \mu_B; H_a: \mu_A \neq \mu_B
- 2 SE of difference: SE = \sqrt{\frac{s_A^2}{n_A} + \frac{s_B^2}{n_B}} = \sqrt{\frac{64}{30} + \frac{100}{30}} = \sqrt{\frac{164}{30}} = \sqrt{5.47} \approx 2.34
- 3 z-statistic: z = \frac{\bar{x}_A - \bar{x}_B}{SE} = \frac{75 - 80}{2.34} = \frac{-5}{2.34} \approx -2.14
- 4 Two-tailed p-value: p = 2 \times P(Z < -2.14) \approx 2(0.016) = 0.032 < 0.05 β Reject H_0
Answer
Example 2
hardPractice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easyExample 2
hardBackground Knowledge
These ideas may be useful before you work through the harder examples.