Mean Differences Slides Mean Differences
Unlocking the Sampling Distribution of \(\bar{x}_1 - \bar{x}_2\)
Advanced Statistics Unit
\(\sigma_{\bar{x}_1 - \bar{x}_2}\)
The Height Question
If we take a random sample of 50 men and 50 women, we expect the average heights to be different.
But what does the distribution of that difference look like if we repeat the process thousands of times?
The Parameter vs. The Statistic
Population Parameter
\[ \mu_1 - \mu_2 \]
The true difference in population means.
Sample Statistic
\[ \bar{x}_1 - \bar{x}_2 \]
The observed difference between sample means.
Shape & Center
1
Center: The mean of the differences is the difference of the means.
\[ \mu_{\bar{x}_1 - \bar{x}_2} = \mu_1 - \mu_2 \]
2
Shape: Normal if both populations are Normal OR if \(n_1 \ge 30\) and \(n_2 \ge 30\) (CLT).
The Variance Summation Rule
When we subtract two random variables, their variances still add (as long as they are independent).
\[ \sigma^2_{\bar{x}_1 - \bar{x}_2} = \sigma^2_{\bar{x}_1} + \sigma^2_{\bar{x}_2} \]
\[ \sigma_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \]
Standard deviation is the square root of the sum of variances.
Independence Requirements
Between Groups
The two samples must be independent of each other (e.g., men vs. women, Group A vs. Group B).
Within Groups
Individual observations within each sample must be independent (use the 10% rule if sampling without replacement).
Key Takeaways
Mean of difference = Difference of means.
Variances add even when subtracting means.
Normal shape is maintained under CLT or Normality.
Ready to calculate the standard error? Turn to your practice sheet.
Variance Summation Worksheet Variance Summation
Statistics: Differences in Means
Name:
Date:
Quick Reference
Mean of the Difference:
\[ \mu_{\bar{x}_1 - \bar{x}_2} = \mu_1 - \mu_2 \]
Standard Deviation of the Difference:
\[ \sigma_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \]
1. Conceptual Check: Why do we add variances when we are subtracting means? Explain in terms of uncertainty and variability.
2. The 10% Rule: Why is it critical to check that each sample size is less than 10% of its respective population before using the standard deviation formula above?
Calculation Scenarios
Scenario A: Test Scores. In School 1, scores follow \(N(75, 8)\). In School 2, scores follow \(N(72, 10)\). A random sample of 40 students is taken from School 1 and 50 students from School 2.
a) Calculate the mean of the sampling distribution of the difference in sample means \((\bar{x}_1 - \bar{x}_2)\).
b) Calculate the standard deviation of the sampling distribution of the difference in sample means.
Scenario B: Battery Life. Brand X batteries have a mean life of 500 hours with \(\sigma = 30\). Brand Y batteries have a mean life of 485 hours with \(\sigma = 45\). Samples of \(n_X = 36\) and \(n_Y = 36\) are selected independently.
a) Verify the Normality condition for the sampling distribution of \(\bar{x}_X - \bar{x}_Y\).
b) Calculate the probability that the difference in sample means \(\bar{x}_X - \bar{x}_Y\) is greater than 20 hours.
Variance Summation Key Answer Key
Variance Summation Worksheet
Teacher Resource
Unit: Independent Means
1. Conceptual Check
When you combine two variables, whether by adding or subtracting them, the total uncertainty (variability) always increases. Even if the means are subtracted, the potential for error from the first sample is combined with the potential for error from the second sample. Variance is always additive for independent random variables.
2. The 10% Rule
The 10% rule ensures that observations within a sample are "effectively" independent when sampling without replacement. If we sample more than 10% of a population, the probability of selecting certain individuals changes significantly with each pick, violating the independence required for the variance summation formula.
Scenario A: Test Scores
a) Mean Calculation:
\[ \mu_{\bar{x}_1 - \bar{x}_2} = 75 - 72 = 3 \text{ points} \]
b) Standard Deviation Calculation:
\[ \sigma_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{8^2}{40} + \frac{10^2}{50}} = \sqrt{\frac{64}{40} + \frac{100}{50}} = \sqrt{1.6 + 2} = \sqrt{3.6} \]
\[ \approx 1.897 \text{ points} \]
Scenario B: Battery Life
a) Normality Condition:
The populations are not stated to be Normal. However, since \(n_X = 36 \ge 30\) and \(n_Y = 36 \ge 30\), the Central Limit Theorem (CLT) applies to both sample means. Therefore, the sampling distribution of the difference \(\bar{x}_X - \bar{x}_Y\) will be approximately Normal.
b) Probability Calculation:
Step 1: Find Mean and SD
\[ \mu = 500 - 485 = 15 \]
\[ \sigma = \sqrt{\frac{30^2}{36} + \frac{45^2}{36}} = \sqrt{\frac{900}{36} + \frac{2025}{36}} = \sqrt{25 + 56.25} = \sqrt{81.25} \approx 9.014 \]
Step 2: Find Z-score for Difference > 20
\[ z = \frac{20 - 15}{9.014} = \frac{5}{9.014} \approx 0.5547 \]
Step 3: Probability
\[ P(Z > 0.5547) \approx 1 - 0.7105 = 0.2895 \]
Two Sample t-Interval Slides T-Intervals
Estimating the Difference Between Two Independent Means
Lesson 02: Constructing Confidence
The Objective
We want to estimate the true difference between two population means \(\mu_1 - \mu_2\).
The Point Estimate
\[ \bar{x}_1 - \bar{x}_2 \]
The Construction
\[ (\bar{x}_1 - \bar{x}_2) \pm t^* \cdot \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \]
Estimate
Difference in Means
Critical Value
Based on df
Standard Error
Estimated Sigma
The df Dilemma
Determining \(t^*\) requires knowing the Degrees of Freedom. We have two options:
Conservative Method
Use the smaller of \(n_1 - 1\) or \(n_2 - 1\).
Easier for hand calculations; safer estimate.
Formulaic Method
Calculated by your technology (Satterthwaite approximation).
More precise; usually non-integer results.
Validity Conditions
Random
Two independent random samples OR random assignment to two treatment groups.
Independent (10% Rule)
If sampling without replacement, \(n_1 < 10\% N_1\) and \(n_2 < 10\% N_2\).
Normal / Large Sample
Both populations are Normal OR both \(n \ge 30\). If samples are small, check for strong skew/outliers.
The Interpretation Script
"We are C% confident that the interval from Lower to Upper captures the true difference in the means of Population 1 and Population 2."
Pro Tip:
Does the interval include zero? If so, we can't definitively say there's a difference between the populations.
Confidence Interval Builder Worksheet Difference Estimate
Constructing Two-Sample t-Intervals
Name:
Date:
The Research Case
A psychologist wants to estimate the difference in reaction times between individuals who have consumed caffeine and those who have not. A random sample of 25 caffeine drinkers (\(n_1\)) showed a mean reaction time of 0.48 seconds with a standard deviation of 0.05 seconds. A separate independent random sample of 22 non-caffeine drinkers (\(n_2\)) showed a mean reaction time of 0.53 seconds with a standard deviation of 0.08 seconds.
1. STATE: What parameter do you want to estimate, and at what confidence level?
Define \(\mu_1 - \mu_2\) and choose a confidence level (default to 95%)...
2. PLAN: Identify the appropriate inference method and check conditions.
Random
10% Rule
Normal/Large
3. DO: Perform the calculations.
Degrees of Freedom (Conservative):
Critical Value (\(t^*\)):
Show calculation for the interval:
4. CONCLUDE: Interpret your results in context.
Challenge Question:
Based on your interval, is there convincing evidence that caffeine changes reaction time? Explain why or why not using your calculated values.
Confidence Interval Builder Key Answer Key
Confidence Interval Builder Worksheet
Teacher Resource
Unit: Independent Means
1. STATE
Estimate \(\mu_1 - \mu_2\) at the 95% confidence level, where \(\mu_1\) is the true mean reaction time for caffeine drinkers and \(\mu_2\) is the true mean reaction time for non-caffeine drinkers.
2. PLAN: Two-Sample t-interval
Random
Stated: "A random sample of 25 caffeine drinkers... separate independent random sample of 22..."
10% Rule
Assume
Assume 25 is < 10% of all caffeine drinkers and 22 is < 10% of all non-drinkers.
Normal/Large
Check
Samples are < 30. We must assume the populations of reaction times are approximately normal.
3. DO
df (Conservative)
\[ \min(25-1, 22-1) = 21 \]
Critical Value (\(t^*\))
\[ t^* = 2.080 \]
\[ (0.48 - 0.53) \pm 2.080 \cdot \sqrt{\frac{0.05^2}{25} + \frac{0.08^2}{22}} \]
\[ -0.05 \pm 2.080 \cdot \sqrt{0.0001 + 0.00029} \]
\[ -0.05 \pm 2.080 \cdot (0.0197) \]
\[ -0.05 \pm 0.041 \implies (-0.091, -0.009) \]
4. CONCLUDE
"We are 95% confident that the interval from -0.091 to -0.009 seconds captures the true difference in the mean reaction times between caffeine drinkers and non-caffeine drinkers."
Challenge Answer:
Yes. Since zero is not included in the interval, there is convincing evidence that there is a difference in mean reaction times. In fact, caffeine drinkers seem to have faster reaction times (negative difference \(\bar{x}_1 - \bar{x}_2\)).
Two Sample t-Test Slides T-Tests
Hypothesis Testing for Two Independent Means
Lesson 03: Significance Testing
The Core Question
Are the differences we see in our samples large enough to prove that the populations are actually different, or is it just "luck of the draw"?
Option A
The null hypothesis is true. The difference in samples is just sampling variability.
Option B
The alternative is true. There is a real effect or difference in the populations.
Null & Alternative
Null Hypothesis (\(H_0\)):
\[ H_0: \mu_1 - \mu_2 = 0 \]
"No difference exists."
Alternative Hypothesis (\(H_a\)):
\[ \mu_1 - \mu_2 > 0 \]
Right-Tail
\[ \mu_1 - \mu_2 < 0 \]
Left-Tail
\[ \mu_1 - \mu_2 \neq 0 \]
Two-Tail
The T-Statistic
How many standard errors is our sample difference away from zero?
\[ t = \frac{(\bar{x}_1 - \bar{x}_2) - 0}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} \]
Numerator: Observed Difference
Denominator: Standard Error
High T-score = Low P-value = Strong Evidence
The P-Value Threshold
\(P < \alpha\)
Reject \(H_0\). We have convincing evidence.
\(P \ge \alpha\)
Fail to Reject \(H_0\). No evidence of a difference.
Using Technology
TI-84 Commands
1. Press STAT
2. Arrow to TESTS
3. Select 4: 2-SampTTest
4. Enter data or stats.
5. Set Pooled: NO
Why Pooled: NO?
Pooling assumes population variances are exactly equal. This is rarely true in the real world. Selecting NO is the safer, standard procedure.
Significance Testing Worksheet Significance Check
Two-Sample t-Tests for Means
Name:
Date:
Case Study: Breakfast vs. Grades
Researchers want to know if students who eat breakfast daily have higher GPAs than those who don't. They take random samples from each group.
Breakfast Group (\(n_1=45\))
\(\bar{x}_1 = 3.42\)
\(s_1 = 0.51\)
No Breakfast Group (\(n_2=40\))
\(\bar{x}_2 = 3.15\)
\(s_2 = 0.62\)
a) State the null and alternative hypotheses. Be sure to define your parameters.
b) Calculate the t-test statistic. (Show the setup!)
c) df (Conservative):
d) P-value (Approximate range):
e) At \(\alpha = 0.05\), what is your conclusion? Write it in context.
Concept Deep-Dive
1. Critical Value vs. P-value: If your t-statistic is larger than the critical value for a given \(\alpha\), will your p-value be smaller or larger than \(\alpha\)? Explain.
2. The "0.05" Myth: Suppose you get a p-value of 0.06. Your teacher says "fail to reject," but a doctor says "this looks very promising for a life-saving drug." Why might the doctor care more than the statistician?
Significance Testing Key Answer Key
Significance Testing Worksheet
Teacher Resource
Unit: Independent Means
Case Study: Breakfast vs. Grades
a) Hypotheses
\[ H_0: \mu_1 - \mu_2 = 0 \]
\[ H_a: \mu_1 - \mu_2 > 0 \]
Where \(\mu_1\) is the true mean GPA of students who eat breakfast and \(\mu_2\) is the true mean GPA of students who don't.
b) T-Test Statistic
\[ t = \frac{3.42 - 3.15}{\sqrt{\frac{0.51^2}{45} + \frac{0.62^2}{40}}} = \frac{0.27}{\sqrt{0.00578 + 0.00961}} = \frac{0.27}{0.124} \]
\[ t \approx 2.177 \]
c) df (Conservative)
\[ \min(45-1, 40-1) = 39 \]
d) P-value Range
\[ 0.01 < P < 0.02 \text{ (one-tail)} \]
e) Conclusion (\(\alpha = 0.05\))
"Since the p-value (\(\approx 0.017\)) is less than \(\alpha = 0.05\), we reject the null hypothesis. There is convincing evidence that students who eat breakfast daily have a higher true mean GPA than students who do not."
Concept Deep-Dive
1. Critical Value vs. P-value
The p-value will be smaller than \(\alpha\). If the t-statistic is larger than the critical value, it has landed in the "rejection region" (the tail), which by definition contains less area (probability) than the total \(\alpha\) area.
2. The "0.05" Myth
Statistical significance (0.05) is an arbitrary cutoff. Practical significance (effect size) matters more in fields like medicine. A p-value of 0.06 still suggests the data is quite unlikely under the null, and if the potential benefit is high, the drug is still worth investigating.
Robustness Slides Robustness
Analyzing Assumptions & The Reliability of T-Procedures
Lesson 04: Assessing Validity
The Normality Condition
T-procedures are designed for Normal populations. But what if we don't know the population shape?
Sample Size \(n \ge 30\)
The Central Limit Theorem (CLT) saves us! The sampling distribution will be approximately normal regardless of population shape.
Sample Size \(n < 30\)
We must look at the sample data to look for clues about the population shape.
Defining "Robust"
"An inference procedure is robust if the probability calculations (P-values or Confidence Levels) remain fairly accurate even when a condition is slightly violated."
The Good News:
Two-sample t-procedures are more robust than one-sample procedures, especially when \(n_1 = n_2\).
When to Stop
Avoid T-procedures for small samples if you see:
Strong Skew
Data piled high on one side.
Extreme Outliers
Single points far from the rest.
Small Samples
Especially \(n < 15\) with any non-normality.
The Detective's Toolkit
Boxplots
Best for identifying outliers and observing symmetry.
Normal Probability Plots
The goal is a linear pattern. Curvature indicates non-normality in the population.
"If it's nearly linear, t-procedures are clear!"
Decision Matrix
Sample Size Condition \(n < 15\) Use t only if data is close to Normal (no skew/outliers). \(15 \le n < 30\) Use t except in the presence of extreme outliers or strong skewness. \(n \ge 30\) Use t even for clearly skewed distributions (thanks to CLT).
Assumptions Lab Worksheet Data Detective
Assessing Assumptions and Robustness
Name:
Date:
The Protocol
As a researcher, you must decide whether to trust the results of your t-test. For each case below, analyze the data description and the graphical findings. Circle your decision and justify it based on the robustness guidelines.
Case #1: Sleep Studies
Sample Sizes: \(n_1 = 12, n_2 = 12\)
Graphical Finding
"The boxplots are remarkably symmetric with no outliers. The Normal Probability Plot for both samples shows a very linear pattern."
Can we proceed with a 2-sample t-test?
YES
NO
Justification...
Case #2: Wage Inequality
Sample Sizes: \(n_1 = 45, n_2 = 52\)
Graphical Finding
"Both samples are strongly right-skewed, showing several high-income outliers. The populations of incomes are known to be non-normal."
Can we proceed with a 2-sample t-test?
YES
NO
Justification...
Case #3: Plant Growth Lab
Sample Sizes: \(n_1 = 8, n_2 = 10\)
Graphical Finding
"One sample is symmetric, but the other shows a significant outlier on the high end and moderate left skewness."
Can we proceed with a 2-sample t-test?
YES
NO
Justification...
Assumptions Lab Key Answer Key
Assumptions Lab Worksheet
Teacher Resource
Unit: Independent Means
Case #1: Sleep Studies
Decision: YES
Justification:
While the sample size is small (\(n < 15\)), the graphical evidence shows strong symmetry and linearity. T-procedures are valid when the sample data suggests the parent populations are approximately normal and there are no outliers.
Case #2: Wage Inequality
Decision: YES
Justification:
The large sample sizes (\(n_1, n_2 \ge 30\)) allow us to invoke the Central Limit Theorem. Even though the populations and samples are skewed with outliers, the sampling distribution of the difference in means will be approximately normal. T-procedures are robust to non-normality with large samples.
Case #3: Plant Growth Lab
Decision: NO
Justification:
The sample sizes are very small (\(n < 15\)) and one sample shows both skewness and a significant outlier. T-procedures are not robust to outliers or strong skewness when sample sizes are small. The results would be unreliable. An alternative non-parametric test or a larger sample is needed.
Medical Trial Data Packet Restricted Access
Clinical Trial Data Packet
Trial ID: NEX-2026-B | Status: Preliminary Analysis
Treatment Overview
Nexalin-B is a new pharmaceutical compound designed to reduce systemic inflammation. In this phase-II trial, researchers randomly assigned 60 volunteer patients with chronic inflammatory markers to two groups: the Nexalin Group (Treatment) and the Placebo Group (Control).
Following a 30-day trial period, patients were tested for C-Reactive Protein (CRP) levels, measured in mg/L. Lower CRP levels indicate reduced inflammation.
Trial Results: CRP Levels (mg/L)
Group A: Nexalin-B
Patient Sample Size (\(n_T = 30\))
1.2
0.8
2.1
1.5
1.1
0.9
2.4
1.3
1.7
0.6
1.8
1.2
1.4
1.0
2.0
1.1
0.7
1.5
1.2
1.9
1.4
1.6
1.3
0.8
1.2
1.5
1.1
1.4
1.7
0.9
Summary Stats:
\(\bar{x}_T = 1.343 \quad s_T = 0.441\)
Group B: Placebo
Patient Sample Size (\(n_C = 30\))
2.5
1.8
2.1
2.9
3.4
1.9
2.2
2.5
3.1
2.0
2.7
2.4
2.1
1.7
3.0
2.8
2.3
2.6
3.2
1.9
2.5
2.1
2.4
2.9
2.7
3.3
2.2
2.5
2.0
2.6
Summary Stats:
\(\bar{x}_C = 2.473 \quad s_C = 0.443\)
The Directive
Conduct a formal hypothesis test at the \(\alpha = 0.01\) significance level to determine if Nexalin-B significantly lowers CRP levels compared to a placebo. Following your analysis, calculate a 99% confidence interval for the difference in mean CRP levels.
Final reports must include: State, Plan, Do, Conclude.
Stat Report Template Worksheet Efficacy Report: Nexalin-B
Lead Statistician: ________________________________
Part I: Significance Test (\(\alpha = 0.01\))
1. State
Define hypotheses and parameters...
2. Plan
Random
Independence
Normal/Large
3. Do
t-statistic
P-value
Show calculations or calculator input...
4. Conclude
Part II: Interval Estimation (99% CI)
Calculation for 99% CI
Use the formula or calculator...
Interpretation
Final FDA Recommendation
Based on your statistical findings, should Nexalin-B be approved for further clinical testing? Discuss the practical significance of the mean reduction in CRP.
Medical Trial Exemplar Key Analysis Exemplar
Case Study: Medical Treatment Efficacy
Part I: Significance Test (\(\alpha = 0.01\))
1. State
\[ H_0: \mu_T - \mu_C = 0 \quad (\text{No difference}) \]
\[ H_a: \mu_T - \mu_C < 0 \quad (\text{Nexalin-B lowers CRP}) \]
Where \(\mu_T\) is the true mean CRP level for Nexalin-B patients and \(\mu_C\) is for placebo patients.
2. Plan
Random: Patients were randomly assigned to treatment and control groups.
Independence: 60 volunteers is likely < 10% of all chronic inflammation sufferers. Independent groups.
Normal/Large: \(n_T = 30\) and \(n_C = 30\). Both meet the Large Sample condition (\(n \ge 30\)), so CLT applies.
3. Do
\[ t = \frac{1.343 - 2.473}{\sqrt{\frac{0.441^2}{30} + \frac{0.443^2}{30}}} = \frac{-1.13}{0.1141} \approx -9.90 \]
\[ P\text{-value} \approx 0 \quad (df \approx 57.99) \]
4. Conclude
"Since the p-value (\(\approx 0\)) is less than \(\alpha = 0.01\), we reject the null hypothesis. There is overwhelming evidence that Nexalin-B significantly reduces mean CRP levels in patients compared to a placebo."
Part II: Interval Estimation (99% CI)
Calculation
\[ (-1.13) \pm 2.663 \cdot (0.1141) \]
\[ -1.13 \pm 0.304 \]
\[ (-1.434, -0.826) \text{ mg/L} \]
"We are 99% confident that Nexalin-B reduces the true mean CRP levels by between 0.826 and 1.434 mg/L compared to a placebo."
FDA Recommendation Exemplar
The drug should be approved for Phase-III testing. Not only is the result statistically significant (\(p < 0.0001\)), but the magnitude of the effect (over 1.1 mg/L reduction on average) is practically significant, as it represents a nearly 45% reduction in baseline inflammation markers compared to the control group.