Difference of sample means: The sampling distribution of X̄₁ - X̄₂ has mean μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂ and standard deviation σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)]
- Identify the population parameters: μ₁, μ₂, σ₁, σ₂
- Identify the sample sizes: n₁, n₂
- Calculate the mean of the difference: μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂
- Calculate the standard deviation of the difference: σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)]
μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂ = 100 - 95 = 5
Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂) = (σ₁²/n₁) + (σ₂²/n₂)
= (15²/25) + (12²/36) = (225/25) + (144/36) = 9 + 4 = 13
σₓ̄₁₋ₓ̄₂ = √13 ≈ 3.61
The sampling distribution of X̄₁ - X̄₂ has mean 5 and standard deviation 3.61
The sampling distribution of X̄₁ - X̄₂ has mean μ = 5 and standard deviation σ ≈ 3.61
• Mean of difference: μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂
• Variance of difference: Var(X̄₁ - X̄₂) = Var(X̄₁) + Var(X̄₂) for independent samples
• Standard error formula: σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)]
• The mean of the difference is simply the difference of the means
• The variances add when taking differences of independent samples
• This forms the basis for two-sample t-tests and confidence intervals
Difference of sample proportions: The sampling distribution of p̂₁ - p̂₂ has mean μₚ̂₁₋ₚ̂₂ = p₁ - p₂ and standard deviation σₚ̂₁₋ₚ̂₂ = √[(p₁(1-p₁)/n₁) + (p₂(1-p₂)/n₂)]
μₚ̂₁₋ₚ̂₂ = p₁ - p₂ = 0.4 - 0.3 = 0.1
Var(p̂₁ - p̂₂) = Var(p̂₁) + Var(p̂₂) = [p₁(1-p₁)/n₁] + [p₂(1-p₂)/n₂]
= [0.4(1-0.4)/100] + [0.3(1-0.3)/150]
= [0.4(0.6)/100] + [0.3(0.7)/150] = [0.24/100] + [0.21/150]
= 0.0024 + 0.0014 = 0.0038
σₚ̂₁₋ₚ̂₂ = √0.0038 ≈ 0.0616
The sampling distribution of p̂₁ - p̂₂ has mean 0.1 and standard deviation 0.0616
The sampling distribution of p̂₁ - p̂₂ has mean μ = 0.1 and standard deviation σ ≈ 0.0616
• Mean of difference: μₚ̂₁₋ₚ̂₂ = p₁ - p₂
• Variance of difference: Var(p̂₁ - p̂₂) = Var(p̂₁) + Var(p̂₂)
• Proportion standard error: σₚ̂₁₋ₚ̂₂ = √[(p₁(1-p₁)/n₁) + (p₂(1-p₂)/n₂)]
• For proportions, we use the formula p(1-p)/n for variance
• The standard error decreases as sample sizes increase
• This is used in comparing proportions between groups
Normal approximation for differences: For large samples, the sampling distribution of X̄₁ - X̄₂ is approximately normal with mean μ₁ - μ₂ and standard deviation √[(σ₁²/n₁) + (σ₂²/n₂)]
μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂ = 85 - 82 = 3
σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(10²/50) + (12²/60)]
= √[(100/50) + (144/60)] = √[2 + 2.4] = √4.4 ≈ 2.098
z = (X̄₁ - X̄₂ - μₓ̄₁₋ₓ̄₂)/σₓ̄₁₋ₓ̄₂ = (5 - 3)/2.098 ≈ 0.953
P(X̄₁ - X̄₂ > 5) = P(Z > 0.953) = 1 - P(Z ≤ 0.953) = 1 - 0.8293 = 0.1707
There is a 17.07% chance that the difference in sample means exceeds 5 points
The probability that the difference in sample means is greater than 5 points is approximately 0.1707 or 17.07%
• CLT for differences: n₁ = 50 ≥ 30 and n₂ = 60 ≥ 30, so normal approximation is valid
• Standardization: Use z-score formula for differences of means
• Probability calculation: Convert to standard normal using calculated parameters
• The actual difference (3 points) is less than the threshold (5 points)
• This explains why the probability is relatively low (17.07%)
• This calculation is fundamental for hypothesis testing between two groups
Difference of Sample Means: X̄₁ - X̄₂, the difference between two sample averages
Difference of Sample Proportions: p̂₁ - p̂₂, the difference between two sample proportions
Sampling Distribution: The probability distribution of a statistic obtained from repeated sampling
Independence: Samples must be independent for variance addition property
- Identify the problem type: Difference of means or difference of proportions
- Check conditions: Sample sizes and independence requirements
- Calculate mean of sampling distribution: μ₁ - μ₂ or p₁ - p₂
- Calculate standard deviation: Use appropriate formula for means or proportions
- Standardize if needed: Use z-score formula for probability calculations
• Mean of difference: μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂ or μₚ̂₁₋ₚ̂₂ = 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)
Standard error of difference of proportions: Measures the variability in the difference between two sample proportions across different samples
SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
p̂₁(1-p̂₁)/n₁ = 0.65(1-0.65)/200 = 0.65(0.35)/200 = 0.2275/200 = 0.0011375
p̂₂(1-p̂₂)/n₂ = 0.55(1-0.55)/250 = 0.55(0.45)/250 = 0.2475/250 = 0.00099
SE = √[0.0011375 + 0.00099] = √0.0021275 ≈ 0.0461
The observed difference of 0.10 is about 2.17 standard errors away from zero
The standard error of the difference in sample proportions is approximately 0.0461. The observed difference of 0.10 is more than 2 standard errors, suggesting a meaningful difference between urban and rural preferences.
• Proportion variance: Use p̂(1-p̂)/n for estimated variance
• Standard error: Add variances then take square root
• Interpretation: Compare observed difference to standard error magnitude
• A difference of 0.10 that is more than 2 standard errors is considered statistically significant
• Larger sample sizes would reduce the standard error, increasing precision
• This calculation is the basis for confidence intervals and hypothesis tests for two proportions
Real-world application: Using sampling distributions for differences to make probabilistic statements about treatment effects
μₓ̄₁₋ₓ̄₂ = X̄₁ - X̄₂ = 78 - 75 = 3
σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)] = √[(8²/40) + (10²/35)]
= √[(64/40) + (100/35)] = √[1.6 + 2.857] = √4.457 ≈ 2.11
We want P(X̄₁ - X̄₂ ≥ 2)
z = (2 - 3)/2.11 = -1/2.11 ≈ -0.474
P(X̄₁ - X̄₂ ≥ 2) = P(Z ≥ -0.474) = P(Z ≤ 0.474) = 0.6808
There is a 68.08% chance that the new method shows at least a 2-point advantage
The probability that the new teaching method shows at least a 2-point advantage over the traditional method is approximately 0.6808 or 68.08%
• CLT for differences: Both sample sizes are large enough (n₁ = 40, n₂ = 35)
• Standard error calculation: Combine variances of both groups
• Probability interpretation: Moderate probability suggests the difference is plausible
• The actual difference (3 points) is larger than the threshold (2 points)
• This explains the high probability (68.08%) of exceeding the 2-point threshold
• Such calculations help determine the effectiveness of interventions
Comprehensive Summary: Sampling Distributions 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₂)].
Independence: Samples must be independently drawn from their respective populations for the variance addition property to hold.
Standard Error: The standard deviation of the sampling distribution of a statistic, measuring the precision of the estimate.
- Mean of Difference: For both means and proportions, the mean of the sampling distribution of the difference equals the difference of the population parameters
- 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
- Normal Approximation: Applies when sample sizes are large (typically n ≥ 30 for means, np ≥ 10 and n(1-p) ≥ 10 for proportions)
- Independence Requirement: Critical assumption for variance addition property
Population 1: μ₁ = 100, σ₁ = 10, n₁ = 25
Population 2: μ₂ = 95, σ₂ = 8, n₂ = 25
Mean of X̄₁ - X̄₂ = 100 - 95 = 5
Std dev of X̄₁ - X̄₂ = √[(10²/25) + (8²/25)] = √[4 + 2.56] = √6.56 ≈ 2.56
Sample 1: p̂₁ = 0.6, n₁ = 100
Sample 2: p̂₂ = 0.4, n₂ = 150
Mean of p̂₁ - p̂₂ = 0.6 - 0.4 = 0.2
Std error of p̂₁ - p̂₂ = √[(0.6×0.4/100) + (0.4×0.6/150)] = √[0.0024 + 0.0016] = √0.004 ≈ 0.0632
• Difference of means: μₓ̄₁₋ₓ̄₂ = μ₁ - μ₂, σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)]
• Difference of proportions: μₚ̂₁₋ₚ̂₂ = p₁ - p₂, σₚ̂₁₋ₚ̂₂ = √[(p₁(1-p₁)/n₁) + (p₂(1-p₂)/n₂)]
• Z-score for differences: z = [(X̄₁ - X̄₂) - (μ₁ - μ₂)] / √[(σ₁²/n₁) + (σ₂²/n₂)]
- Means: μ = μ₁ - μ₂, σ² = σ₁²/n₁ + σ₂²/n₂
- Proportions: μ = p₁ - p₂, σ² = 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 happens to the sampling distribution of the difference when the sample sizes are very different, like n₁ = 1000 and n₂ = 10?
Answer: When sample sizes are very different, the smaller sample size dominates the variability of the difference. Let me explain:
The standard error formula is: σₓ̄₁₋ₓ̄₂ = √[(σ₁²/n₁) + (σ₂²/n₂)]
If n₁ = 1000 and n₂ = 10, then σ₁²/n₁ will be very small (because of the large denominator), while σ₂²/n₂ will be much larger (because of the small denominator).
For example, if σ₁ = σ₂ = 10:
- σ₁²/n₁ = 100/1000 = 0.1
- σ₂²/n₂ = 100/10 = 10
- Total variance = 0.1 + 10 = 10.1
- Standard error ≈ √10.1 ≈ 3.18
Notice how the smaller sample (n₂ = 10) contributes most of the variability to the difference. This is why balanced sample sizes are often preferred in experimental design.
Question: How do I know when I can use the normal approximation for the difference of two sample proportions?
Answer: For the normal approximation to be valid for the difference of two sample proportions, you need to check the success-failure condition for BOTH samples:
For Sample 1: n₁p̂₁ ≥ 10 AND n₁(1-p̂₁) ≥ 10
For Sample 2: n₂p̂₂ ≥ 10 AND n₂(1-p̂₂) ≥ 10
Let's say Sample 1 has n₁ = 100 and p̂₁ = 0.15:
- n₁p̂₁ = 100 × 0.15 = 15 ≥ 10 ✓
- n₁(1-p̂₁) = 100 × 0.85 = 85 ≥ 10 ✓
Let's say Sample 2 has n₂ = 80 and p̂₂ = 0.05:
- n₂p̂₂ = 80 × 0.05 = 4 < 10 ✗
- n₂(1-p̂₂) = 80 × 0.95 = 76 ≥ 10 ✓
In this case, we CANNOT use the normal approximation because Sample 2 fails the success-failure condition.
If the conditions aren't met, alternative methods like exact tests may be needed.
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 does the sampling distribution of differences relate to confidence intervals and hypothesis testing?
Answer: The sampling distribution of differences is fundamental to both confidence intervals and hypothesis testing:
Confidence Intervals: (X̄₁ - X̄₂) ± z*(SE), where SE = √[(σ₁²/n₁) + (σ₂²/n₂)]
Hypothesis Testing: The test statistic is: z = [(X̄₁ - X̄₂) - (μ₁ - μ₂)] / √[(σ₁²/n₁) + (σ₂²/n₂)]
For example, if testing H₀: μ₁ - μ₂ = 0 (no difference), the test statistic becomes: z = (X̄₁ - X̄₂) / √[(σ₁²/n₁) + (σ₂²/n₂)]
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.