Lecture 26 - Inference for Means: Comparing Independent Populations and Excel Procedures
Administrative Reminders and Excel Assignment Overview
Assignment Deadlines: Today, May 22, is the final day for students to finalize details regarding their Excel assignments. Students must either see the instructor in person or send an email regarding the peer component they wish to undertake.
Question 1: Regression Analysis: This topic has not been covered yet. It will be addressed next week, after which students can attempt this portion of the assignment.
Question 2: Sampling Distributions and the Central Limit Theorem: This topic was covered multiple weeks ago, including a live class demonstration. Students should be fully prepared to handle this question using Excel.
Question 3: Polling Data and Proportions:
Methodology Critique: The first part requires a critique of data collection methods, identifying population of interest and sampling frames.
Coverage Error: A specific type of error occurring when a sampling frame (the list of all units that can be sampled) does not clearly reflect the population as a whole. It results from a poor sampling frame lacking complete coverage.
Hypothesis Testing for Proportions: Students must evaluate if it is plausible that a candidate (e.g., Donald Trump) will receive more than 50% of the vote using a one-sided hypothesis test in Excel. Correct null () and alternative () hypotheses must be stated.
Confidence Intervals: Students must calculate a 95% confidence interval based on a claim that a candidate might receive as low as 40% of the vote.
Chi-Square Test: Question 3d involves using a pivot table for a two-by-two contingency table and a chi-square test, which has not yet been taught.
Question 4: Experimental Data with Means:
Experimental Design: Students must distinguish between a randomized experiment and an observational study, focusing on concepts like random assignment.
Flow Diagrams: Requirement to layout a completely randomized design or a block design.
Placebos: Understanding the role of a standard feed group acting as a placebo.
t-tests: Includes a one-sample t-test (comparing a mean to a fixed value like ) and a two-sample t-test (comparing two different means).
ANOVA (Analysis of Variance): Used for comparing more than two populations; scheduled for next week.
Fundamental Principles of Statistical Inference
The Inference Framework:
Population Parameters: Fixed and unknown values we wish to estimate (e.g., population mean or population proportion ).
Sample Statistics: Calculated values from a representative sample used to make inferences about parameters (e.g., sample mean or sample proportion ).
Types of Procedures:
Hypothesis Tests: Checking the plausibility of a specific hypothesized value (e.g., testing if the average New Zealand wage is precisely ).
Confidence Intervals: Providing a range of plausible values (e.g., stating the average wage is between and ).
Estimation with Two Independent Populations
Conceptual Shift: Moving from a single population (e.g., average wages of New Zealanders) to comparing two independent populations (e.g., average wages of New Zealanders vs. Australians).
Definition of Independence: Two separate populations where the observations in one do not influence the observations in the other.
Examples of Comparative Studies:
Average lengths of black rats vs. brown rats.
VCS graduates vs. BMS (Bachelor of Management Studies) graduates.
Service time for manual customer service vs. self-service machines or AI.
Weight gain across different experimental groups (e.g., the chicken feed study).
The Parameter of Interest: The difference between two population means, expressed mathematically as .
The Statistic of Interest: The difference between the two sample means, expressed as .
The Visualization Model:
Population 1: Parameters include , , and size .
Population 2: Parameters include , , and size .
Samples: A sample is taken from each, producing , , and , , .
Hypothesis Testing Procedure for Two Means
Step 1: Construct Hypothesis Statements:
Null Hypothesis (): . This states there is no difference between the two population means ().
Alternative Hypothesis (): . This states that a difference exists (two-sided test).
Step 2: Collect Data and Compute Test Statistic:
The test statistic () follows the structure: .
The formula is: .
Note: The "- 0" represents the hypothesized difference from .
Step 3: Degrees of Freedom ():
Simplified estimation: .
Advanced computation: Welch’s Theorem/Approximation is used by computers (like Excel) for a more precise degree of freedom calculation.
Step 4: Find the p-value:
Calculated using Excel or t-distribution tables.
For a two-sided test, the p-value represents the probability of observing a difference as large as the one found (in either direction) if the null hypothesis is true.
Step 5: Make a Decision:
If p-value < (level of significance, usually ), reject .
If p-value > , fail to reject .
Step 6: Contextualize: Interpret the results in terms of the specific study (e.g., "There is a significant difference in wages between countries").
Case Study: Diet Weight Loss Analysis
Scenario: A dietitian compares a "New Diet" (low fat/carb) against a "Current Diet."
Setup: Randomized experiment with (New) and (Current). Weight loss recorded over three weeks.
Data Analysis:
(New Diet)
(Current Diet)
Calculations:
Test Statistic ():
Interpretation: The observed difference is standard errors away from the hypothesized difference of zero.
Degrees of Freedom: .
p-value: Determined to be between and via tables; Excel calculation gives precise p-value of .
Result: Since , we reject the null hypothesis. There is statistically significant evidence of a difference in weight loss between the two diets in the population.
Excel Implementation: Data Analysis Toolpack
Path: Data > Data Analysis > t-Test: Two-Sample Assuming Unequal Variances.
Inputs:
Variable 1 Range: Column for Diet 1 (e.g., ).
Variable 2 Range: Column for Diet 2 (e.g., ).
Hypothesized Mean Difference: .
Labels: Check if row 1 contains headers.
Alpha: .
Output Terms:
Variance: Square of the standard deviation ().
t Stat: The calculated test statistic ().
P(T <= t) one-tail: p-value for a one-sided test.
P(T <= t) two-tail: p-value for a two-sided test.
Confidence Intervals for the Difference Between Two Means
Purpose: To determine the magnitude and range of plausible values for the difference , rather than just testing for zero.
Formula: .
Components:
Sample Estimate: .
Multiplier (): Found using t-tables at the intersection of confidence level and degrees of freedom.
Margin of Error (): Multiplier Standard Error.
Diet Example Interval Results:
Lower Limit:
Upper Limit:
Interpretation: We are 95% confident that the difference in average weight loss between Diet 1 and Diet 2 in the population is between and .
Comparison of Sampling Designs
Independent Samples: Two distinct populations (e.g., Group A vs. Group B).
Dependent (Paired) Samples: Two observations from the same population units (e.g., weight measured "Before" and "After" for the same group of people). This requires a different statistical procedure.
Multiple Populations: When comparing more than two groups (e.g., 3, 10, or 100 different feed types), ANOVA is used.