WK10: Statistical Inference - Comparing Two Means: Confidence Interval for two independent sample problems

Comparing Two Populations: Difference of Means

  • Focus is on the difference between two population means.

  • Variable is measured across both populations.

  • Two independent samples are collected:

    • Sample 1: Size n<em>1n<em>1 from population 1 with unknown mean μ</em>1\mu</em>1 and standard deviation σ1\sigma_1.

    • Sample 2: Size n<em>2n<em>2 from population 2 with unknown mean μ</em>2\mu</em>2 and standard deviation σ2\sigma_2.

  • Samples are independent; one doesn't influence the other.

  • Sample sizes can differ.

  • Summary statistics:

    • Population 1: Sample mean Xˉ<em>1\bar{X}<em>1, sample standard deviation S</em>1S</em>1.

    • Population 2: Sample mean Xˉ<em>2\bar{X}<em>2, sample standard deviation S</em>2S</em>2.

Matched Pairs vs. Independent Samples

  • Matched Pairs:

    • Two samples of paired data (e.g., before/after measurements on the same individual).

    • Example: Vitamin C content in tomatoes before and after cooking.

    • A single sample of differences is analyzed.

    • One-sample t-procedures are used on the differences.

    • Summary statistics: Sample mean of differences Xˉ<em>d\bar{X}<em>d, sample standard deviation of differences S</em>dS</em>d, sample size (number of pairs) nn.

  • Independent Samples:

    • One sample from each population, independently obtained.

    • No matching of individuals.

    • Samples can be of different sizes.

    • Summary statistics for Population 1: Xˉ<em>1\bar{X}<em>1, S</em>1S</em>1, n1n_1.

    • Summary statistics for Population 2: Xˉ<em>2\bar{X}<em>2, S</em>2S</em>2, n2n_2.

Statistical Inference for Independent Samples

  • Parameter of interest: Difference of population means (μ<em>1μ</em>2\mu<em>1 - \mu</em>2).

  • Point estimate: Difference of sample means (Xˉ<em>1Xˉ</em>2\bar{X}<em>1 - \bar{X}</em>2).

  • Standard deviation of the sampling distribution of the difference between sample means:
    σ<em>12n</em>1+σ<em>22n</em>2\sqrt{\frac{\sigma<em>1^2}{n</em>1} + \frac{\sigma<em>2^2}{n</em>2}}

  • Since σ<em>1\sigma<em>1 and σ</em>2\sigma</em>2 are usually unknown, we estimate them with S<em>1S<em>1 and S</em>2S</em>2.

  • Standard error of the difference between two sample means:
    S<em>12n</em>1+S<em>22n</em>2\sqrt{\frac{S<em>1^2}{n</em>1} + \frac{S<em>2^2}{n</em>2}}

Conditions for T-Procedures (Two Independent Samples)

  • Randomness: Each sample must be randomly selected from its population.

  • Normality: Check the shape of the population distributions.

    • Use dot plots or histograms for each sample.

    • Small Samples (n1 + n2 < 15): Dot plots should show approximately normal distributions; if there's skewness or outliers, do not use t-procedures.

    • Medium Samples (15 < n1 + n2 < 40): T-procedures are okay as long as there's no strong skewness or outliers in the histograms.

    • Large Samples (n1 + n2 > 40): T-procedures can be used even with skewed distributions.

Confidence Interval

  • General structure: Sample estimate ±\pm (multiplier ×\times standard error).

  • Confidence interval for independent samples: (Xˉ<em>1Xˉ</em>2)±tS<em>12n</em>1+S<em>22n</em>2(\bar{X}<em>1 - \bar{X}</em>2) \pm t^* \sqrt{\frac{S<em>1^2}{n</em>1} + \frac{S<em>2^2}{n</em>2}}

    • tt^* is the critical value from the t-distribution for the desired confidence level.

  • Degrees of Freedom (DOF):

    • Complex formula for accurate DOF (Welch-Satterthwaite equation).

    • Conservative Approach: Use the smaller of n<em>11n<em>1 - 1 and n</em>21n</em>2 - 1. This results in a slightly larger t-multiplier and a wider (more conservative) confidence interval.

      • Use this approach for manual calculations.

    • Full DOF Approximation: A more accurate (but complex) calculation of degrees of freedom.

      • Accurate if both sample sizes are at least 5.

      • Software usually provides this DOF.

Example: Exercise and Pulse Rates

  • Study comparing resting pulse rates of regular exercisers vs. non-exercisers.

  • Sample 1 (Non-exercisers): n<em>1=31n<em>1 = 31, Xˉ</em>1=75\bar{X}</em>1 = 75, S1=9S_1 = 9.

  • Sample 2 (Exercisers): n<em>2=29n<em>2 = 29, Xˉ</em>2=66\bar{X}</em>2 = 66, S2=8S_2 = 8.

  • Goal: Construct a 95% confidence interval for the difference in mean pulse rates.

  • Direction: Non-exercisers - Exercisers.

  • Sample size condition satisfied (n1 + n2 = 60 > 40), so t-procedures may be used.

  • Degrees of Freedom Calculation:

    • Conservative Approach: df=min(311,291)=28df = min(31-1, 29-1) = 28. For a 95% confidence level, the t-multiplier (tt^*) is 2.048 (from a t-table).

    • Full DOF Approximation: df57.97df \approx 57.97. Round down to 50 for table lookup, t=2.009t^* = 2.009.

Confidence Interval Calculation and Interpretation

  • Using full DOF approximation (df=50,t=2.009df = 50, t^* = 2.009):
    (7566)±2.0099231+8229(75 - 66) \pm 2.009 \sqrt{\frac{9^2}{31} + \frac{8^2}{29}}

  • Resulting 95% confidence interval: (4.435, 13.565).

  • Interpretation: We are 95% confident that the difference in mean resting pulse rates between non-exercisers and exercisers is between 4.435 and 13.565 beats per minute (non-exercisers minus exercisers).

Conclusion Regarding Difference of Means

  • If the confidence interval for the difference includes zero, we cannot claim a significant difference between the population means.

  • If the confidence interval does not include zero, we can claim a significant difference.

  • In this example (4.435, 13.565), zero is not included, so we can claim a 95% confident difference in mean resting pulse rates between the two groups.

Note on Manual Calculations

  • When calculating by hand, use the conservative approach for degrees of freedom. The resulting confidence interval will be slightly wider, but the interpretation and conclusion regarding the difference in means remain the same.