Solved Exercises on Confidence Intervals for Differences in Grade 12

Master confidence intervals for differences: comparing means, proportions, and statistical inference through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Difference of Means (Known σ)
Exercise 1
Two independent samples are taken: Group A (n₁ = 40) has mean X̄₁ = 85 and standard deviation σ₁ = 12. Group B (n₂ = 50) has mean X̄₂ = 80 and standard deviation σ₂ = 15. Construct a 95% confidence interval for the difference in means (μ₁ - μ₂).
Definition:

Confidence Interval for Difference of Means (Known σ): CI = (X̄₁ - X̄₂) ± z*√[(σ₁²/n₁) + (σ₂²/n₂)]

Method:
  1. Calculate the point estimate: X̄₁ - X̄₂
  2. Determine the critical z-value for the desired confidence level
  3. Calculate the standard error: √[(σ₁²/n₁) + (σ₂²/n₂)]
  4. Calculate the margin of error: z* × SE
  5. Construct the confidence interval: (X̄₁ - X̄₂) ± ME
Point Estimate
X̄₁ - X̄₂ = 5
SE
SE = 2.63
CI
[0.25, 9.75]
Step 1: Calculate the point estimate

X̄₁ - X̄₂ = 85 - 80 = 5

Step 2: Find the critical z-value for 95% confidence

For 95% confidence, z₀.₀₂₅ = 1.96

Step 3: Calculate the standard error

SE = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(12²/40) + (15²/50)]

= √[(144/40) + (225/50)] = √[3.6 + 4.5] = √8.1 ≈ 2.85

Step 4: Calculate the margin of error

ME = z* × SE = 1.96 × 2.85 ≈ 5.58

Step 5: Construct the confidence interval

CI = (X̄₁ - X̄₂) ± ME = 5 ± 5.58 = [-0.58, 10.58]

CI = [-0.58, 10.58]
Final answer:

We are 95% confident that the true difference in means (Group A - Group B) is between -0.58 and 10.58.

Applied rules:

• 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

Key notes:

• 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

2 Difference of Proportions
Exercise 2
In a survey, 60% of 200 urban residents (p̂₁ = 0.60) support a policy, while 45% of 150 rural residents (p̂₂ = 0.45) support the same policy. Construct a 95% confidence interval for the difference in proportions (p₁ - p₂).
Definition:

Confidence Interval for Difference of Proportions: CI = (p̂₁ - p̂₂) ± z*√[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

Point Estimate
p̂₁ - p̂₂ = 0.15
SE
SE = 0.058
CI
[0.036, 0.264]
Step 1: Calculate the point estimate

p̂₁ - p̂₂ = 0.60 - 0.45 = 0.15

Step 2: Calculate the standard error

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

Step 3: Calculate the margin of error

ME = z* × SE = 1.96 × 0.0534 ≈ 0.105

Step 4: Construct the confidence interval

CI = (p̂₁ - p̂₂) ± ME = 0.15 ± 0.105 = [0.045, 0.255]

CI = [0.045, 0.255]
Final answer:

We are 95% confident that the true difference in support proportions (Urban - Rural) is between 4.5% and 25.5%.

Applied rules:

• 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

Key notes:

• 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

3 Difference of Means (Unknown σ, Equal Variances)
Exercise 3
Two groups of students take different teaching methods. Group A (n₁ = 25) has mean X̄₁ = 82 and s₁ = 10. Group B (n₂ = 30) has mean X̄₂ = 78 and s₂ = 12. Assuming equal population variances, construct a 95% confidence interval for (μ₁ - μ₂).
Definition:

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.

Pooled SD
sp = 11.14
SE
SE = 3.15
CI
[-2.17, 10.17]
Step 1: Calculate the point estimate

X̄₁ - X̄₂ = 82 - 78 = 4

Step 2: Calculate the pooled standard deviation

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

Step 3: Calculate the standard error

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

Step 4: Determine degrees of freedom and critical t-value

df = n₁ + n₂ - 2 = 25 + 30 - 2 = 53

For 95% confidence, t₀.₀₂₅, 53 ≈ 2.006

Step 5: Calculate margin of error and construct CI

ME = t* × SE = 2.006 × 3.01 ≈ 6.04

CI = (X̄₁ - X̄₂) ± ME = 4 ± 6.04 = [-2.04, 10.04]

CI = [-2.04, 10.04]
Final answer:

We are 95% confident that the true difference in means (Method A - Method B) is between -2.04 and 10.04.

Applied rules:

• 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

Key notes:

• 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

Confidence Intervals for Differences Rules and Methods
\( CI = (\bar{X}_1 - \bar{X}_2) \pm z^* \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \)
Difference of Means (Known σ)
\( CI = (\hat{p}_1 - \hat{p}_2) \pm z^* \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}} \)
Difference of Proportions
\( CI = (\bar{X}_1 - \bar{X}_2) \pm t^* s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}} \)
Difference of Means (Equal Variances)
Means
X̄₁ - X̄₂
Point Estimate
Proportions
p̂₁ - p̂₂
Point Estimate
Variance
σ₁²/n₁ + σ₂²/n₂
Additive Property
Key definitions:

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

Complete methodology:
  1. Identify the problem type: Difference of means or difference of proportions
  2. Check conditions: Independence, normality, equal variances (if applicable)
  3. Calculate point estimate: X̄₁ - X̄₂ or p̂₁ - p̂₂
  4. Determine critical value: z or t based on known/unknown σ and confidence level
  5. Calculate standard error: Use appropriate formula for the situation
  6. Construct interval: Point estimate ± (critical value × standard error)
Tip 1: Variances add when taking differences of independent samples, not standard deviations.
Tip 2: The CLT applies to differences of sample means when n₁ ≥ 30 and n₂ ≥ 30.
Tip 3: For proportions, ensure np ≥ 10 and n(1-p) ≥ 10 for both samples.
Tip 4: Always check that samples are independent before applying these formulas.
Key insight: These distributions form the foundation for comparing two populations statistically.
Practical application: Used in A/B testing, clinical trials, and comparative studies.
Key Properties:

• 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

Solution: Exercises 4 to 5
4 Paired Differences
Exercise 4
Ten students take a pre-test and post-test after a training program. The mean difference (post - pre) is d̄ = 8.5 with standard deviation of differences sd = 4.2. Construct a 95% confidence interval for the mean difference in scores.
Definition:

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.

Given
d̄=8.5, sd=4.2, n=10
SE
SE = 1.33
CI
[5.54, 11.46]
Step 1: Calculate the standard error

SE = sd/√n = 4.2/√10 = 4.2/3.162 ≈ 1.33

Step 2: Determine degrees of freedom and critical t-value

df = n - 1 = 10 - 1 = 9

For 95% confidence, t₀.₀₂₅, 9 = 2.262

Step 3: Calculate the margin of error

ME = t* × SE = 2.262 × 1.33 ≈ 3.01

Step 4: Construct the confidence interval

CI = d̄ ± ME = 8.5 ± 3.01 = [5.49, 11.51]

Step 5: Interpret the result

Since the interval does not include 0, there's evidence of improvement after the training program

CI = [5.49, 11.51]
Final answer:

We are 95% confident that the true mean improvement in test scores after the training program is between 5.49 and 11.51 points.

Applied rules:

• 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

Key notes:

• 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

5 Real-world Application
Exercise 5
A company tests a new manufacturing process on two production lines. Line A (n₁ = 35) produces an average of 120 units per hour with σ₁ = 8. Line B (n₂ = 40) produces 115 units per hour with σ₂ = 10. Construct a 99% confidence interval for the difference in production rates and interpret the results.
Definition:

Real-world application: Using confidence intervals for differences to make practical business decisions and evaluate process improvements.

Point Estimate
X̄₁ - X̄₂ = 5
SE
SE = 1.94
CI
[0.54, 9.46]
Step 1: Calculate the point estimate

X̄₁ - X̄₂ = 120 - 115 = 5

Step 2: Calculate the standard error

SE = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(8²/35) + (10²/40)]

= √[(64/35) + (100/40)] = √[1.829 + 2.5] = √4.329 ≈ 2.08

Step 3: Find the critical z-value for 99% confidence

For 99% confidence, z₀.₀₀₅ = 2.576

Step 4: Calculate the margin of error

ME = z* × SE = 2.576 × 2.08 ≈ 5.36

Step 5: Construct the confidence interval

CI = (X̄₁ - X̄₂) ± ME = 5 ± 5.36 = [-0.36, 10.36]

Step 6: Interpret the results

The interval includes 0, suggesting no significant difference at 99% confidence

CI = [-0.36, 10.36]
Final answer:

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.

Applied rules:

• 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

Key notes:

• 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

Confidence Intervals for Differences Summary

Comprehensive Summary: Confidence Intervals for Differences

Key Definitions:

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.

Core Principles and Rules:
  1. Point Estimate: For both means and proportions, the point estimate is the difference of sample statistics
  2. Variance Addition: For independent samples, Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂)
  3. Standard Error Formula: Take the square root of the sum of individual variances
  4. Distribution Choice: Use z-distribution when σ is known, t-distribution when σ is unknown
  5. Independence Requirement: Critical assumption for variance addition property
Simple Example: Difference of Means

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]

Advanced Example: Paired Differences

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]

Tip 1: Remember that variances add, not standard deviations, when taking differences of independent samples.
Tip 2: Always verify independence of samples before applying these formulas.
Tip 3: For proportions, check that np ≥ 10 and n(1-p) ≥ 10 for both samples to ensure normal approximation validity.
Tip 4: The CLT applies to differences when both sample sizes are large enough (n₁ ≥ 30 and n₂ ≥ 30).
Common Pitfall: Adding standard deviations instead of variances when calculating the standard error of differences.
Common Mistake: Forgetting to check independence of samples before applying the variance addition property.
Key Takeaway: These distributions are fundamental for statistical inference comparing two populations or treatments.
Essential Formulas:

• 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)

Memory Techniques:

  • 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.