TWO-WAY
ANOVA
(ANALYSIS OF VARIANCE)
HISTORY
ANOVA was developed by statistician and evolutionary
biologist Ronald Fisher. In 1925, Ronal Fisher mentions
the two-way ANOVA in his celebrated book from
1925, Statistical Methods for Research Workers
(chapters 7 and 8).
WHAT IS THE TEST FOR?
Are used to evaluate effects of two Independent
Variables on a Dependent Variable
Can determine individual and combined effects of the
Independent Variables
A two-way ANOVA test analyzes the effect of the
independent variables on the expected outcome along
with their relationship to the outcome itself.
TYPE OF DATA
Two Nominal Independent Variables with two or more
categories
Continuous or Interval Dependent Variable
WHY USE TWO-WAY ANOVAS
To evaluate effects of two Independent Variables, it is
more efficient to do a single study than two studies with
one Independent Variable each.
Can explore interactions between variables.
ASSUMPTIONS
Assumption #1: Your dependent variable should be measured
at the continuous level (i.e., they are interval or ratio
variables).
Assumption #2: Your two independent variables should each
consist of two or more categorical, independent groups.
Assumption #3: You should have the independence of
observations, which means that there is no relationship
between the observations in each group or between the
groups themselves.
Assumption #4: There should be no significant outliers.
Outliers are data points within your data that do not follow the
usual pattern
Assumption #5: Your dependent variable should be
approximately normally distributed for each combination of
the groups of the two independent variables.
Assumption #6: There needs to be the homogeneity of
variances for each combination of the groups of the two
independent variables.
Determine whether gender or age group
impacts the test scores or both factors
impact the variation of test scores.
ESTABLISH HYPOTHESIS
H0 : Gender will have no significant effect on students
score
H0 : Age will have no significant effect on students
score
H0 : Gender and age will have no significant effect on
students score
GENDER SCORE AGE GROUP
boys 4 10 year olds
boys 6 10 year olds
boys 8 10 year olds
girls 4 10 year olds
girls 8 10 year olds
girls 9 10 year olds
boys 6 11 year olds
boys 6 11 year olds
boys 9 11 year olds
girls 7 11 year olds
girls 10 11 year olds
girls 13 11 year olds
boys 8 12 year olds
boys 9 12 year olds
boys 13 12 year olds
girls 12 12 year olds
girls 14 12 year olds
girls 16 12 year olds
FACTORS
GENDER AGE
Sum of Degrees of
Variance Source Mean square F ratio
squares Freedom
Sum of squares of 1st factor
(gender)
Sum of squares of 2nd
factor (age)
Sum of squares within
(error)
Sum of squares both
factors (interaction)
Sum of squares total
SUM OF SQUARES
SUM OF SQUARES OF 1ST FACTOR (GENDER)
+
SUM OF SQUARES OF 2ND FACTOR (AGE)
+
SUM OF SQUARES WITHIN (ERROR)
+
TOTAL SUM OF SQUARES OF BOTH FACTORS (INTERACTION)
__________________________________________________________
SUM OF SQUARES TOTAL
BOYS GIRLS
10 yr. olds 11 yr. olds 12 yr. olds 10yr. olds 11yr. olds 12 yr. olds
4 6 8 4 7 12
6 6 9 8 10 14
8 9 13 9 13 16
x̅ = 6 x̅ = 7 x̅ = 10 x̅ = 7 x̅ = 10 x̅ = 14
MEANx TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9
SUM OF SQUARES OF 1ST FACTOR (GENDER)
+
SUM OF SQUARES OF 2ND FACTOR (AGE)
+
SUM OF SQUARES WITHIN (ERROR)
+
TOTAL SUM OF SQUARES OF BOTH FACTORS (INTERACTION)
__________________________________________________________
SUM OF SQUARES TOTAL
SUM OF SQUARES OF 1ST FACTOR (GENDER)
GENDER SCORE AGE GROUP GENDER SCORE AGE GROUP
boys 4 10 year olds girls 4 10 year olds
boys 6 10 year olds girls 8 10 year olds
boys 8 10 year olds girls 9 10 year olds
boys 6 11 year olds girls 7 11 year olds
boys 6 11 year olds girls 10 11 year olds
boys 9 11 year olds girls 13 11 year olds
boys 8 12 year olds girls 12 12 year olds
boys 9 12 year olds girls 14 12 year olds
boys 13 12 year olds girls 16 12 year olds
BOYS
10 yr. olds 11 yr. olds 12 yr. olds
4 6 8
6 6 9
8 9 13
MEAN TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7 Boys Mean
Girls 7 10 14 10.3
Average 6.5 8.5 12 9 Grand mean
GRAND
BOYS
SCORE MEAN
MEAN
4 7.7 - 9= (-1.3) =
2 1.8
6 7.7 - 9= (-1.3) =
2 1.8
8 7.7 - 9= (-1.3) =
2 1.8
6 7.7 - 9= (-1.3) =
2 1.8
6 7.7 - 9= (-1.3) =
2 1.8
9 7.7 - 9= (-1.3) =
2 1.8
8 7.7 - 9= (-1.3) =
2 1.8
9 7.7 - 9= (-1.3) =
2 1.8
13 7.7 - 9= (-1.3) =
2 1.8
Sum of squares = 16
GIRLS
10yr. olds 11yr. olds 12 yr. olds
4 7 12
8 10 14
9 13 16
MEAN TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3 Girls mean
Average 6.5 8.5 12 9 Grand mean
GRAND
GIRLS
SCORE MEAN
MEAN
4 10.3 - 9= (-1.3) =
2 1.8
8 10.3 - 9= (-1.3) =
2 1.8
9 10.3 - 9= (-1.3) =
2 1.8
7 10.3 - 9= (-1.3) =
2 1.8
10 10.3 - 9= (-1.3) =
2 1.8
13 10.3 - 9= (-1.3) =
2 1.8
12 10.3 - 9= (-1.3) =
2 1.8
14 10.3 - 9= (-1.3) =
2 1.8
16 10.3 - 9= (-1.3) =
2 1.8
Sum of squares = 16
SUM OF SQUARES FOR 1ST FACTOR (GENDER)
SSA = 16 + 16
= 32
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32
(gender)
Sum of squares of 2nd
factor (age)
Sum of squares within
(error)
Sum of squares both
factors (interaction)
Sum of squares total
SUM OF SQUARES OF 1ST FACTOR (GENDER) 32
+
SUM OF SQUARES OF 2ND FACTOR (AGE)
+
SUM OF SQUARES WITHIN (ERROR)
+
TOTAL SUM OF SQUARES OF BOTH FACTORS (INTERACTION)
__________________________________________________________
SUM OF SQUARES TOTAL
SUM OF SQUARES OF FACTORS (AGE)
GENDER SCORE AGE GROUP GENDER SCORE AGE GROUP
boys 4 10 year olds boys 6 11 year olds
boys 6 10 year olds boys 6 11 year olds
boys 8 10 year olds boys 9 11 year olds
girls 4 10 year olds girls 7 11 year olds
girls 8 10 year olds girls 10 11 year olds
girls 9 10 year olds girls 13 11 year olds
GENDERSCORE AGE GROUP
boys 8 12 year olds
boys 9 12 year olds
boys 13 12 year olds
girls 12 12 year olds
girls 14 12 year olds
girls 16 12 year olds
BOYS GIRLS
10 yr. olds 11 yr. olds 12 yr. olds 10yr. olds 11yr. olds 12 yr. olds
4 6 8 4 7 12
6 6 9 8 10 14
8 9 13 9 13 16
x̅ = 6 x̅ = 7 x̅ = 10 x̅ = 7 x̅ = 10 x̅ = 14
MEANx TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9 Grand mean
Age mean
GRAND
Boys Age
SCORE MEAN
Mean
4 6.5 - 9= (-2.5) =
2 6.3
6 6.5 - 9= (-2.5) =
2 6.3
8 6.5 - 9= (-2.5) =
2 6.3
6 8.5 - 9= (-0.5) =
2 0.25
6 8.5 - 9= (-0.5) =
2 0.25
9 8.5 - 9= (-0.5) =
2 0.25
8 12 - 9= (3) =
2 9
9 12 - 9= (3) =
2 9
13 12 - 9= (3) =
2 9
Sum of squares = 46.5
Girls GRAND
SCORE Age MEAN
Mean
4 6.5 - 9= (-2.5) =
2 6.3
8 6.5 - 9= (-2.5) =
2 6.3
9 6.5 - 9= (-2.5) =
2 6.3
7 8.5 - 9= (-0.5) =
2 0.25
10 8.5 - 9= (-0.5) =
2 0.25
13 8.5 - 9= (-0.5) =
2 0.25
12 12 - 9= (3) =
2 9
14 12 - 9= (3) =
2 9
16 12 - 9= (3) =
2 9
Sum of squares = 46.5
SUM OF SQUARES FOR 2ND FACTOR (AGE)
SSB = 46.5 + 46.5
= 93
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32
(gender)
Sum of squares of 2nd
93
factor (age)
Sum of squares within
(error)
Sum of squares both
factors (interaction)
Sum of squares total
SUM OF SQUARES OF 1ST FACTOR (GENDER) 32
+
SUM OF SQUARES OF 2ND FACTOR (AGE) 93
+
SUM OF SQUARES WITHIN (ERROR)
+
TOTAL SUM OF SQUARES OF BOTH FACTORS (INTERACTION)
__________________________________________________________
SUM OF SQUARES TOTAL
BOYS
10 yr. olds 11 yr. olds 12 yr. olds
4 6 8
6 6 9
8 9 13
MEAN TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9
Age
Boys
Mean
SCORE
4 - 6 (-2.) =
2 4
6 - 6 (0) =
2 0
8 - 6 (2) =
2 4
6 - 7 (-2) =
2 4
6 - 7 (-1) =
2 1
9 - 7 (2) =
2 4
8 - 10 (-2) =
2 4
9 - 10 (-1) =
2 1
13 - 10 (3) =
2 9
Sum of squares = 28
GIRLS
10yr. olds 11yr. olds 12 yr. olds
4 7 12
8 10 14
9 13 16
MEAN TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9
Age
Girls
Mean
SCORE
4 - 7 (-3.) =
2 9
8 - 7 (-1) =
2 1
9 - 7 (2) =
2 4
7 - 10 (-3) =
2 9
10 - 10 (0) =
2 0
13 - 10 (3) =
2 9
12 - 14 (-2) =
2 4
14 - 14 (0) =
2 0
16 - 14 (2) =
2 4
Sum of squares = 40
SUM OF SQUARES WITHIN(ERROR)
SSE = 28 + 40
= 68
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32
(gender)
Sum of squares of 2nd
93
factor (age)
Sum of squares within
68
(error)
Sum of squares both
factors (interaction)
Sum of squares total
SUM OF SQUARES OF 1ST FACTOR (GENDER) 32
+
SUM OF SQUARES OF 2ND FACTOR (AGE) 93
+
SUM OF SQUARES WITHIN (ERROR)
+
TOTAL SUM OF SQUARES OF BOTH FACTORS (INTERACTION)
__________________________________________________________
SUM OF SQUARES TOTAL
BOYS GIRLS
10 yr. olds 11 yr. olds 12 yr. olds 10yr. olds 11yr. olds 12 yr. olds
4 6 8 4 7 12
6 6 9 8 10 14
8 9 13 9 13 16
x̅ = 6 x̅ = 7 x̅ = 10 x̅ = 7 x̅ = 10 x̅ = 14
MEANx TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9
Girls SCORE Grand Mean
4 - 9= (-5)
2 = 25
6 9= (-3)
2
= 9
8 - 9= (-1)
2 = 1
6 9= (-3)
2 = 9
6 - 9= (-3) =
2 9
9 9= (0)
2 = 0
8 - 9= (-1) =
2 1
9 9= (0)
2 = 0
13 - 9= (4)
2 = 16
4 9= (-5)
2 = 25
8 - 9= (1)
2 = 1
9 9= (0)
2 = 0
7 - 9= (-2)
2 = 4
10 9= (1)
2 = 1
13 - 9= (4)
2 = 16
12 9= (-3)
2 = 9 Sum of squares =
14 - 9= (5)
2 = 25 200
16 9= (7)
2 = 49
SUM OF SQUARES TOTAL
SST = 200
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32
(gender)
Sum of squares of 2nd
93
factor (age)
Sum of squares within
68
(error)
Sum of squares both
factors (interaction)
Sum of squares total 200
SUM OF SQUARES OF BOTH FACTORS
SSAB = SST - SSA - SSB – SSE
= 200 – 32 – 93 – 68
=7
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32
(gender)
Sum of squares of 2nd
93
factor (age)
Sum of squares within
68
(error)
Sum of squares both 7
factors (interaction)
Sum of squares total 200
DEGREES OF FREEDOM
MEAN TABLE
10 yr. olds 11 yr. olds 12 yr. olds Average
Boys 6 7 10 7.7
Girls 7 10 14 10.3
Average 6.5 8.5 12 9
Degrees of Freedom of Degrees of Freedom ssB
ssA df = Number of column – 1
df = Number of rows -1 =3–1
= 2-1 =2
=1
BOYS GIRLS
10 yr. olds 11 yr. olds 12 yr. olds 10yr. olds 11yr. olds 12 yr. olds
4 6 8 4 7 12
6 6 9 8 10 14
8 9 13 9 13 16
n-1 n-1 n-1 n-1 n-1 n-1
3-1 3-1 3-1 3-1 3-1 3-1
2 2 2 2 2 2
df = 2 + 2 +2 + 2 + 2 + 2
= 12
DEGREE OF FREEDOM OF SSAB
= DEGREE OF FREEDOM OF SSA X DEGREE OF
FREEDOM OF SSB
=1X2
=2
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor
32 1
(gender)
Sum of squares of 2nd
93 2
factor (age)
Sum of squares within
68 12
(error)
Sum of squares both 7
2
factors (interaction)
Sum of squares total 200 17
MEAN SQUARES
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor 32
32 1 = 32
(gender) 1
Sum of squares of 2nd 93
93 2 = 46.5
factor (age) 2
Sum of squares within 68
68 12 = 5.67
(error) 12
Sum of squares both 7 7
2 = 3.5
factors (interaction) 2
Sum of squares total 200 17
F RATIO
Sum of Degrees of
Mean square F ratio
squares Freedom
Sum of squares of 1st factor 32 32
32 1 = 32 = 5.64
(gender) 1 5.67
Sum of squares of 2nd 93 46.5
93 2 = 46.5 = 8.20
factor (age) 2 5.67
Sum of squares within 68
68 12 = 5.67
(error) 12
Sum of squares both 7 7 3.5
2 = 3.5 = 0.62
factors (interaction) 2 5.67
Sum of squares total 200 17
IF THE CRITICAL VALUE > F SCORE THEN
REJECT THE NULL HYPOTHESIS
ESTABLISH HYPOTHESIS
H0 : Gender will have no significant effect on students score
H1 : Gender does have a significant effect on students score
H0 : Age will have no significant effect on students score
H1 : Age has a significant effect on students score
H0 : Gender and age will have no significant effect on students
score
THANK YOU
Presentation by:
Trisha A. Gonzales
BSED 4-M