Docsity

lecture about two way anova, Slides of Statistics

Partial preview of the text

Download lecture about two way anova and more Slides Statistics in PDF only on Docsity!

TWO-WAY ANOVA

Two-Way ANOVA Sources of Variation

Total Variation

Variation Due to

Treatment A

Variation Due to

Random Sampling

Variation Due to

Interaction

  • SS E
  • SS A

SS

AB

SS

T

Variation Due to

Treatment B

SS

B

Two-Way ANOVA Equations

๐‘ฌ

Equations
SST

Total Variation

SSA

Variation due to factor A ๐‘ ๐‘›ฦด เท ๐‘–= 1 ๐‘Ž (๐’™๐’Š โˆ’ เดจ๐’™) ๐Ÿ SSB Variation due to factor B ๐‘Ž ๐‘›ฦด เท ๐‘—= 1 ๐‘ (๐’™๐’‹ โˆ’ เดจ๐’™) ๐Ÿ SSAB Variation due to interaction A and B ๐‘› ฦด เท ๐‘–= 1 ๐‘Ž เท ๐‘—= 1 ๐‘ ( ๐‘ฅาง๐‘–๐‘— โˆ’ ๐‘ฅาง๐‘– โˆ’ ๐‘ฅ๐‘—าง + ๐‘ฅำ–) 2 = เท ๐’Š=๐Ÿ ๐’‚ เท ๐’‹=๐Ÿ ๐’ƒ เท ๐’Œ=๐Ÿ ๐’ ฦด (๐’™๐’Š๐’‹๐’Œ โˆ’ เดจ๐’™)

๐Ÿ SSE

Inherent variation (Error)

๐’Š=๐Ÿ ๐’‚ เท ๐’‹=๐Ÿ ๐’ƒ เท ๐’Œ=๐Ÿ ๐’ ฦด (๐’™๐’Š๐’‹๐’Œ โˆ’ เดฅ๐’™๐’Š๐’‹) ๐Ÿ

Two-Way ANOVA Equations

Where:

เดจ๐’™ = Grand Mean

เดฅ๐’™๐’Š = Mean of each level of factor A

๐’‹ =^ Mean of each level of factor B

เดฅ๐’™๐’Š๐’‹ = Mean of each cell

a = number of levels of factors A

b = number of levels of factors B

๐‘› ฦด = number of replications in each cell

N = total number of observations in all cells

Summary Table Source of Variation Degree of freedom Sum of square Mean square F-Statistic Factor A a- (^1) SS A

MSA

= SSA/(a-1)

Factor B b- (^1) SS B

MSB

= SSB/(b-1)

Interaction (a-1)(b-1) (^) SS AB

MSAB

= SSAB/(a-1)(b-1)

Error / Within ab(n-1) (^) SS E

MSE

= SSE/(N-ab)

Total abn- (^1) SS T

Features of Two-Way ANOVA

  • Degree of freedom always add up
    • N-1 = (N-ab) + (a-1) + (b-1) + (a-1)(b-1)
    • Total = error + factor A + factor B + interaction
  • The denominator of F Test is always the same, but the

numerator is different.

  • The sums of squares always add up
    • SST = SSE + SSA + SSB + SSAB
    • Total = error + factor A + factor B + interaction

Two-Way ANOVA: Example

Step2: Calculate the test statistic

Source of Variation Degree of freedom Sum of square Mean square F-Statistic Gender a- (^1) SS A MSA^

FA

Age b- (^1) SS B MSB

FB

Interaction (a-1)(b-1) (^) SSAB MSAB FAB Error / Within ab(n-1) (^) SS E MSE

Total abn- (^1) SS T

Two-Way ANOVA: Example

Step 2.1: Create Mean Table

10 Years Old 11 Years Old 12 Years Old Boys

Girls

Two-Way ANOVA: Example

Step 2.2: Calculate SS

of Factor 1 (Gender)

SS gender = SSb+SSg

MEAN เดฅ๐’™

Boys 7. Girls 10.

BOYs B-Mean Grand mean Deviation Squared 4 7.67 9 -1.33 1. 6 7.67 9 -1.33 1. 8 7.67 9 -1.33 1. 6 7.67 9 -1.33 1. 6 7.67 9 -1.33 1. 9 7.67 9 -1.33 1. 8 7.67 9 -1.33 1. 9 7.67 9 -1.33 1. 13 7.67 9 -1.33 1. SS boy = 15. Girls G-Mean Grand mean Deviation Squared 4 10.33 9 1.33 1. 8 10.33 9 1.33 1. 9 10.33 9 1.33 1. 7 10.33 9 1.33 1. 10 10.33 9 1.33 1. 13 10.33 9 1.33 1. 12 10.33 9 1.33 1. 14 10.33 9 1.33 1. 16 10.33 9 1.33 1. SS girl = 15.

Two-Way ANOVA: Example

Step 2.3: Calculate SS of Factor 2 (Age)

SS age = SS

10Y

+ SS

11Y

+ SS

12Y

MEAN เดฅ๐’™

10Y 6. 11Y 8. 12T 12

10 Y 10 Y mean Grand mean Deviation Squared 4 6.5 9 -2.5 6. 6 6.5 9 -2.5 6. 8 6.5 9 -2.5 6. 4 6.5 9 -2.5 6. 8 6.5 9 -2.5 6. 9 6.5 9 -2.5 6. SS 10Y= 37. 11 Y 11 Y Mean Grand mean Deviation Squared 6 8.5 9 -0.5 0. 6 8.5 9 -0.5 0. 9 8.5 9 -0.5 0. 7 8.5 9 -0.5 0. 10 8.5 9 -0.5 0. 13 8.5 9 -0.5 0. SS 11Y= 1. 12Y 12Y Mean Grand mean Deviation Squared 8 12 9 3 9. 9 12 9 3 9. 13 12 9 3 9. 12 12 9 3 9. 14 12 9 3 9. 16 12 9 3 9. SS 12Y = 54.

Two-Way ANOVA: Example

Step2: Calculate the test statistic

Then MS

gender

and MS

Age

can be calculated

Source of Variation Degree of freedom Sum of square Mean square F-Statistic Gender (^1) 31.84 MSA FA Age (^2 93) MS B

FB

Interaction (a-1)(b-1) (^) SSAB MSAB FAB Error / Within ab(n-1) (^) SS E MSE

Total abn- (^1) SS T

Two-Way ANOVA: Example

Step2: Calculate the test statistic

So, Whatโ€™s next ????

Source of Variation Degree of freedom Sum of square Mean square F-Statistic Gender (^1) 31.84 MSA = 31.84 FA Age (^2 93) MS B = 46.^

FB

Interaction (a-1)(b-1) (^) SSAB MSAB FAB Error / Within ab(n-1) (^) SS E MSE

Total abn- (^1) SS T

Two-Way ANOVA: Example

Step2: Calculate the test statistic

This will lead to F-Statistic for Factor A and B

Source of Variation Degree of freedom Sum of square Mean square F-Statistic Gender (^1) 31.84 MSA = 31.84 FA Age (^2 93) MS B = 46.^

FB

Interaction (a-1)(b-1) (^) SSAB MSAB FAB Error / Within (^12 68) MS E=^ 5.^

Total abn- (^1) SS T

Two-Way ANOVA: Example

Step2: Calculate the test statistic

Source of Variation Degree of freedom Sum of square Mean square F-Statistic Gender (^1) 31.84 MSA = 31.84 FA^ = 5. Age (^2 93) MS B = 46.^

FB^ = 8.

Interaction (a-1)(b-1) (^) SSAB MSAB FAB Error / Within (^12 68) MS E=^ 5.^

Total abn- (^1) SS T