Two-Sample Tests Math Example 1

Follow the full solution, then compare it with the other examples linked below.

Example 1

medium
Test whether two teaching methods differ in effectiveness. Method A (nA=30n_A=30, xห‰A=75\bar{x}_A=75, sA=8s_A=8) vs. Method B (nB=30n_B=30, xห‰B=80\bar{x}_B=80, sB=10s_B=10). Use a two-sample z-test at ฮฑ=0.05\alpha=0.05.

Solution

  1. 1
    H0:ฮผA=ฮผBH_0: \mu_A = \mu_B; Ha:ฮผAโ‰ ฮผBH_a: \mu_A \neq \mu_B
  2. 2
    SE of difference: SE=sA2nA+sB2nB=6430+10030=16430=5.47โ‰ˆ2.34SE = \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. 3
    z-statistic: z=xห‰Aโˆ’xห‰BSE=75โˆ’802.34=โˆ’52.34โ‰ˆโˆ’2.14z = \frac{\bar{x}_A - \bar{x}_B}{SE} = \frac{75 - 80}{2.34} = \frac{-5}{2.34} \approx -2.14
  4. 4
    Two-tailed p-value: p=2ร—P(Z<โˆ’2.14)โ‰ˆ2(0.016)=0.032<0.05p = 2 \times P(Z < -2.14) \approx 2(0.016) = 0.032 < 0.05 โ†’ Reject H0H_0

Answer

z=โˆ’2.14z = -2.14, pโ‰ˆ0.032<0.05p \approx 0.032 < 0.05. Reject H0H_0. Methods differ significantly.
The two-sample z-test compares means of two independent groups. The SE of the difference combines both groups' variability. With p=0.032, we have statistically significant evidence that Method B outperforms Method A (80 vs 75 average).

About Two-Sample Tests

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.

Learn more about Two-Sample Tests โ†’

More Two-Sample Tests Examples