410 Statistical Methods
Two-Way Analysis of Variance
One-way analysis of variance compares several groups corresponding to a
single categorical variable, or factor. A two-way analysis of variance uses
two factors. In agriculture, for example, you might be interested in the ef-
fects of both potassium and nitrogen on the growth of potatoes. In medicine
you might want to study the effects of medication and dose on the duration
of headaches. In education you might want to study the effects of grade level
and gender on the time required to learn a skill. A marketing experiment
might consider the effects of advertising dollars and advertising medium
(television, magazines, and so on) on sales.
Recall that earlier in the chapter you looked at the means model for a
one-way analysis of variance. Two-way analysis of variance can also be ex-
pressed as a means model:
yijk5mij1eijk
where y is the response variable and mij is the mean for the ith level of one
factor and the jth level of the second factor. Within each combination of the
two factors, you might have multiple observations called replicates. Here
eijk is the error for the ith level of the fi rst factor, the jth level of the second
factor, and the kth replicate, following a normal distribution with mean 0
and variance s^2.
The model is more commonly presented as an effects model where
yijk5m1ai 1 bj1abij1eijk
Here y is the response variable, m is the overall mean, ai is the effect of
the ith treatment for the fi rst factor, and bj is the effect of the jth treatment
for the second factor. The term abij represents the interaction between the
two factors, that is, the effect that the two factors have on each other. For
example, in an experiment where the two factors are advertising dollars and
advertising medium, the effect of an increase in sales might be the same
regardless of what advertising medium (radio, newspaper, or television) is
used, or it might vary depending on the medium. When the increase is the
same regardless of the medium, the interaction is 0; otherwise, there is an
interaction between advertising dollars and medium.
A Two-Factor Example
To see how different factors affect the value of a response variable, con-
sider an example of the effects of four different assembly lines (A, B, C,
or D) and two shifts (a.m. or p.m.) on the production of microwave ovens