The Two-Way ANOVA
(Analysis Of Variance)
The two-way analysis of variance
is an extension to the one-way
analysis of variance. There are two
independent variables (hence the
name two-way).
Assumptions
•The populations from which the samples
were obtained must be normally or
approximately normally distributed.
•The samples must be independent.
•The variances of the populations must be
equal.
•The groups must have the same sample size.
Hypotheses
There are three sets of hypothesis with the two-way
ANOVA. The null hypotheses for each of the sets are
given below.
• The population means of the first factor are equal. This
is like the one-way ANOVA for the row factor.
• The population means of the second factor are equal.
This is like the one-way ANOVA for the column factor.
• There is no interaction between the two factors. This is
similar to performing a test for
independence with contingency tables.
Factors
The two independent variables in a two-
way ANOVA are called factors. The idea is
that there are two variables, factors, which
affect the dependent variable. Each factor will
have two or more levels within it, and the
degrees of freedom for each factor is one less
than the number of levels.
EXAMPLE 1
A researcher may wish to investigate the
effects of reach-out activities and SES (socio-
economic status) on the social responsibility of
teachers. There are two independent variables:
reach out activities and SES. The teachers may be
classified into two groups, one exposed to reach-
out activities and the other group not exposed to
the same. The independent variable ,
therefore, has two levels: with
exposure and without exposure.
The SES factor maybe of three levels:
High SES, Average SES and Low SES.
Hence, the SES variable has three levels. If
the criterion variable, social responsibility, is
of the interval type (i.e, the instrument yields
score points for the subjects), then the two-
way analysis of variance may be applied to
the data. The factorial design
is known as a 2 x 3 ANOVA.
The factorial ANOVA has an advantage
over the application of two separate one-way
ANOVA on the two independent variables.
This is due to the fact that the factorial
ANOVA analyzes not only the main effects of
each of the factors but also the interaction
effect of two variables.
Three hypotheses below may be tested by just
one application of the two-way ANOVA:
• There will be no significant effect of the exposure
and non-exposure to reach-out activities on the
social responsibility of the teachers (main effect of
Factor A)
• There will be no significant effect of SES on the
social responsibility of the teachers (main effect of
Factor B).
• There will be no interaction effect of exposure and
non-exposure to reach out activities and SES on the
social responsibility of the teachers (A x B
interaction).
Steps in Applying the Two-Way ANOVA
(Raw Score Method)
A. Enter the data in a two-way table (see table)
B. Find the sum for each cell, marginal totals and
the grand total
(∑XA1B1
…∑XA2B2
, ∑XA1
…∑XB3
, ∑Xt).
D. Find the sums of the squared raw scores
(∑X2
A1B1
…∑X2
A2B2
, ∑X2
A1
…∑X2
B3
, ∑X2
t).
C. Find the square of each raw score (X2
).
Raw Scores (X) Total Squares of Scores (X2
) Total
A1 A2
8 4
B1 4 4
3 _ 3___
∑XA1B1=15 ∑XA2B1=11
∑XB1=
26
A1 A2
64 16
B1 16 16
9 _ 9__
∑XA1B1=89 ∑X2
A2B1=41
∑X2
B1=
130
20 20
B2 16 11
15 _ 22___
∑XA1B2=51 ∑XA2B2=53
∑XB2=
104
400 400
B2 256 121
225 _ 484__
∑X2
A1B2=881 ∑X2
A2B2=1005
∑X2
B2=
1886
15 8
B3 18 5
2 _ 10___
∑XA1B3=35 ∑XA2B3=23
∑X3=
58
225 64
B3 324 25
4_ 100_
∑XA1B3=653 ∑X2
A2B3=189
∑X2
B3=
842
Total ∑XA1 = 101∑XA2 = 87 ∑Xt=188 ∑X2
A1=1623 ∑X2
A2=1235 ∑X2
t
=2858
Worksheet Table For The Two-Way ANOVA
E. Compute sums of squares.
1. SSt
= ∑X2
t
–(∑Xt
)2
nt
= 2858 - 1882
18
= 894
2. SSb
= ∑X1
)2
+ ∑X2
)2
…∑Xj
)2
- ∑Xt
)2
n1
n2
nj
nt
= 152
+ 512
+ 352
+ 112
+ 152
+ 532
+ 232
3 3 3 3 3 3 3
23 2
+ 1882
3 18
= 2502 - 1964 = 538
3. SSW
= SSt
- SSb
= 894 - 538
= 356
F. Partition the between-group variance
(SSb
) into three independent variances :
1. SSA
(Variance due to Factor A)
2. SSB
(Variance due to Factor B)
3. SSA x B
(Variance due to interaction
of A and B)
SSA = (∑XA1)2
+ (∑XA2)2
- (∑Xt)2
nA1 nA2 nt
= 1012
+ 872
= 188
9 9 18
= 1974 - 1964 = 10
SSB = (∑XB1)2
+ (∑XB2)2
+ (∑XB3)2
- (∑Xt)2
nB1 nB2 nB3 nt
= 262
+ 1042
+ 582
- 188
6 6 6 18
= 2475 - 1964 = 511
SSAxB = SSb - SSA - SSB
= 538 - 10 - 511 = 17
G. Determine the degrees of freedom by these
formulas:
dfA
= (A- 1) = (2 - 1) = 1
dfB
= (B-1) = (3-1) = 2
df AxB
= (A-1) (B-1) = (2-1) (3-1) = 2
dfW
= nt
– (A) (B) = 18-6 = 12
H. Compute the mean squares by dividing each
SS by its df:
MS A
= SSA
/ dfA
= 10/1 = 10
MS B
= SSB
/ dfB
= 511/2 = 255.5
MS AxB
= SSAxB
/ dfAxB
= 17/ 2 = 8.5
MS W
= SSW
/ dfW
= 356/12 = 29.67
I. Calculate F- ratios by dividing the MS’s for A,
B, A x B by MSW
.
FA =
MSA
/ MSW
= 10_ = 0.337
29.67
FB =
MSB
/ MSW
= 255.5 = 8.61
29.67
FAxB =
MSAxB
/ MSW
= _ 8.5_ = 0.2864
29.67
J. Determine the significance of the computed F-ratios with df
associated with the numerator and denominator of each F. (Refer to
the table)
The critical F-ratio associated with df, 1/12 at the .05 level is
4.75. Therefore the F-ratio factor A is not significant. The
computed F-ratio for Factor B (8.61) exceeded the critical ratio
(6.93) at the .01 level with df, 2/12, hence it is significant while
the ratio for the interaction effect is not significant either such as
in Factor A.
K. Make a summary table of the analysis of variance like the one below:
Source of Variation SS df MS F-ratio Signifi
cance
Exposure
(Factor A)
SES
(Factor B)
Interaction
(A x B)
Within Group)
10
511
17
356
1
2
2
12
10
255.5
8.5
29.67
0.337
8.61
0.2868
N.S
P .01
N.S

L. Interpret the data entered in the table.
There is no significant main effect of the
treatment (exposure to reach out activities) on the
social responsibility of the subjects. The SES
factor, however is found to have a significant
effect, with the middle SES subjects showing the
highest level of social responsibility among the
three groups. Lastly, there is no interaction effect
of Factors A and B on the dependent variable
under study.

CORRELATIONijwldfblIuedfHuiEdch-ANALYSIS.pptx

  • 1.
  • 2.
    The two-way analysisof variance is an extension to the one-way analysis of variance. There are two independent variables (hence the name two-way).
  • 3.
    Assumptions •The populations fromwhich the samples were obtained must be normally or approximately normally distributed. •The samples must be independent. •The variances of the populations must be equal. •The groups must have the same sample size.
  • 4.
    Hypotheses There are threesets of hypothesis with the two-way ANOVA. The null hypotheses for each of the sets are given below. • The population means of the first factor are equal. This is like the one-way ANOVA for the row factor. • The population means of the second factor are equal. This is like the one-way ANOVA for the column factor. • There is no interaction between the two factors. This is similar to performing a test for independence with contingency tables.
  • 5.
    Factors The two independentvariables in a two- way ANOVA are called factors. The idea is that there are two variables, factors, which affect the dependent variable. Each factor will have two or more levels within it, and the degrees of freedom for each factor is one less than the number of levels.
  • 6.
    EXAMPLE 1 A researchermay wish to investigate the effects of reach-out activities and SES (socio- economic status) on the social responsibility of teachers. There are two independent variables: reach out activities and SES. The teachers may be classified into two groups, one exposed to reach- out activities and the other group not exposed to the same. The independent variable , therefore, has two levels: with exposure and without exposure.
  • 7.
    The SES factormaybe of three levels: High SES, Average SES and Low SES. Hence, the SES variable has three levels. If the criterion variable, social responsibility, is of the interval type (i.e, the instrument yields score points for the subjects), then the two- way analysis of variance may be applied to the data. The factorial design is known as a 2 x 3 ANOVA.
  • 8.
    The factorial ANOVAhas an advantage over the application of two separate one-way ANOVA on the two independent variables. This is due to the fact that the factorial ANOVA analyzes not only the main effects of each of the factors but also the interaction effect of two variables.
  • 9.
    Three hypotheses belowmay be tested by just one application of the two-way ANOVA: • There will be no significant effect of the exposure and non-exposure to reach-out activities on the social responsibility of the teachers (main effect of Factor A) • There will be no significant effect of SES on the social responsibility of the teachers (main effect of Factor B). • There will be no interaction effect of exposure and non-exposure to reach out activities and SES on the social responsibility of the teachers (A x B interaction).
  • 10.
    Steps in Applyingthe Two-Way ANOVA (Raw Score Method) A. Enter the data in a two-way table (see table) B. Find the sum for each cell, marginal totals and the grand total (∑XA1B1 …∑XA2B2 , ∑XA1 …∑XB3 , ∑Xt).
  • 11.
    D. Find thesums of the squared raw scores (∑X2 A1B1 …∑X2 A2B2 , ∑X2 A1 …∑X2 B3 , ∑X2 t). C. Find the square of each raw score (X2 ).
  • 12.
    Raw Scores (X)Total Squares of Scores (X2 ) Total A1 A2 8 4 B1 4 4 3 _ 3___ ∑XA1B1=15 ∑XA2B1=11 ∑XB1= 26 A1 A2 64 16 B1 16 16 9 _ 9__ ∑XA1B1=89 ∑X2 A2B1=41 ∑X2 B1= 130 20 20 B2 16 11 15 _ 22___ ∑XA1B2=51 ∑XA2B2=53 ∑XB2= 104 400 400 B2 256 121 225 _ 484__ ∑X2 A1B2=881 ∑X2 A2B2=1005 ∑X2 B2= 1886 15 8 B3 18 5 2 _ 10___ ∑XA1B3=35 ∑XA2B3=23 ∑X3= 58 225 64 B3 324 25 4_ 100_ ∑XA1B3=653 ∑X2 A2B3=189 ∑X2 B3= 842 Total ∑XA1 = 101∑XA2 = 87 ∑Xt=188 ∑X2 A1=1623 ∑X2 A2=1235 ∑X2 t =2858 Worksheet Table For The Two-Way ANOVA
  • 13.
    E. Compute sumsof squares. 1. SSt = ∑X2 t –(∑Xt )2 nt = 2858 - 1882 18 = 894
  • 14.
    2. SSb = ∑X1 )2 +∑X2 )2 …∑Xj )2 - ∑Xt )2 n1 n2 nj nt = 152 + 512 + 352 + 112 + 152 + 532 + 232 3 3 3 3 3 3 3 23 2 + 1882 3 18 = 2502 - 1964 = 538 3. SSW = SSt - SSb = 894 - 538 = 356
  • 15.
    F. Partition thebetween-group variance (SSb ) into three independent variances : 1. SSA (Variance due to Factor A) 2. SSB (Variance due to Factor B) 3. SSA x B (Variance due to interaction of A and B)
  • 16.
    SSA = (∑XA1)2 +(∑XA2)2 - (∑Xt)2 nA1 nA2 nt = 1012 + 872 = 188 9 9 18 = 1974 - 1964 = 10 SSB = (∑XB1)2 + (∑XB2)2 + (∑XB3)2 - (∑Xt)2 nB1 nB2 nB3 nt = 262 + 1042 + 582 - 188 6 6 6 18 = 2475 - 1964 = 511 SSAxB = SSb - SSA - SSB = 538 - 10 - 511 = 17
  • 17.
    G. Determine thedegrees of freedom by these formulas: dfA = (A- 1) = (2 - 1) = 1 dfB = (B-1) = (3-1) = 2 df AxB = (A-1) (B-1) = (2-1) (3-1) = 2 dfW = nt – (A) (B) = 18-6 = 12
  • 18.
    H. Compute themean squares by dividing each SS by its df: MS A = SSA / dfA = 10/1 = 10 MS B = SSB / dfB = 511/2 = 255.5 MS AxB = SSAxB / dfAxB = 17/ 2 = 8.5 MS W = SSW / dfW = 356/12 = 29.67
  • 19.
    I. Calculate F-ratios by dividing the MS’s for A, B, A x B by MSW . FA = MSA / MSW = 10_ = 0.337 29.67 FB = MSB / MSW = 255.5 = 8.61 29.67 FAxB = MSAxB / MSW = _ 8.5_ = 0.2864 29.67
  • 20.
    J. Determine thesignificance of the computed F-ratios with df associated with the numerator and denominator of each F. (Refer to the table)
  • 21.
    The critical F-ratioassociated with df, 1/12 at the .05 level is 4.75. Therefore the F-ratio factor A is not significant. The computed F-ratio for Factor B (8.61) exceeded the critical ratio (6.93) at the .01 level with df, 2/12, hence it is significant while the ratio for the interaction effect is not significant either such as in Factor A.
  • 23.
    K. Make asummary table of the analysis of variance like the one below: Source of Variation SS df MS F-ratio Signifi cance Exposure (Factor A) SES (Factor B) Interaction (A x B) Within Group) 10 511 17 356 1 2 2 12 10 255.5 8.5 29.67 0.337 8.61 0.2868 N.S P .01 N.S 
  • 24.
    L. Interpret thedata entered in the table. There is no significant main effect of the treatment (exposure to reach out activities) on the social responsibility of the subjects. The SES factor, however is found to have a significant effect, with the middle SES subjects showing the highest level of social responsibility among the three groups. Lastly, there is no interaction effect of Factors A and B on the dependent variable under study.