Hypothesis Test for Two Means (Independent Populations)

Module 6: Hypothesis Test for 2 Means (Independent Populations)

Independent Populations

  • Definition: Two populations are independent if they do not influence each other.

    • Example 1: Comparing weights of males and females in a company.
    • Example 2: Comparing grades of students in Edmonton vs. Calgary.
  • Key Notations:

    • Population 1:
    • Sample Mean: yˉ1\bar{y}_1
    • Population Mean: μ1\mu_1
    • Population Std Dev: σ1\sigma_1
    • Sample Size: n1n_1
    • Population 2:
    • Sample Mean: yˉ2\bar{y}_2
    • Population Mean: μ2\mu_2
    • Population Std Dev: σ2\sigma_2
    • Sample Size: n2n_2

Comparing Two Populations

  • The goal is to determine if sample means are significantly different rather than just comparing their means directly.
  • The observed difference is assessed against the variability within the populations.
  • Inferential statistics necessitates an analysis of the sampling distribution of the difference between means (yˉ<em>1yˉ</em>2\bar{y}<em>1 - \bar{y}</em>2).

Sampling Distribution

  • Assuming Equal Variances:
    • yˉ<em>1yˉ</em>2=μ<em>1μ</em>2\bar{y}<em>1 - \bar{y}</em>2 = \mu<em>1 - \mu</em>2
  • Assuming Unequal Variances:
    • Pooled Standard Deviation:
      S<em>p=(n</em>11)S<em>12+(n</em>21)S<em>22n</em>1+n22S<em>{p} = \sqrt{\frac{(n</em>1 - 1)S<em>1^2 + (n</em>2 - 1)S<em>2^2}{n</em>1 + n_2 - 2}}
    • Standard Error of the Difference:
    • S<em>yˉ</em>1yˉ<em>2=S</em>p1n<em>1+1n</em>2S<em>{\bar{y}</em>1 - \bar{y}<em>2} = S</em>p \sqrt{\frac{1}{n<em>1} + \frac{1}{n</em>2}}
  • If both populations are normally distributed or have large sample sizes, the sampling distribution approaches normality.

Testing for Equal or Unequal Variance

  • Criteria for Equal Variability:
    • Standard deviation ratio < 2
    • Similar Interquartile Range (IQR) in box plots.

T-Tests

  • Pooled T-Test (Equal Variance):
    • Test Statistic:
      t<em>0=yˉ</em>1yˉ<em>2d</em>0S<em>p1n</em>1+1n2t<em>0 = \frac{\bar{y}</em>1 - \bar{y}<em>2 - d</em>0}{S<em>p \sqrt{\frac{1}{n</em>1} + \frac{1}{n_2}}}
    • Distribution: tt-distribution with df=n<em>1+n</em>22df = n<em>1 + n</em>2 - 2
  • Non-Pooled T-Test (Unequal Variance):
    • Test Statistic:
      t<em>0=yˉ</em>1yˉ<em>2d</em>0s<em>12n</em>1+s<em>22n</em>2t<em>0 = \frac{\bar{y}</em>1 - \bar{y}<em>2 - d</em>0}{\sqrt{\frac{s<em>1^2}{n</em>1} + \frac{s<em>2^2}{n</em>2}}}
    • Distribution: tt-distribution with degrees of freedom calculated using the formula:
      df=min(n<em>11,n</em>21)df = \min(n<em>1 - 1, n</em>2 - 1)

P-Value Interpretation

  • Decision Criteria:
    • If pp-value ≤ α\alpha, reject H0H_0.
    • If pp-value > α\alpha, do not reject H0H_0.

Confidence Intervals

  • Pooled T-Test Confidence Interval:
    • yˉ<em>1yˉ</em>2±tS<em>p1n</em>1+1n2\bar{y}<em>1 - \bar{y}</em>2 \pm t^* S<em>p \sqrt{\frac{1}{n</em>1} + \frac{1}{n_2}}
  • Non-Pooled T-Test Confidence Interval:
    • yˉ<em>1yˉ</em>2±ts<em>12n</em>1+s<em>22n</em>2\bar{y}<em>1 - \bar{y}</em>2 \pm t^* \sqrt{\frac{s<em>1^2}{n</em>1} + \frac{s<em>2^2}{n</em>2}}
  • Where tt^* represents the critical value from the tt-distribution.

Example Analysis: Vitamin Supplement

  • Scenario: Testing a vitamin's effect on recovery time.
  • Sample Information:
    • No Vitamin:
    • Sample Size: 45, Mean: 7.2, Standard Deviation: 3
    • Vitamin:
    • Sample Size: 45, Mean: 6.3, Standard Deviation: 1.6
Hypotheses
  • Null (H<em>0H<em>0): μ</em>1μ2=0\mu</em>1 - \mu_2 = 0 (no effect)
  • Alternative (H<em>aH<em>a): μ</em>1μ2>0\mu</em>1 - \mu_2 > 0 (effect exists)
Test Execution
  • Test Statistic:
    • Using pooled variance (assuming equal variance since the ratio is < 2):
    • t0=7.26.302.404145+145=1.780t_0 = \frac{7.2 - 6.3 - 0}{2.404 \sqrt{\frac{1}{45} + \frac{1}{45}}} = 1.780
  • Degrees of Freedom: df=88df = 88
  • P-Value Calculation Outcomes:
    • Since p>0.025p > 0.025, do not reject H0H_0.
    • Conclusion: Insufficient evidence to support vitamin's effectiveness.
Confidence Interval Calculation
  • For difference in means:
    • yˉ<em>1yˉ</em>2±ts<em>p2n</em>1+s<em>p2n</em>2\bar{y}<em>1 - \bar{y}</em>2 \pm t^*\sqrt{\frac{s<em>p^2}{n</em>1} + \frac{s<em>p^2}{n</em>2}}
  • Result Interval: (0.11,1.91)(-0.11, 1.91) indicates no significant mean difference.

Caveats for Non-Pooled T-Test

  • Use of non-pooled test indicated if standard deviation ratio > 2.

Conclusion

  • Findings do not support the claim that the vitamin decreases average recovery time. Further investigation required.

Notes

  • Remember: Equal variances should only be assumed if the informal standard deviation ratio is less than two.