Analysis of Variance (ANOVA)

Presentation on theme: "Analysis of Variance (ANOVA)"— Presentation transcript:

Analysis of Variance (ANOVA)
Developing Study Skills and Research Methods (HL20107) Dr James Betts

Lecture Outline: Multiple Comparisons and Type I Errors
1-way ANOVA for Unpaired data 1-way ANOVA for Paired Data Factorial Research Designs.

Males Females

What is Analysis of Variance?
ANOVA is an inferential test designed for use with 3 or more data sets t-tests are just a form of ANOVA for 2 groups ANOVA only interested in establishing the existence of a statistical differences, not their direction (last slide) Based upon an F value (R. A. Fisher) which reflects the ratio between systematic and random/error variance…

Dependent Variable Independent Variable Total Variance between means Systematic Variance Extraneous/ Confounding (Error) Variables Error Variance

Group A Group B Group C

Group A Group B Group C

Procedure for computing 1-way ANOVA for independent samples
Step 1: Complete the table i.e. -square each raw score -total the raw scores for each group -total the squared scores for each group.

Procedure for computing 1-way ANOVA for independent samples
Step 2: Calculate the Grand Total correction factor GT = = (X)2 N (XA+XB+XC)2 N

Procedure for computing 1-way ANOVA for independent samples
Step 3: Compute total Sum of Squares SStotal= X2 - GT = (XA2+XB2+XC2) - GT

Procedure for computing 1-way ANOVA for independent samples
Step 4: Compute between groups Sum of Squares SSbet= GT = GT (X)2 n (XA)2 (XB)2 (XC)2 nA nB nC

Procedure for computing 1-way ANOVA for independent samples
Step 5: Compute within groups Sum of Squares SSwit= SStotal - SSbet

Procedure for computing 1-way ANOVA for independent samples
Step 6: Determine the d.f. for each sum of squares dftotal= (N - 1) dfbet= (k - 1) dfwit= (N - k)

Procedure for computing 1-way ANOVA for independent samples
Step 7/8: Estimate the Variances & Compute F = Systematic Variance (between means) SSbet dfbet Error Variance (within means) SSwit dfwit

Procedure for computing 1-way ANOVA for independent samples
Step 9: Consult F distribution table -d1 is your df for the numerator (i.e. systematic variance) -d2 is your df for the denominator (i.e. error variance)

Independent 1-way ANOVA: SPSS Output

Group A Trial 1 Group B Trial 2 Group C Trial 3

Procedure for computing 1-way ANOVA for paired samples
Step 1: Complete the table i.e. -square each raw score -total the raw scores for each trial & subject -total the squared scores for each trial & subject.

Procedure for computing 1-way ANOVA for paired samples
Step 2: Calculate the Grand Total correction factor GT = = = = 54.6 (X)2 N (X1+X2+X3)2 N ( )2 …so GT just as with unpaired data 12

Procedure for computing 1-way ANOVA for paired samples
Step 3: Compute total Sum of Squares SStotal= X2 - GT = (X12+X22+X32) - GT

Procedure for computing 1-way ANOVA for paired samples
Step 4: Compute between trials Sum of Squares SSbetT= GT = GT (XT)2 nT (X1)2 (X2)2 (X3)2 n1 n2 n3

Procedure for computing 1-way ANOVA for paired samples
Step 5: Compute between subjects Sum of Squares SSbetS= GT = GT (XS)2 nT (XT)2 (XD)2 (XH)2 (XJ)2 nT nD nH nJ

Procedure for computing 1-way ANOVA for paired samples
Step 6: Compute interaction Sum of Squares SSint= SStotal - (SSbetT + SSbetS)

Procedure for computing 1-way ANOVA for paired samples
Step 7: Determine the d.f. for each sum of squares dftotal= (N - 1) dfbetT= (k - 1) dfbetS= (r - 1) dfint= (r-1)(k-1) = dfbetT x dfbetS

Procedure for computing 1-way ANOVA for paired samples
Step 8/9: Estimate the Variances & Compute F values = Systematic Variance (between trials IV) SSbetT dfbetT Systematic Variance (between subjects) SSbetS dfbetS SSint Error Variance dfint

Procedure for computing 1-way ANOVA for paired samples
Step 10: Consult F distribution table as before

Paired 1-way ANOVA: SPSS Output

Introduction to 2-way ANOVA
Next week we will continue to work through some examples of 2-way ANOVA (i.e. factorial designs) However, you will come across 2-way ANOVA in this week’s lab class so there are a few terms & concepts that you should be aware of in advance...

Factorial Designs: Technical Terms
Levels Main Effect Interaction Effect

Factorial Designs: Multiple IV’s
Hypothesis: The HR response to exercise is mediated by gender We now have three questions to answer: 1) 2) 3)

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise Not significant 180 150 Heart Rate (beatsmin-1) 120 Main Effect of Gender Not significant 90 60 Exercise*Gender Interaction Not significant 30 Resting Exercise

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise Significant 180 150 Heart Rate (beatsmin-1) 120 Main Effect of Gender Not significant 90 60 Exercise*Gender Interaction Not significant 30 Resting Exercise

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise Not significant 180 150 Heart Rate (beatsmin-1) 120 Main Effect of Gender Significant 90 60 Exercise*Gender Interaction Not significant 30 Resting Exercise

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise Not significant 180 150 Heart Rate (beatsmin-1) 120 Main Effect of Gender Not Significant 90 60 Exercise*Gender Interaction Significant 30 Resting Exercise

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise 180 150 ? Heart Rate (beatsmin-1) 120 Main Effect of Gender 90 60 Exercise*Gender Interaction 30 Resting Exercise

Main Effect of Exercise Exercise*Gender Interaction
Factorial Designs: Interpretation 210 Main Effect of Exercise 180 150 Heart Rate (beatsmin-1) 120 ? Main Effect of Gender 90 60 Exercise*Gender Interaction 30 Resting Exercise

2-way mixed model ANOVA: Partitioning
Systematic Variance (resting vs exercise) = variance between means due to Systematic Variance (male vs female) = variance between means due to Systematic Variance (Interaction) = variance between means due to Error Variance (within subjects) = uncontrolled factors plus random changes within individuals for rest vs exercise Error Variance (between subjects) = uncontrolled factors and within group differences for males vs females.

So for a fully unpaired design
2-way mixed model ANOVA Systematic Variance (resting vs exercise) So for a fully unpaired design e.g. males vs females & rest group vs exercise group …between subject variance (i.e. SD) has a negative impact upon all contrasts Systematic Variance (male vs female) Systematic Variance (Interaction) Error Variance (within subjects) Error Variance (between subjects)

Refer back to this ‘partitioning’ in your lab class
2-way mixed model ANOVA Systematic Variance (resting vs exercise) …but for a fully paired design e.g. morning vs evening & rest vs exercise …between subject variance (i.e. SD) can be removed from all contrasts. Systematic Variance (am vs pm) Systematic Variance (Interaction) Error Variance (within subjectsexercise) Error Variance (within subjectstime) Error Variance (within subjectsinteract) Refer back to this ‘partitioning’ in your lab class