Confidence Interval for Two Independent Means

Confidence Interval for Differences in Population Means
To make inferences about the difference in the population means μ1−μ2 (parameter), we use the difference in the sample means xˉ1−xˉ2.
We do not know the actual value of the difference in population means µ1−µ2 but we can provide a reasonable range to estimate it, by constructing confidence intervals given a certain confidence level C (e.g. 90%, 95%, 99%). Like all confidence interval, it is constructed using a point estimate plus or minus a margin of error.
- When comparing two means, the point estimate (or statistic) is x1−x2.
Example
We wish to estimate the difference in house prices between houses with fireplaces (Population 1) and houses without fireplaces (Population 2).
- The parameter that we are trying to estimate is μ1−μ2.
- μ1 is unkown
- μ2 is unkown
- Therefore, the difference μ1−μ2 is unkown.
Suppose we draw samples from each population. Results:
- The average price of homes (in thousands) with fireplaces in Sample 1 is x1=650
- The average price of homes (in thousands) without fireplaces in Sample 2 is x2=500
- The point estimate or statistic is x1−x2=650−500=150
- We estimate that the true difference in prices is $150,000.
The above is just a point estimate. Suppose we construct a 95% confidence interval. Results:
- 50 is the lower confidence level (LCL)
- 200 is the upper confidence level (UCL)
- We are 95% confident that the true difference in prices is between $50,000 and $200,000.
- We do not know the value of the true difference in prices but we are very confident that it is somewhere within that confidence interval.

Confidence Interval for Two Means Containing Zero
Comparing two means using confidence intervals for the difference μ1−μ2 is similar to a hypothesis test of no difference:
Ho:μ1−μ2=0 (no difference)
Ha:μ1−μ2=0 (difference)
Example #1
95% confidence interval to estimate μ1−μ2 is [36,70]
- The confidence interval does not contain zero.
- The LCL and UCL have the same sign (both positive).
- There is evidence of a difference.
- Specifically, μ1 is greater than μ2.
Example #2
95% confidence interval to estimate μ1−μ2 is [−70,−36]
- The confidence interval does not contain zero.
- The LCL and UCL have the same sign (both negative).
- There is evidence of a difference.
- Specifically, μ1 is less than than μ2.
Example #3
95% confidence interval to estimate μ1−μ2 is [−15,45]
- The confidence interval contains zero.
- The LCL is negative and UCL is positive.
- There is no evidence of a difference.
- It's possible that μ1 is greater than μ2.
- It's also possible that μ1 is less than μ2.

Confidence Interval for Two Means (Independent Populations)
We make inferences with confidence intervals.
Example
Ben, the owner of Fitness Planet wonders, if the amount of time spent at the gym differs by gender. His results:
Ben assumes that the two populations have unequal variances. He generates this output:
What is the p-value? What do you conclude if you were to do a hypothesis test?
Ho:μ1−μ2=0
Ha:μ1−μ2=0 (two-tail test)
The p-value is 0.00263. We have very strong evidence that the amount time spent at the gym differs by gender.
Construct a 95% confidence interval. What does it tell you (in plain English)?
We use:
(x1−x2)±t∗n1s12+n2s22
df=the minimum of: (n1−1,n2−1)=the minimum of: (84,67)=67Thus, t∗ = 1.996 (using software)
(63−56)±1.99685(19)2+68(8)2
7±4.55
[2.45,11.55]
We are 95% confident that the difference of time spent at the gym is between 2.45 minutes and 11.55 minutes.
Does the interval contain "0"? Interpret that that means.
The interval does not contain "0". This means that one group (specifically the men) is consistently different (specifically greater) than the other group (specifically the women) in terms of time spent at the gym.
Thus, we can conclude that the amount time spent at the gym differs by gender.
→ This is the same conclusion as the hypothesis test.