Introduction to One-Way ANOVA and Post-Hoc Analysis
Course Logistics and Administrative Updates
- Canvas Outage: Due to the Canvas outage occurring on Friday and Saturday, course materials will be posted on Ed discussion if outages happen again. Lectures and labs will proceed as normal during outages.
- Quiz Extensions:
- Course 02/2008: The previous week's quiz has been extended by an extra two days (available today and tomorrow).
- Course 306: No changes were made as the quiz was already scheduled to remain open until Wednesday.
- Module Overview: This week continues the focus on comparing groups using Null Hypothesis Significance Testing (NHST), specifically moving into ANOVA (Analysis of Variance).
Why a New Test is Necessary: Beyond the T-Test
- Limitations of T-Tests: While t-tests are used to compare means between two groups, they are insufficient for studies involving three or more groups.
- The Problem of Multiple Comparisons: Running multiple t-tests for every possible pair of conditions in a large dataset is bad statistical practice because it increases the chance of a Type I error (false positive).
- Each t-test has a chance () of finding a false positive if no effect exists.
- Running many tests cumulatively increases this risk far beyond .
- Proposed Solutions:
- Bonferroni Correction: Taking the significance level () and dividing it by the number of tests (). While valid, this still results in a long, complex list of pairwise comparisons.
- Omnibus Test: A general term for a test that analyzes multiple things at once. ANOVA is an omnibus test that provides a succinct answer as to whether a difference exists anywhere between groups.
Definitions and Terminology
- ANOVA: A contraction of "Analysis of Variance."
- Factor: The term typically used in ANOVA to describe the predictor variable (e.g., pet ownership).
- Levels: The groups or conditions within a factor (e.g., if pet ownership is the factor, "dog owner" and "cat owner" are levels).
- One-Way ANOVA: The "one-way" refers to the number of factors (predictor variables) involved. A one-way ANOVA has one factor with three or more levels and one continuous outcome measure.
The Logic and Mechanism of ANOVA
Partitioning Variance: ANOVA examines the total variability in a dataset and divides it into two sources:
- Between-Group Variation: Variability caused by the differences between the group means. This represents the influence of the predictor variable.
- Within-Group Variation (Residual/Leftover): Variability that exists within each group which cannot be explained by group membership. This is also called residual variation.
The Concept of Residuals: A residual is the difference between an individual data point and the mean value of its group ().
The F-Statistic: The test statistic for ANOVA is the value, named after Ronald Fisher. It is a ratio of between-group variability to within-group (residual) variability:
Interpreting F:
- If groups are clearly separated (large mean differences relative to small within-group spread), the ratio will be large.
- A large value suggests it is unlikely the results occurred by chance alone.
The F-Distribution
- Shape: Unlike the symmetrical t-distribution, the F-distribution is asymmetrical, positive, and typically skewed.
- Parameters: The exact shape of the F-distribution is determined by two degrees of freedom () parameters:
- First Parameter (): Related to the number of groups in the predictor.
- Second Parameter (): Related to the number of participants (sample size).
- Values: Because it is a ratio of variances, an value cannot be negative.
Hypotheses in ANOVA
- Non-Directional Nature: Unlike t-tests, ANOVA does not require choosing between one-sided or two-sided tests or directional/non-directional hypotheses. The hypotheses are always standard:
- Null Hypothesis (): Every group has exactly the same mean ().
- Alternative Hypothesis (): At least one pair of groups has a different mean from one another.
- Testing: We look only at the upper tail of the F-distribution to determine if the calculated is large enough to be considered unlikely under the null hypothesis.
Assumptions of One-Way ANOVA
To ensure the validity of a one-way ANOVA, three primary assumptions must be met:
- Independence: Every measurement must come from different individuals (similar to an independent samples t-test).
- Normality of Residuals: The residuals (the difference between each point and its group mean) should be normally distributed. This is often checked using the Shapiro-Wilk test.
- A non-significant p-value in Shapiro-Wilk suggests the assumption is met.
- Homogeneity of Variance: The spread (variance) of data must be approximately equal across all groups. This is also known as homoscedasticity.
- This is tested using Levene’s test (sometimes called the Homogeneity test in software like Jamovi).
- If variances are "homogenous," they are equal across groups.
Worked Example: Generosity Study
- Research Question: Does reflecting on different life experiences (positive, negative, or neutral) affect generosity?
- Design:
- Participants: , randomly assigned to three conditions ( per group).
- Predictor (Factor): Reflection condition (Levels: Positive Event, Negative Event, Neutral/Breakfast).
- Outcome: Amount of money (from a reimbursement) donated to charity.
- Hypotheses:
- :
- : At least one group mean is different.
- Descriptive Statistics: Numerically, reflecting on negative events led to higher donations (e.g., more than the positive condition).
- ANOVA Results:
- Conclusion: Reject the null hypothesis. There is a significant difference among the groups.
Post-Hoc (Follow-up) Testing
- The Need for Follow-ups: An omnibus ANOVA tells you a difference exists, but not where or between which specific groups.
- Tukey’s Honest Significant Difference (HSD) Test:
- Commonly used post-hoc test that runs all possible pairwise comparisons.
- It automatically adjusts p-values to prevent the inflation of false positives (maintaining the "honest" probability).
- When to Use: Only conduct follow-up tests if the initial omnibus ANOVA is significant.
- Example Results Matrix (Comparison of P-values):
- Positive vs. Negative: (Significant)
- Positive vs. Control: Large p-value (Not Significant)
- Negative vs. Control: Significant
Results Reporting Standards
- Step 1: Report the Omnibus Test: State the result without specifying direction.
- Example: "A one-way ANOVA suggests reflecting on different life events led to different donation amounts, , ."
- Step 2: Report Follow-up Comparisons: Explicitly state which groups differed and include mean differences and p-values.
- Example: "Tukey HSD tests indicated that participants reflecting on negative experiences donated more than the control group ( difference, significant) and more than those reflecting on positive events ( difference, significant)."
Questions & Discussion
- Question 1: Which test is a one-way ANOVA most like?
- Response: An independent samples t-test. Both compare different groups of people, but ANOVA handles three or more groups while the t-test handles only two.
- Question 2: What properties are true of both ANOVA and t-tests?
- Discussion Points: Both test for differences between means, involve calculating a test statistic, and have a maximum of one continuous outcome variable.
- Key Differences: T-tests can be one-sided or two-sided; ANOVA is not categorized this way. ANOVA is an omnibus test; a t-test is not.
- Question 3: What is a similarity between Cohen’s d and Tukey HSD?
- Response: Both are only typically run if the main test (t-test or ANOVA) returns a significant result. However, they serve different purposes: Cohen's d measures effect size (magnitude), while Tukey HSD identifies the location of the effect (which groups differ).