Stat 211: Elementary Inferential Statistics - Unit 7: Two-Sample Inference
Stat 211: Elementary Inferential Statistics - Unit 7: Two-Sample Inference
Difference Between Two Sample Means
Introduction: Until now, we focused on analyzing a single population to estimate its mean or proportion, or to test claims about one average or percentage.
In real life, we often compare different groups to determine if there is a meaningful difference between them, for example:
Is Drug A more effective than Drug B?
Do students in online classes perform as well as those in in-person classes?
Do action movies earn less at the box office than dramas?
Are people willing to pay more for used furniture from a friend than from a stranger?
These situations focus on the difference between two means.
Shift to Two Independent Samples (TIS): We will analyze two independent samples to make inferences about how their populations compare.
Notation
For Populations:
Population Mean:
For Samples:
Sample Mean:
Difference Between Means:
Statistics of Interest
How far apart two means are is more important than each mean on its own.
• Difference Between Means Notation:
Sample Statistics:
Standard Deviation of Differences: where and are the variances of the two samples, and and are the sample sizes.
Standard Error:
The Sampling Distribution
Distribution: The sampling distribution for the difference between two means is a t-distribution.
Characteristics:
Centered at the true difference between the population means: .
Spread estimated using the standard error: .
Confidence Interval for TIS:
Formula:
Calculation:
Degrees of Freedom:
Complications arise in calculating df.
Exact formula: complex weighted average (Welch-Satterthwaite equation):
Simplified:
A calculator will yield more accurate df automatically.
Example: Pay Gap
Background: According to the Bureau of Labor Statistics, earnings for men and women performing similar jobs are analyzed:
Sample statistics: 65,070 men averaged a weekly income of (SD = ), while 66,285 women averaged a weekly income of (SD = ).
Calculations:
Statistic: Difference =
Standard Error: To be calculated using formula.
95% Critical Value: To be calculated from the t-distribution table based on degrees of freedom.
Confidence Interval: Showed to be between specific bounds derived from calculations.
Interpretation: We are 95% confident that the true difference in mean weekly earnings between men and women is within the calculated range, indicating that men earn more on average.
Confidence Intervals: Difference Between Means
Using course website tools and confidence interval calculator for practical computations:
Website URL: https://sites.google.com/mix.wvu.edu/wvustat211
Calculator Functions: Select statistic of interest, enter sample statistics, use degrees of freedom methods, and calculate confidence levels.
Two-Sample Hypothesis Testing
Identify the population parameter being tested (e.g., Difference Between Means: ).
State Hypotheses:
Null Hypothesis (H0): (no difference)
Alternative Hypothesis (H1): (there is a difference)
Check Assumptions:
Random sampling from two populations
Samples must be independent
Sample size large enough () or populations are approximately normal.
Compute p-value and test statistic using t-distribution methods, which are complicated due to degrees of freedom considerations.
Decision Making:
If , reject H0; otherwise, fail to reject H0.
Conclude the result based on the hypothesis test.
Example: Used Furniture Scenario
Study focus: Evaluating average offers on used furniture based on buyer familiarity (friend vs stranger).
Offers collected through a social experiment posted on Facebook Marketplace.
Sample data:
Friend: , , , etc.
Stranger: , , , etc.
Statistical Steps:
State hypotheses, check randomness, compute test statistic, evaluate p-value, and conclude are essential parts.
It concluded that friends offer statistically significantly higher amounts.
Example: Mummy's Curse & Surgery Example
Mummy’s Curse: Comparing lifespans of those exposed and those unexposed to the tomb led to comparative statistics on average lifespan.
Surgery Treatment Comparison: Measured recovery times in different treatment groups to analyze effectiveness through hypothesis testing.
Paired Differences
Scenario: Collecting two measurements from matched or same subjects.
Estimation: The data is analyzed through focusing on differences rather than treating them as two independent samples.
Examples of paired data analyses include treatment levels, twins' IQs, and more.
Sampling Distribution: Mean differences centered around true mean difference and estimated using standard error.
Confidence Intervals for Paired Differences
Formula: Point Estimate ± Critical Value × Standard Error for paired differences.
Careful consideration of order in subtraction affects interpretation of results.
Hypothesis Testing for Paired Differences
Follow similar hypothesis testing steps with matched data.
Test Statistics and p-values calculated specifically for paired differences.
Difference Between Proportions
Explaining how to assess traits between two groups, stated as one group being more or less likely; characterized with statistical representations similar to two means.
Example scenarios include voting behavior between genders and treatment effectiveness comparisons.
Conclusion & Additional Examples
Various examples highlight hypothesis testing through practical applications (e.g., internship completion rates across majors, vaccine efficacy, etc.).
Hypothesis Testing Summary: A structured approach emphasizing the identification of parameters, stating hypotheses, checking assumptions, calculating statistics, making decisions based on p-values, and concluding results effectively.
Hypothesis Testing Cheat Sheet: Summary of test types, population parameters, sample statistics, null hypotheses, standard errors, test statistics with degrees of freedom, and assumptions necessary for valid testing across various contexts.