Confidence Interval for Difference of Means (Known σ): CI = (X̄₁ - X̄₂) ± z*√[(σ₁²/n₁) + (σ₂²/n₂)]
- Calculate the point estimate: X̄₁ - X̄₂
- Determine the critical z-value for the desired confidence level
- Calculate the standard error: √[(σ₁²/n₁) + (σ₂²/n₂)]
- Calculate the margin of error: z* × SE
- Construct the confidence interval: (X̄₁ - X̄₂) ± ME
X̄₁ - X̄₂ = 85 - 80 = 5
For 95% confidence, z₀.₀₂₅ = 1.96
SE = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(12²/40) + (15²/50)]
= √[(144/40) + (225/50)] = √[3.6 + 4.5] = √8.1 ≈ 2.85
ME = z* × SE = 1.96 × 2.85 ≈ 5.58
CI = (X̄₁ - X̄₂) ± ME = 5 ± 5.58 = [-0.58, 10.58]
We are 95% confident that the true difference in means (Group A - Group B) is between -0.58 and 10.58.
• Point estimate: Difference of sample means estimates difference of population means
• Standard error: Variance of difference equals sum of individual variances
• Independence assumption: Samples must be independent for variance addition
• The interval includes 0, suggesting no significant difference between groups
• The standard error calculation adds the variances of both groups
• This forms the basis for two-sample z-tests
Confidence Interval for Difference of Proportions: CI = (p̂₁ - p̂₂) ± z*√[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
p̂₁ - p̂₂ = 0.60 - 0.45 = 0.15
SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
= √[(0.60(1-0.60)/200) + (0.45(1-0.45)/150)]
= √[(0.60(0.40)/200) + (0.45(0.55)/150)]
= √[0.24/200 + 0.2475/150] = √[0.0012 + 0.00165] = √0.00285 ≈ 0.0534
ME = z* × SE = 1.96 × 0.0534 ≈ 0.105
CI = (p̂₁ - p̂₂) ± ME = 0.15 ± 0.105 = [0.045, 0.255]
We are 95% confident that the true difference in support proportions (Urban - Rural) is between 4.5% and 25.5%.
• Point estimate: Difference of sample proportions estimates difference of population proportions
• Standard error: Uses sample proportions in variance calculation
• Independence: Samples must be independent for variance addition
• The interval does not include 0, suggesting a significant difference between groups
• Urban residents show significantly higher support than rural residents
• This is the basis for comparing proportions between two groups
Confidence Interval for Difference of Means (Equal Variances): CI = (X̄₁ - X̄₂) ± t*df × sp√[(1/n₁) + (1/n₂)], where sp is the pooled standard deviation.
X̄₁ - X̄₂ = 82 - 78 = 4
sp² = [(n₁-1)s₁² + (n₂-1)s₂²] / (n₁+n₂-2)
= [(24)(10²) + (29)(12²)] / (25+30-2)
= [2400 + 4176] / 53 = 6576 / 53 ≈ 124.08
sp = √124.08 ≈ 11.14
SE = sp√[(1/n₁) + (1/n₂)] = 11.14√[(1/25) + (1/30)]
= 11.14√[0.04 + 0.0333] = 11.14√0.0733 = 11.14 × 0.2707 ≈ 3.01
df = n₁ + n₂ - 2 = 25 + 30 - 2 = 53
For 95% confidence, t₀.₀₂₅, 53 ≈ 2.006
ME = t* × SE = 2.006 × 3.01 ≈ 6.04
CI = (X̄₁ - X̄₂) ± ME = 4 ± 6.04 = [-2.04, 10.04]
We are 95% confident that the true difference in means (Method A - Method B) is between -2.04 and 10.04.
• Pooled variance: Assumes equal population variances to improve efficiency
• Degrees of freedom: df = n₁ + n₂ - 2 for pooled variance t-test
• t-distribution: Used when population standard deviations are unknown
• The interval includes 0, suggesting no significant difference between teaching methods
• Pooling variances increases the degrees of freedom and efficiency
• The assumption of equal variances should be verified
Point Estimate: The sample statistic used to estimate the population parameter (e.g., X̄₁ - X̄₂ estimates μ₁ - μ₂)
Standard Error: The standard deviation of the sampling distribution of the difference
Independence: Samples must be independent for variance addition property
Pooling: Combining sample variances under the assumption of equal population variances
- Identify the problem type: Difference of means or difference of proportions
- Check conditions: Independence, normality, equal variances (if applicable)
- Calculate point estimate: X̄₁ - X̄₂ or p̂₁ - p̂₂
- Determine critical value: z or t based on known/unknown σ and confidence level
- Calculate standard error: Use appropriate formula for the situation
- Construct interval: Point estimate ± (critical value × standard error)
• Point estimate: X̄₁ - X̄₂ estimates μ₁ - μ₂, p̂₁ - p̂₂ estimates p₁ - p₂
• Variance of difference: Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂) for independent samples
• Standard error: Add variances then take square root
• Normality: Applies when sample sizes are large (n ≥ 30) or populations are normal
Confidence Interval for Paired Differences: CI = d̄ ± t*df(sd/√n), where d̄ is the mean of the differences and sd is the standard deviation of the differences.
SE = sd/√n = 4.2/√10 = 4.2/3.162 ≈ 1.33
df = n - 1 = 10 - 1 = 9
For 95% confidence, t₀.₀₂₅, 9 = 2.262
ME = t* × SE = 2.262 × 1.33 ≈ 3.01
CI = d̄ ± ME = 8.5 ± 3.01 = [5.49, 11.51]
Since the interval does not include 0, there's evidence of improvement after the training program
We are 95% confident that the true mean improvement in test scores after the training program is between 5.49 and 11.51 points.
• Paired differences: Use one-sample t-procedure on the differences
• Degrees of freedom: df = n - 1 for paired samples
• Interpretation: Non-zero interval indicates significant change
• Paired differences account for individual variation by analyzing the change within each subject
• This approach is more powerful than independent samples when subjects are matched
• The interval excludes 0, confirming the training program was effective
Real-world application: Using confidence intervals for differences to make practical business decisions and evaluate process improvements.
X̄₁ - X̄₂ = 120 - 115 = 5
SE = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(8²/35) + (10²/40)]
= √[(64/35) + (100/40)] = √[1.829 + 2.5] = √4.329 ≈ 2.08
For 99% confidence, z₀.₀₀₅ = 2.576
ME = z* × SE = 2.576 × 2.08 ≈ 5.36
CI = (X̄₁ - X̄₂) ± ME = 5 ± 5.36 = [-0.36, 10.36]
The interval includes 0, suggesting no significant difference at 99% confidence
We are 99% confident that the true difference in production rates (Line A - Line B) is between -0.36 and 10.36 units per hour. Since the interval includes 0, we cannot conclude with 99% confidence that there is a significant difference between the production lines.
• High confidence: 99% confidence is more conservative than 95%
• Practical significance: Consider both statistical and practical significance
• Business decision: Use confidence intervals to inform operational choices
• At 95% confidence, the interval would exclude 0, showing significance
• Higher confidence levels require stronger evidence for significance
• Managers must consider both statistical and practical significance
Comprehensive Summary: Confidence Intervals for Differences
Difference of Sample Means (X̄₁ - X̄₂): The difference between the means of two independent samples. The sampling distribution has mean μ₁ - μ₂ and standard deviation √[(σ₁²/n₁) + (σ₂²/n₂)].
Difference of Sample Proportions (p̂₁ - p̂₂): The difference between the proportions of two independent samples. The sampling distribution has mean p₁ - p₂ and standard deviation √[(p₁(1-p₁)/n₁) + (p₂(1-p₂)/n₂)].
Paired Differences (d̄): The mean of differences between paired observations. Used when the same subjects are measured twice or when subjects are matched.
Independence: Samples must be independently drawn from their respective populations for the variance addition property to hold.
- Point Estimate: For both means and proportions, the point estimate is the difference of sample statistics
- Variance Addition: For independent samples, Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂)
- Standard Error Formula: Take the square root of the sum of individual variances
- Distribution Choice: Use z-distribution when σ is known, t-distribution when σ is unknown
- Independence Requirement: Critical assumption for variance addition property
Group 1: X̄₁ = 100, σ₁ = 10, n₁ = 25
Group 2: X̄₂ = 95, σ₂ = 8, n₂ = 25
Point estimate: X̄₁ - X̄₂ = 100 - 95 = 5
SE = √[(10²/25) + (8²/25)] = √[4 + 2.56] = √6.56 ≈ 2.56
95% CI: 5 ± 1.96(2.56) = 5 ± 5.02 = [-0.02, 10.02]
n = 8, d̄ = 3.2, sd = 2.1
SE = sd/√n = 2.1/√8 = 2.1/2.828 ≈ 0.743
df = 7, t₀.₀₂₅, 7 = 2.365
95% CI: 3.2 ± 2.365(0.743) = 3.2 ± 1.758 = [1.44, 4.96]
• Difference of means (known σ): CI = (X̄₁ - X̄₂) ± z*√[(σ₁²/n₁) + (σ₂²/n₂)]
• Difference of proportions: CI = (p̂₁ - p̂₂) ± z*√[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
• Difference of means (equal variances): CI = (X̄₁ - X̄₂) ± t*sp√[(1/n₁) + (1/n₂)]
• Paired differences: CI = d̄ ± t*(sd/√n)
- Means: Point estimate = X̄₁ - X̂₂, SE = √[(σ₁²/n₁) + (σ₂²/n₂)]
- Proportions: Point estimate = p̂₁ - p̂₂, SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
- Variance Addition Rule: Var(A-B) = Var(A) + Var(B) for independent A and B
- Independence Check: Always verify samples are independent before applying formulas
Questions & Answers
Question: Why do we add the variances when finding the standard error of the difference of two sample means? Why don't we subtract them?
Answer: This is a great question that reveals a fundamental concept in probability theory. When we take the difference of two independent random variables (X̄₁ - X̄₂), the variance of the difference is:
Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂)
Here's the mathematical reason: Var(X - Y) = Var(X) + Var(Y) when X and Y are independent. This happens because:
- Both X̄₁ and X̄₂ have their own variability around their respective population means
- When we take the difference, both sources of variability contribute to the overall uncertainty
- The variability in X̄₁ adds uncertainty to our estimate of the difference
- The variability in X̄₂ also adds uncertainty to our estimate of the difference
Think of it this way: if both sample means could vary widely, the difference between them will be even more variable than either individual mean.
Question: What's the difference between paired and independent samples when dealing with differences?
Answer: This is a critical distinction in statistics:
Independent Samples: The two groups are separate and unrelated. Examples: men vs women, treatment vs control group, City A vs City B. We use the formulas we've discussed: Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂).
Paired Samples: Each observation in one group is matched with a corresponding observation in the other group. Examples: before vs after measurements on the same subjects, twins, matched pairs. For paired samples, we analyze the differences (d = x₁ - x₂) as a single sample and use one-sample methods.
The key difference is that for paired samples, we account for correlation between the paired observations, which typically reduces variability and increases statistical power.
In this lesson, we focused on independent samples. Paired samples require different analysis methods.
Question: How do I know when to use pooled vs unpooled variances for difference of means?
Answer: The choice depends on whether you assume equal population variances:
Use pooled variance: When you assume σ₁² = σ₂² (equal population variances)
- More efficient when the assumption is correct
- Uses combined information from both samples
- Has df = n₁ + n₂ - 2 degrees of freedom
Use unpooled variance: When you don't assume equal population variances
- More robust when variances are unequal
- Uses separate information from each sample
- Has more complex degrees of freedom calculation (Welch's t-test)
A common rule of thumb: if the ratio of the larger variance to the smaller variance is less than 4, the pooled method is usually acceptable. Otherwise, use the unpooled method.
Question: How does the confidence level affect the interpretation of differences?
Answer: The confidence level directly affects the width of the confidence interval and our ability to detect differences:
Higher confidence levels (e.g., 99% vs 95%) produce wider intervals, making it harder to conclude that there's a significant difference. If a 95% confidence interval for a difference excludes 0 (suggesting significance), the 99% interval might include 0 (not significant).
For example:
- 95% CI: [1.2, 8.7] (significant difference - doesn't include 0)
- 99% CI: [-0.5, 10.4] (not significant - includes 0)
Higher confidence levels require stronger evidence to declare a difference statistically significant. This is why researchers often use 95% confidence as a standard balance between Type I and Type II error rates.
Question: How does the sampling distribution of differences relate to hypothesis testing?
Answer: The sampling distribution of differences is fundamental to both confidence intervals and hypothesis testing:
Confidence Intervals: (X̄₁ - X̄₂) ± critical value × SE, where SE = √[(σ₁²/n₁) + (σ₂²/n₂)]
Hypothesis Testing: The test statistic is: t or z = [(X̄₁ - X̄₂) - (μ₁ - μ₂)] / SE
For example, if testing H₀: μ₁ - μ₂ = 0 (no difference), the test statistic becomes: t or z = (X̄₁ - X̄₂) / SE
These procedures allow us to make formal statistical inferences about whether observed differences between groups are statistically significant or could be explained by sampling variability.
The formulas we've learned provide the building blocks for these more advanced inferential procedures.