The Two Factor ANOVA
© 2010 Pearson Prentice Hall. All rights reserved
Recall, there are two ways to deal with factors:
(1) control the factors by fixing them at a single
level or by fixing them at different levels, and
(2) randomize so that their effect on the
response variable is minimized.
In both the completely randomized design and
the randomized complete block design, we
manipulated one factor to see how varying it
affected the response variable.
13-2
In a Two-Way Analysis of Variance design, two
factors are used to explain the variability in the
response variable. We deal with the two factors
by fixing them at different levels. We refer to the
two factors as factor A and factor B. If factor A
has n levels and factor B has m levels, we refer to
the design as an n  m factorial design.

13-3
Parallel Example 1: A 2 x 4 Factorial Design
Suppose the rice farmer is interested in comparing the
fruiting period for not only the four fertilizer types, but
for two different seed types as well. The farmer divides
his plot into 16 identical subplots. He randomly assigns
each seed/fertilizer combination to two of the subplots
and obtains the fruiting periods shown on the following
slide. Identify the main effects. What does it mean to
say there is an interaction effect between the two factors?
13-4
Fertilizer 1
Seed
Type A
Seed
Type B
13-5
13.5
13.9
14.4
15.0
Fertilizer 2
13.5
14.1
14.7
15.4
Fertilizer 3
15.2
14.7
15.3
15.9
Fertilizer 4
17.1
16.4
16.9
17.3
Solution
The two factors are A: fertilizer type and B: seed type.
Since all levels of factor A are combined with all levels
of factor B, we say that the factors are crossed.
The main effect of factor A is the change in fruiting
period that results from changing the fertilizer type.
The main effect of factor B is the change in fruiting
period that results from changing the seed type.
We say that there is an interaction effect if the effect of
fertilizer on fruiting period varies with seed type.
13-6
Requirements for the Two-Way
Analysis of Variance
1. The populations from which the samples are
drawn must be normal.
2. The samples are independent.
3. The populations all have the same variance.
13-7
In a two-way ANOVA, we test three separate
hypotheses.
Hypotheses Regarding Interaction Effect
H0: there is no interaction effect between the factors
H1: there is interaction between the factors
Hypotheses Regarding Main Effects
H0: there is no effect of factor A on the response
variable
H1: there is an effect of factor A on the response
variable
H0: there is no effect of factor B on the response
variable
H1: there is an effect of factor B on the response
variable
13-8
Whenever conducting a two-way ANOVA,
we always first test the hypothesis regarding
interaction effect. If the null hypothesis
of no interaction is rejected, we do not interpret
the result of the hypotheses involving the main
effects. This is because the interaction clouds
the interpretation of the main effects.
13-9
Parallel Example 3: Examining a Two-Way ANOVA
Recall the rice farmer who is interested in determining
the effect of fertilizer and seed type on the fruiting
period of rice. Assume that probability plots indicate
that it is reasonable to assume that the data come from
populations that are normally distributed.
a) Verify the requirement of equal population
variances.
b) Use MINITAB to test whether there is an interaction
effect between fertilizer type and seed type.
c) If there is no significant interaction, determine if
there is a significant difference in the means for
i) the 4 fertilizers
ii) the 2 seed types
13-10
Solution
a) The standard deviations for each treatment
combination are given in the table below:
Fertilizer 1
Seed Type A
0.283
Seed Type B
0.424
Fertilizer 2

Fertilizer 3
Fertilizer 4
0.424
0.354
0.495
0.495
0.424
0.283
Since the largest standard deviation, 0.495, is not more
than twice the smallest standard deviation, 0.283, the
assumption of equal variances is met.
13-11
Constructing Interaction Plots
Step 1: Compute the mean value of the response variable
within each cell. In addition, compute the row
mean value of the response variable and the
column mean value of the response variable with
each level of each factor.
Step 2: In a Cartesian plane, label the horizontal axis for
each level of factor A. The vertical axis will
represent the mean value of the response variable.
For each level of factor A, plot the mean value of
the response variable for each level of factor B.
Draw straight lines connecting the points for the
common level of factor B. You should have as
many lines as there are levels of factor B. The
more difference there is in the slopes of the two
lines, the stronger the evidence of interaction.
13-12
Parallel Example 4: Drawing an Interaction Plot
Draw an interaction plot for the data from the rice farmer
example.
The cell means are given in the table below.
Fertilizer 1
Fertilizer 2
Fertilizer 3
Fertilizer 4
Seed Type A
13.7
13.8
14.95
16.75
Seed Type B
14.7
15.05
15.6
17.1
13-13
Note that the lines have fairly similar slopes between points
which indicates there may be no interaction between
fertilizer and seed type.
13-14
Solution
MINITAB output:
Analysis of Variance for Fruiting period
Source
Fertilizer
Seed
Fert*Seed
Error
Total
b)
DF
SS
MS
F
P
3 18.3269
6.1090 37.16
0.000
1
2.6406
2.6406 16.06
0.004
3
0.4669
0.1556
0.95
0.463
8
1.3150
1.3150
0.1644
15 22.7494
The P-value for the interaction term is 0.463 > 0.05, so
we fail to reject the null hypothesis and conclude that
there is no interaction effect.
Now that the interaction is non-significant we can look
a the test for main effects from fertilizer and seed
types.
13-15
Solution
c)
i) Since the P-value for fertilizer is given as
0.000, we reject the null hypothesis and
conclude that the mean fruiting period is
different for at least one of the 4 types of
fertilizer.
ii) Since the P-value for seed type is found to
be 0.004, we reject the null hypothesis and
conclude that the mean fruiting period is
different for the two seed types.
13-16
Solution
With the significance in main effects due to the
fertilizer type we can construct the Tukey
Intevals to determine what differences exist
between pairwise means.
13-17
Solution
Tukey 95.0% Simultaneous Confidence Intervals
Response Variable Fruiting period
All Pairwise Comparisons among Levels of Fertilizer
Fertilizer = 1 subtracted from:
Fertilizer
Lower Center Upper
2
-0.6933 0.2250 1.143
3
0.1567 1.0750 1.993
4
1.8067 2.7250 3.643
------+---------+---------+---------+
(-------*-------)
(-------*-------)
(-------*------)
------+---------+---------+---------+
0.0
1.2
2.4
3.6
Fertilizer = 2 subtracted from:
Fertilizer
Lower Center Upper
3
-0.06830 0.8500 1.768
4
1.58170 2.5000 3.418
Fertilizer = 3 subtracted from:
Fertilizer
Lower Center Upper
4
0.7317
1.650 2.568
13-18
------+---------+---------+---------+
(-------*-------)
(-------*------)
------+---------+---------+---------+
0.0
1.2
2.4
3.6
------+---------+---------+---------+
(-------*------)
------+---------+---------+---------+
0.0
1.2
2.4
3.6
Results
1 2 3 4
Fertilizers 1 and 2 are not significantly different.
Fertilizers 2 and 3 are not significantly
different. All other pairwise comparisons are
significant.
It seems that fertilizer 4 results in the greatest
fruiting period of the rice.
We do not have to worry about the Tukey
comparisons for the seed type since there are
only two seed varieties used, we know they
are different. It seems that seed variety b has
a larger fruiting period.
The “Grand” Conclusion
To achieve the longest fruiting period we will
want to plant seed type b using fertilizer
number 4.