Minitab Notes for STAT 6305
Dept. of Statistics — CSU East Bay
Unit 7: Two-Factor ANOVA Model
With Interaction Term
7.1. The Data
In order to evaluate three different types of display panels (for use by air traffic controllers) under
five specific emergency conditions, a company used 30 experienced subjects. Each of the five
conditions was simulated on each of the three panels, giving a design with 15 cells. The subjects
were randomly assigned so that there were 2 replications per cell (i.e., two subjects were tested
using each Display-Condition combination). The variable of interest was the time in seconds
required to stabilize the emergency condition. The data are given on page 917 of O/L 5e, and in
the table below. (Similar data are shown on page 918 of O/L 6e.)
Time (sec) Required to Stabilize
(Tests under 5 simulated emergency conditions
using each of 3 prototype display panels)
Condition
Display
1
2
3
4
5
1
18
16
31
35
22
27
39
36
15
12
2
13
15
33
30
24
21
35
38
10
16
3
24
28
42
46
40
37
52
57
28
24
Problems:
7.1.1. For your convenience the 30 observations are given below (reading down columns for
Condition in the table). Cut and paste them into c1 of a Minitab worksheet; label it Time.
Then use the patterned data feature to make two columns of subscripts in c2 and c3 for Disp
and Cond, respectively.
18
42
35
16
46
38
13
22
52
15
27
57
24
24
15
28
21
12
31
40
10
35
37
16
33
39
28
30
36
24
Minitab Notes for STAT 6305
Unit 7-2
Finally, print out the columns or look at the worksheet to verify that your data and subscripts are
as shown below. (In a word processor, we have formatted the output below for a compact display
in your browser.)
MANIP > Display data
MTB > print c1-c3
ROW
c1
Time
c2
Cond
c3
Disp
ROW
c1
Time
c2
Cond
c3
Disp
1
2
3
4
5
6
18
16
13
15
24
28
1
1
1
1
1
1
1
1
2
2
3
3
13
14
15
16
17
18
22
27
24
21
40
37
3
3
3
3
3
3
1
1
2
2
3
3
7
8
9
10
11
12
31
35
33
30
42
46
2
2
2
2
2
2
1
1
2
2
3
3
19
20
21
22
23
24
39
36
35
38
52
57
4
4
4
4
4
4
1
1
2
2
3
3
ROW
25
26
27
28
29
30
c1
Time
c2
Cond
c3
Disp
15
12
10
16
28
24
5
5
5
5
5
5
1
1
2
2
3
3
[Hint: In case you are having trouble with subscripts, here are the data patterns to be used with
the set command. With c1 as described above, the data pattern for c2 is (1:5)6 and the data
pattern for c3 is 5(1:3)2. In using these notations, notice that 5 x 6 = 30 and 5 x 3 x 2 = 30.]
7.1.2. Make tables as follows:
(a) A data table similar to the one shown in this section. Use the menu path or commands below.
What happens if you reverse the order in which you list the classification (subscript) variables?
STAT > Tables > Cross-tab, classification variables: Disp Cond
summary, associated variable: Time, data
MTB > table 'Disp' 'Cond';
SUBC> data 'Time'.
(b) A data table that shows means in the 15 cells of the table, and also for each row and column.
STAT > Tables > Cross-tab, classification variables: Disp Cond
summary, associated variable: Time, data
MTB > table 'Disp' 'Cond';
SUBC> mean 'Time'.
7.1.3. Make box plots of the data: first broken out by Display, and then broken out by Condition.
(Use either character or pixel graphics.) Does either of these two comparisons of box plots give a
clue as to the possible importance of the factors, Display or Condition, in influencing the time to
stabilize? (Failure to see a significant effect here would not necessarily mean that there is none.
The levels of one factor may differ in a way that obscures a significant effect in the other factor.
What we are doing here is similar to ignoring the blocks in a block design. Nevertheless, box
plots may reveal some structure, and they may warn of outliers.)
7.1.4. Use R to repeat problem 7.1.3.
time = c(18, 16, 13, 15, 24, 28, 31, 35, 33, 30, 42, 46, 22, 27, 24, 21, 40, 37,
39, 36, 35, 38, 52, 57, 15, 12, 10, 16, 28, 24)
cond = as.factor(rep(1:5, each=6));
disp = as.factor(rep(1:3, each=2, times=5))
par(mfrow=c(1,2)); boxplot(time ~ cond); boxplot(time ~ disp); par(mfrow=c(1,1))
Minitab Notes for STAT 6305
Unit 7-3
7.2. Interaction Plots of the Data
In this experiment there are two factors that may influence the time it takes for a subject to
"stabilize" a simulated emergency condition: the type of Condition and the method of Display.
Also, there might be interaction between these two factors.
This is a two-way analysis of variance with two fixed effects and with two observations per cell.
The formal model is:
Yijk = µ + αi + βj + (αβ)ij + eijk, for i = 1, 2 ,3 = a, j = 1, ..., 5 = b, and k = 1, 2 = n.
The random variables eijk are independently, identically distributed according to N(0, σ2). The
parameters αi correspond to the effects of the 3 levels of Display, the parameters βj correspond to
the effects of the 5 levels of Condition, and the parameters (αβ)ij correspond to 15 non-additive
adjustments, one for each cell. [In this notation each symbol (αβ)ij represents a single parameter,
not a product.] Altogether we have used 1 + a + b + ab = 1 + 3 + 5 + 15 = 26 parameters to
represent ab = 15 group population means. So, absent some restrictions, it is not possible to
estimate all 26 parameters using 15 group sample means. Some authors subject these parameters
to the following restrictions:
Σi αi = 0, Σj βj = 0, Σi (αβ)ij = 0, and Σj (αβ)ij = 0,
where each sum is taken over the full range of the relevant subscript. In effect, these restrictions
leave only 1 + (a – 1) + (b – 1) + (a – 1)(b – 1) = 1 + 2 + 4 + 8 = 15 linearly independent
parameters to estimate. If these restrictions are not made, then statistical software makes its own
restrictions: for example, assigning value 0 to any parameter with subscript i = a or j = b,
restrictions that also reduce to ab = 15 the number of parameters to be estimated. Either way, the
output is essentially the same, except that definitions of fixed-effect terms in the EMS table may
be different and consequently so are their coefficients.
In our ANOVA we shall perform tests of three null hypotheses: No Display effect [H0: Σi αi2 = 0], no
Condition effect [H0: Σj βj2 = 0], and no Interaction [H0: ΣiΣj (αβ)ij2 = 0]. For each test the
alternative is that the sum of squared parameters is positive.
Here is an imaginary scenario that might result in a significant interaction [i.e., a
circumstance where the interaction parameters (αβ)ij are not all 0]: Condition 1 is a plane
flying too low to pass safely over a mountain. Display 2 is particularly effective at calling
attention to this kind of emergency (perhaps a red flashing icon accompanied by numbers
giving the actual and required height of the plane and its contact call number). Although
Display 2 does a better job of calling attention to this "tall-mountain" emergency than the
other display panels do, it gives very confusing representations for the other four emergency
conditions. In this situation it would make no sense to ask which display panel would be
"best." Display 2 is best for tall-mountain emergencies and worst for the rest.
A profile plot (also called interaction plot) is one way to judge not only the possible differences
among the means of the levels of each effect, but also whether there is interaction. (For examples
of profile plots see Sections 15.3-5 of O/L 6e.) At the top of the next page, we show a profile plot
of Time against levels of Condition, broken out by levels of Display (the three broken-line
Minitab Notes for STAT 6305
Unit 7-4
paths). Here is the menu path:
STAT > ANOVA > Balanced > Interaction plot, response: Time, factors: Disp, Cond
In profile plots of our data, the line segments connecting cell means are nearly parallel. This
suggests the absence of significant interaction. These plots also seem to make it clear that both
Display and Condition have an effect on Time. In the profile above, Display seems to be a
significant effect because the path connecting the (green) diamonds, representing Display 3, lie
quite a bit above the other two paths; Condition seems to be significant because the points above
Conditions 4, 2, and perhaps 3, are generally higher than the points for the other conditions.)
Interaction Plot for Air Traffic Diplay Panels: Mean Stabilization Time
60
Disp
1
2
3
50
Mean
40
30
20
10
1
2
3
Cond
4
5
Some statisticians would not make profile plots unless confronted with an ANOVA that
showed significant interaction, which is not the case here (as we see Section 3).
When significant interaction is present, a profile plot (or some such analysis) is required
to determine whether the interaction is "disorderly" (i.e., whether line segments in the
profile plot show a strong pattern of crossing one another).
In the case of disorderly interaction, main effects can become meaningless. (For example,
it might make no sense to ask which Display allows the fastest response time without also
knowing which Condition is being presented.)
We believe any reluctance to make profile plots is misguided because they can reveal
important features of the data before one undertakes a formal analysis.
However, it is important not to over interpret slight aberrations in a profile plot. For
example, unless there is statistically significant interaction there can be no real "disorder"
— even if profile plot paths should happen (barely?) to cross due to random variation.
Minitab Notes for STAT 6305
Unit 7-5
Problems:
7.2.1. Use the menu path STAT > ANOVA > Balanced > Interaction plot, response:
Time, factors: Cond, Disp to make profile plots. Make two figures: (i) a profile plot with
Display on the horizontal axis (that is, reverse the order of the factors to get a different plot than
the one shown in this section), and (ii) a full matrix plot, which shows two plots (check the
appropriate box).
•
Each of the two profile plots consists of several broken-line paths. When using a profile
plot to evaluate a main effect, it is often best to look at the plot that represents levels of
that main effect as broken line segments (that is, levels of the other main effect are shown
on the horizontal axis.) When both factors are fixed effects, as in this unit, you should
look at both profile plots (see Problem 7.2.4).
•
Significant interaction shows as non-parallel line segments in interaction plots. Remember
that the plotting points are cell means, and that they are subject to random variation. Thus it
is not reasonable to expect line segments to be exactly parallel in any case.
Which plot do you find easier to interpret in terms of the Display main effect— the one with the
three Displays on the horizontal axis, or the one with the three Displays represented as three
broken-line segments? Is it clear from this plot which Display is best (has smallest Time values)?
Do you see evidence of significant interaction in either plot?
7.2.2. Profile plots can be thought of as two-dimensional projections of a three-dimensional
response surface. Use the menu path GRAPH > 3D Surface > Wireframe, Z=Time, Y=Cond,
X=Disp to make a three-dimensional plot. Try to imagine projections of the surface onto the two
front faces of the plotting "box."
Surface Plot of Time vs Cond, Disp
60
40
Time
20
5.5
4.0
2.5
1
2
Disp
3
Cond
1.0
(a) Rotate the image so that the Condition axis is perpendicular to you, then so that the Display
Minitab Notes for STAT 6305
Unit 7-6
axis is perpendicular to you. What profile plot is generated by each of these rotations.
(b) How could you renumber the levels of one or both factors so that no part of the surface is
hidden from view (before rotation)?
(c) When there is no (significant) interaction, what is the (approximate) shape of the 8 segments
of this surface?
7.2.3. In a two-way ANOVA, show (by example with contrived cell means) that it is possible for
one of the two possible profile plots to show markedly crossing line segments while the other
does not. The interaction is either significant or it is not. But if it is significant, it can be
disorderly with respect to one effect and not the other.
7.3. Analysis and Interpretation
We use Minitab’s balanced ANOVA procedure to perform our analysis of these data. The design
is balanced because there are 2 observations in each cell. As stated above in the model, we
consider both Display and Condition to be fixed effects. Recall that no subcommand is necessary
to declare a fixed effect (that is, Minitab takes fixed effects to be the “default”). Notice that the
Interaction between Display and Condition is denoted in the model with an asterisk (*). We also
ask to print the EMS table (omitted here to save space) and to capture residuals. Consideration of
this output is left for Problems 7.3.1 and 7.3.2.
STAT > ANOVA > Balanced, store residuals
("Response" is: Time, "Model" is: Cond Disp Cond*Disp)
ANOVA: Time versus Cond, Disp
Factor
Cond
Disp
Type
fixed
fixed
Levels
5
3
Values
1, 2, 3, 4, 5
1, 2, 3
Analysis of Variance for Time
Source
Cond
Disp
Cond*Disp
Error
Total
DF
4
2
8
15
29
S = 2.65832
1
2
3
4
Source
Cond
Disp
Cond*Disp
Error
SS
2850.13
1227.80
44.87
106.00
4228.80
MS
712.53
613.90
5.61
7.07
R-Sq = 97.49%
Variance
component
7.067
Error
term
4
4
4
F
100.83
86.87
0.79
P
0.000
0.000
0.617
R-Sq(adj) = 95.15%
Expected Mean Square
for Each Term
(using restricted
Unrestricted model has same ANOVA
model)
table, and has no coefficients for Qs
(4) + 6 Q[1]
in EMS table.
(4) + 10 Q[2]
(4) + 2 Q[3]
(4)
Interpretation of the resulting ANOVA table begins at the bottom with the test for Interaction.
The presence of interaction (particularly “disorderly” interaction, in which the line segments in
the profile plot markedly cross one another) can seriously interfere with the interpretation of the
"main" effects. However, Interaction is not significant here (P = 0.617) so that the issue of
disorderly interaction does not arise. Thus a straightforward interpretation of the two highly
Minitab Notes for STAT 6305
Unit 7-7
significant main effects is possible.
Problems:
7.3.1. Perform the ANOVA of this section again so that you can see the EMS table. Also, try an
alternate notation for the model: following the =-sign, instead of Cond Disp Cond*Disp, use
simply Cond | Disp. On standard US keyboards, the "vert" symbol (|) is located just below
the BACKSPACE key along with the backslash (\); use SHIFT to get vert. The vert symbol indicates
that the interaction is to be included along with the main effects specified on either side of it.
Translate from Minitab's notation with parentheses and brackets to write the EMS for each row
of the ANOVA table in terms of parameters of the model given at the beginning of Section 2.
Interpret the EMSs to say which MS is in the denominator of the F-statistic for each of the three
tests of hypothesis (Condition, Display, and Interaction).
7.3.2. Make a dotplot and a normal probability plot of the residuals. Notice that the distribution is
markedly bimodal. Is this enough of a departure from normality to cause the Anderson-Darling
test to reject? Look at the original data table. It seems suspicious that, while variability within
cells is rather small and observations are rounded to the nearest integer, there are no cells among
the 15 in which the two replications agree exactly or almost exactly to give a residual of 0 or 1.
This peculiarity explains the bimodality of the residuals. One must wonder if the successive
observations in each cell are truly independent.
Also notice that the dotplot is precisely symmetrical. The fits in a two-way ANOVA with
interaction are simply the cell means. Explain why, with two replications per cell, the residuals
must be symmetrical.
7.3.3. By hand, use Tukey's HSD method to find the pattern of differences among Displays. Then
use HSD to find the pattern of differences among Conditions. In each case you need to use
MS(Error) as the estimate of the error variance. To summarize your findings, provide "underline"
diagrams for each of the main effects. (See, for example, page 930 of O/L 6e for the formula.)
Finally, use Minitab's GLM procedure to verify your answer; the menu path is:
STAT > ANOVA > glm; Comparisons, Tukey.
7.3.4. Use R to make an interaction plot and ANOVA tables with and without interaction.
interaction.plot(cond, disp, time)
tapply(time, list(disp, cond), mean)
anova(lm(time ~ cond * disp))
anova(lm(time ~ cond + disp))
7.4. Reduced Model When Interaction Is Not Significant
When interaction is not significant (especially if it is nowhere near being significant), some
statisticians would "pool" the error and interaction lines of the ANOVA table, and recompute the
MS and F-ratios before testing the main effects. This is equivalent to eliminating the interaction
term from the model, as shown by the ANOVA procedure below. Other statisticians would argue
that one should stick with the original model in judging the significance of the main effects.
The motivation for pooling is to obtain more degrees of freedom for the Error term in search of a
more powerful test of the main effects. For the current dataset the main effects are very highly
significant, and so the interpretation of the data does not depend on whether one "pools" or not.
Minitab Notes for STAT 6305
Unit 7-8
Below we omit the interaction from the model specified on the ANOVA command line.
Compare the resulting ANOVA table with the one in Section 3.
REDUCED MODEL (NO INTERACTION TERM)
STAT > ANOVA > Balanced, store residuals
MTB > anova Time = Cond Disp;
MTB > restrict;
MTB > ems;
SUBC> residuals c7.
Factor
Cond
Disp
Type
fixed
fixed
Levels
5
3
Values
1, 2, 3, 4, 5
1, 2, 3
Analysis of Variance for Time
DF
4
2
23
29
SS
2850.13
1227.80
150.87
4228.80
MS
712.53
613.90
6.56
F
108.63
93.59
P
0.000
0.000
...
The residuals for this reduced model (without an interaction term) yield the nearly linear normal
probability plot shown below. Remember that the residuals for the full model (with interaction) are
bimodal, and so give a distinctly nonlinear normal probability plot. The plot below was made by
electing to Graph a normal probability plot of the residuals in the balanced ANOVA dialog box.
Normal Probability Plot of the Residuals
(response is Time)
99
95
90
80
Percent
Source
Cond
Disp
Error
Total
...
70
60
50
40
30
20
10
5
1
-5.0
-2.5
0.0
Residual
2.5
5.0
Minitab Notes for STAT 6305
Unit 7-9
Problems:
7.4.1. Write the reduced model, using the same symbols as in the full model shown in Section 2,
where appropriate. Repeat the ANOVA procedure of this section so that you can see the EMSs.
Translate Minitab's EMS table into the notation of your model.
7.4.2. Show how you could obtain the entire ANOVA table for the reduced model from that of
the full model with a few simple arithmetic operations. In particular, how are DF(Error) and
SS(Error) of the table for the reduced model obtained from entries in the table for the full model?
7.4.3. Make a dotplot of the residuals from the reduced model. What is the P-value of the
Anderson-Darling normality test on these residuals? Comment.
7.4.4. Compare the 1% critical value of F for testing the Condition main effect in the reduced
model with the critical value for the full model. Do the same for the Display effect. Notice that
the F-statistics for Condition and Display are changed little in moving from the full model to the
reduced model. What has been gained by pooling?
7.4.5. Without doing the computations, say whether Tukey's HSD for differences between
Conditions is larger or smaller for the reduced model than for the full model. (Give two reasons.)
7.4.6. Error degrees of freedom are obtained at the expense of additional experimentation.
Compute the entries in the DF column of the ANOVA table for the full model with 3 Displays, 5
Conditions, and 3 (instead of 2) replications per cell. The effect of pooling on DF(Error) is not as
great as the effect of doing half again as many replications, but pooling doesn't cost anything.
7.4.7. Look at the table of cell means in Problem 7.1.2(b). Suppose you did not have the
complete dataset available and had to draw conclusions only from the information in this table.
What kind of model is this? Compare the SS and DF columns from this analysis with those in the
ANOVA of the complete dataset. How is variability (error) estimated in the ANOVA from the
table? From this point of view, what important information is lost when one deals only with the
summary table of means?
Minitab Notes for Statistics 6305 by Bruce E. Trumbo, Department of Statistics, CSU East Bay, Hayward CA, 94542,
Email: [email protected]. Comments and corrections welcome. Copyright (c) 1991, 2010 and
intermediate dates by Bruce E. Trumbo. All rights reserved. These notes are intended mainly for use at California
State University, East Bay. Please contact the author concerning other contemplated uses. Preparation of earlier
versions of these notes was partially supported by NSF grant USE-9150433.
Minitab Notes for STAT 6305
Unit 7-10
BT Last modified: 2/10
© Copyright 2026 Paperzz