Assignment 1 February 15, 2008Slides by Mark Hancock
Factorial (Two-Way) ANOVA February 15, 2008Slides by Mark Hancock
You will be able to perform a factorial analysis of variance (ANOVA) and interpret the meaning of the results (both main effects and interactions). February 15, 2008Slides by Mark Hancock
Variables (Revisited) Independent Variables – a.k.a. Factors Dependent Variables – a.k.a. Measures February 15, 2008Slides by Mark Hancock
Factor e.g., technique: – TreeMap vs. Phylotrees vs. ArcTrees How many levels does the “technique” factor have? February 15, 2008Slides by Mark Hancock
Factorial Design Remember the assignment Two factors: – gender (male, female) – technique (TreeMap, Phylotrees, ArcTrees) February 15, 2008Slides by Mark Hancock
Factorial Design MaleFemale TreeMap Group 1Group 2 Phylotrees Group 3Group 4 ArcTrees Group 5Group 6 Gender Technique FactorsLevels Cells February 15, 2008Slides by Mark Hancock
How did we test these six groups? February 15, 2008Slides by Mark Hancock
What did we find out? What could we have found out? Was what we did valid? February 15, 2008Slides by Mark Hancock
Factorial ANOVA What is the null hypothesis? February 15, 2008Slides by Mark Hancock
Factorial ANOVA What are the null hypotheses? February 15, 2008Slides by Mark Hancock
Main Effects February 15, 2008Slides by Mark Hancock
Main Effects MaleFemale TreeMap µ1µ1 µ2µ2 Phylotrees µ3µ3 µ4µ4 ArcTrees µ5µ5 µ6µ6 Gender Technique µ TreeMap µ Phylotrees µ ArcTrees µ Male µ Female February 15, 2008Slides by Mark Hancock
Null Hypotheses Main effect of gender: µ Male = µ Female Main effect of technique: µ TreeMap = µ Phylotrees = µ ArcTrees February 15, 2008Slides by Mark Hancock
Example NightDay Headlights µ1µ1 µ2µ2 No Headlights µ3µ3 µ4µ4 Time of Day Lights Do headlights help see pedestrians? February 15, 2008Slides by Mark Hancock
Example NightDay Headlights good No Headlights badgood Time of Day Lights Do headlights help see pedestrians? February 15, 2008Slides by Mark Hancock
Results? Main effects – Day is “better” than night – Headlights are “better” than no headlights Is that the real story? February 15, 2008Slides by Mark Hancock
What about the cell means? What other null hypothesis could we test? µ 1 = µ 2 = … = µ 4 Why not? February 15, 2008Slides by Mark Hancock
Interactions February 15, 2008Slides by Mark Hancock
What is our third null hypothesis? e.g. conclusion: – The effect of headlights depends on whether it is day or night. Null hypothesis in words: – The main effect of one factor does not depend on the levels of another factor. February 15, 2008Slides by Mark Hancock
Alternative Hypothesis The main effect of factor X depends on the levels of factor Y. February 15, 2008Slides by Mark Hancock
Null Hypothesis Level 1Level 2 Level 1 µ 11 µ 12 Level 2 µ 21 µ 22 Level 3 µ 31 µ 32 Factor 1 Factor 2 February 15, 2008Slides by Mark Hancock
Null Hypothesis µ 11 – µ 12 = µ 21 – µ 22 = µ 31 – µ 32 In general: µ ij – µ i’j = µ ij’ – µ i’j’ for all combinations of i, i’, j, j’ February 15, 2008Slides by Mark Hancock
Null Hypothesis February 15, 2008Slides by Mark Hancock
Null Hypotheses Main effects: – row means are equal – column means are equal Interaction: – the pattern of differences in one row/column do not account for the pattern of differences in another row/column February 15, 2008Slides by Mark Hancock
Factorial ANOVA Math February 15, 2008Slides by Mark Hancock
F-scores Calculate F for each null hypothesis February 15, 2008Slides by Mark Hancock
Sum of Squares (revisited) February 15, 2008Slides by Mark Hancock
Sum of Squares (revisited) February 15, 2008Slides by Mark Hancock
Factorial ANOVA Table Degrees of Freedom Sum of Squares Mean SquareF Factor 1 Factor 2 Interaction Within Groups Total February 15, 2008Slides by Mark Hancock
Example Degrees of Freedom Sum of Squares Mean SquareF Gender Condition Gender × Condition Error (Within Groups) 9610, Total9911, February 15, 2008Slides by Mark Hancock
Break: 15 Minutes February 15, 2008Slides by Mark Hancock
Example February 15, 2008Slides by Mark Hancock
Example February 15, 2008Slides by Mark Hancock
Example SourceSS df MSFP between groups rows <.01 columns <.01 interaction ns within groups (error) TOTAL February 15, 2008Slides by Mark Hancock
Three-Way ANOVA February 15, 2008Slides by Mark Hancock
What’s different about a three-way ANOVA? February 15, 2008Slides by Mark Hancock
Example Factors: – Gender (Male, Female) – Screen Orientation (Horizontal, Vertical) – Screen Size (Small, Medium, Large) February 15, 2008Slides by Mark Hancock
Null Hypotheses Main effects – gender, screen orientation, screen size (no diff) Interactions (2-way) – gender × screen orientation – gender × screen size – screen orientation × screen size (no pattern) Interactions (3-way) – gender × screen orientation × screen size (?) February 15, 2008Slides by Mark Hancock
Three-way Alternate Hypothesis Interpretation #1: – The main effect of a factor depends on the levels of both of the other two factors Interpretation #2: – The interaction effect between two factors depends on the level of another February 15, 2008Slides by Mark Hancock
Level 1Level 2 Level 1 µ 111 µ 121 Level 2 µ 211 µ 221 Level 3 µ 311 µ 321 Factor 1 Factor 2 Level 1Level 2 Level 1 µ 112 µ 122 Level 2 µ 212 µ 222 Level 3 µ 312 µ 322 Factor 1 Factor 2 Level 1Level 2 Factor 3 February 15, 2008Slides by Mark Hancock
Factorial ANOVA Table Degrees of Freedom Sum of Squares Mean Square F Factor 1 Factor 2 Factor 3 Factor 1 × Factor 2 Factor 1 × Factor 3 Factor 2 × Factor 3 Factor 1 × Factor 2 × Factor 3 Within Groups Total February 15, 2008Slides by Mark Hancock
Between-Participants vs. Within-Participants February 15, 2008Slides by Mark Hancock
Participant Assignment Level 1Level 2 Level 1 N = 10 Level 2 N = 10 Level 3 N = 10 Factor 1 Factor 2 February 15, 2008Slides by Mark Hancock
Between Participants Level 1Level 2 Level 1 Group 1Group 2 Level 2 Group 3Group 4 Level 3 Group 5Group 6 Factor 1 Factor 2 February 15, 2008Slides by Mark Hancock
Within Participants Level 1Level 2 Level 1 Group 1 Level 2 Group 1 Level 3 Group 1 Factor 1 Factor 2 February 15, 2008Slides by Mark Hancock
Mixed Design Level 1Level 2 Level 1 Group 1Group 2 Level 2 Group 1Group 2 Level 3 Group 1Group 2 Factor 1 Factor 2 February 15, 2008Slides by Mark Hancock
How does this change the math? February 15, 2008Slides by Mark Hancock
T-test Independent Variance Paired Variance February 15, 2008Slides by Mark Hancock
One-Way ANOVA Independent Repeated Measures Degrees of Freedom Sum of Squares Mean SquareF Between Groups Within Groups Total Degrees of Freedom Sum of Squares Mean Square F Factor Subjects Error (Factor × Subjects) Total February 15, 2008Slides by Mark Hancock
Two-Way ANOVA Degrees of Freedom Sum of Squares Mean Square F Subjects Factor 1 Factor 1 × Subjects Factor 2 Factor 2 × Subjects Factor 1 × Factor 2 Factor 1 × Factor 2 × Subjects Total February 15, 2008Slides by Mark Hancock
Post-hoc Analysis February 15, 2008Slides by Mark Hancock
Main Effects Main effect for factor with two levels – No need to do post-hoc Main effect for factor with >2 levels – Same as one-way ANOVA – Pairwise t-tests February 15, 2008Slides by Mark Hancock
How do we (correctly) interpret the results when there’s an interaction effect? February 15, 2008Slides by Mark Hancock
Example There is a significant interaction between gender and technique. example answer: men were quicker with TreeMaps than with Phylotrees and ArcTrees, but women were quicker with ArcTrees than with Phylotrees and TreeMaps. February 15, 2008Slides by Mark Hancock
Example February 15, 2008Slides by Mark Hancock
Post-hoc Tests For each level of one factor – pairwise comparisons of each level of the other Hold level of one factor constant February 15, 2008Slides by Mark Hancock
Three-Way Interactions Much more difficult to interpret Same strategy: hold levels of two factors constant and perform pairwise comparisons Alternate strategy: don’t bother (use graphs) February 15, 2008Slides by Mark Hancock