Two way ANOVA with replication

TWO WAY ANOVA WITH
REPLICATION
Also called a Factorial Experiment.
 Factorial Experiment is used to evaluate 2 or more factors
simultaneously.
 Replication means an independent repeat of each factor
combination.
 The purpose of factorial experiment is to examine:

1. The effect of factor A on the dependent variable, y.
2. The effect of factor B on the dependent variable, y along with
3. The effects of the interactions between different levels of the
factors on the dependent variable, y.

Interaction exists when the effect of a level for one factor
depends on which level of the other factor is present.
 Advantages
of Factorial Experiment over one factor at a time
(one-way ANOVA) – more efficient & allow interactions to be
detected.
The effect model for a factorial experiment can be
written as:
i  1,...,a

yijk     i   j   ij   ijk  j  1,...,b
 k  1,...,r

yijk : The response from the kth experimental unit receiving the
ith level of factor A and the jth level of factor B
 : Overall mean
 i : An effect due to the ith level of factor A
 j : An effect due to the jth level of factor B
ij : An interaction effect of the ith level of factor A with jth level of factor B
 ijk : A random error associated with the response from the kth experimental
unit receiving the ith level of factor A combined with jth level of factor B
There are three sets of hypothesis:
1. Factor A effect:
2. Factor B effect:
3. Interaction effect:
The results obtained in this analysis are
summarized in the following ANOVA table:

Two way Factorial Treatment Structure
B2
B1
A1
A2
A3
y111 
y112 

 y11
.

y11n 

y121 
y122 

 y12
.

y12 n 

y211 
y212 

 y21
.

y21n 

y221 
y222 

 y22
.

y22 n 

y311 

y312 
 y31
.

y31n 

y321 

y322 
 y32
.

y32n 

y1
y2
y1
y2
y3
y
where
SSA 
SSB 
 yi
br
y
ar
2
2
j
y2

abr
y2

abr
2
y
 ij
y2
SSAB 

 SSA  SSB
r
abr
2
y
SST   yijk 2 
abr
SSE  SST  SSA  SSB  SSAB
Example:
The two-way table gives data for a 2x2 factorial experiment with two
observations per factor – level combination.
Factor B
Factor A
Level
1
2
1
29.6
35.2
47.3
42.1
2
12.9
17.6
28.4
22.7
Construct the ANOVA table for this experiment and do a complete analysis
at a level of significance 0.05.
Solution:
Factor B
Factor A
Level
1
2
1
29.6
35.2
64.8
47.3
42.1
89.4
2
12.9
17.6
30.5
28.4
22.7
51.1
81.6
95.3
140.5
235.8
154.2
Solution:
1. Set up hypothesis
Factor A effect:
H 0 : 1   2 
a  0
H1: at least one  i  0
Factor B effect:
H 0 : 1   2 
 b  0
H1: at least one  j  0
Interaction effect:
H 0 :  ij  0 for all i, j
H1: at least one  ij  0
SST   yijk 2
y2

abr
  29.6  35.2 
2
2
235.82
 22.7  
 2  2  2 
2
 972.715
 yi
2
y2
SSA 

br
abr
 154.22  81.62

4

 658.845
 235.82

8

y
2
2
y
j
SSB 

ar
abr
 95.32  140.52  235.82


4
8


 255.38
2
y
 ij
y2
SSAB 

 SSA  SSB
r
abr
 64.82  89.4 2  30.52  51.12 
235.82

  658.845  255.38 
2
8


2
SSE  SST  SSA  SSB  SSAB
 972.715  658.845  255.38  2
 56.49
2. Calculation (given the ANOVA table is as follows):
Source of
Variation
SS
df
MS
F
A
658.845
1
658.845
46.652
B
255.38
1
255.38
18.083
2
1
2
0.1416
Error
56.49
4
14.1225
Total
972.715
7
AB
3. With  = 0.05 we reject H 0 if :
FA  F ,a 1,ab r 1 for effect of factor A
FB  F ,b 1,ab r 1 for effect of factor B
FAB  F , a 1 b 1 ,ab r 1 for effect of interaction
4. From ANOVA/table F, the critical and F effects are given as follow:
FA  46.652 and F ,a 1,ab r 1  F0.05 ,1,4  7.71
FB  18.083 and F ,b 1,ab r 1  F0.05 ,1,4  7.71
FAB  0.1416 and F , a 1b 1,ab r 1  F0.05 ,1,7  7.71
5. Factor A : since FA  46.652 >F0.05,1,4  7.71
, thus we reject H 0
We conclude that the difference level of A effect the response
Factor B : since FB  18.083 > F0.05,1,4  7.71 , thus we reject H 0
We conclude that the difference level of B effect the response
Interaction: since FAB  0.1416  F0.05,1,4  7.71 , thus we failed to reject H 0
We conclude that no interaction between factor A and factor B.
Exercise:
In a study to determine which are the important source of variation in
an industrial process, 3 measurements are taken on yield for 3
operators chosen randomly and 4 batches a raw materials chosen
randomly. It was decided that a significance test should be made at the
0.05 level of significance to determine if the variance components due
to batches, operators, and interaction are significant. In addition,
estimates of variance components are to be computed.The data are as
follows, with the response being percent by weight.
Batch
Operator
1
2
3
4
1
66.9
68.1
67.2
68.3
67.4
67.7
69.0
69.8
67.5
69.3
70.9
71.4
2
66.3
65.4
65.8
68.1
66.9
67.6
69.7
68.8
69.2
69.4
69.6
70.0
3
65.6
66.3
65.2
66.0
66.9
67.3
67.1
66.2
67.4
67.9
68.4
68.7
Perform the analysis of variance of this experiment at level of significance
0.05. State your conclusion