Solutions
Solutions
Solutions
=
e)
2 2 2
1873 . )] 5 / 1 ( ) 10 / 1 ( ) 10 / 1 )[( 9 / ( ] ) 7 / 1 [( )
=
2)
2 2 2
1873 . )] 5 / 1 ( ) 10 / 1 ( ) 10 / 1 )[( 9 / ( ] ) 7 / 1 [( )
( Var = + + + =
3) MSE = .0109 based on 28 degrees of freedom
4) critical t -distribution value for 28 df and alpha = .05: t = 1.70
5) test statistic: 327 . ) 1873 (. MSEx /
T = =
6) reject the null hypothesis iff T > 1.70
7) fail to reject the null hypothesis
One-way ANOVA: TIME versus PUSHES
Source DF SS MS F P
PUSHES 3 0.0080 0.0027 0.25 0.864
Error 28 0.3060 0.0109
Total 31 0.3140
S = 0.1045 R-Sq = 2.56% R-Sq(adj) = 0.00%
Individual 95% CIs For Mean Based on
Pooled StDev
Level N Mean StDev ---------+---------+---------+---------+
0 7 38.207 0.068 (-------------*------------)
1 10 38.171 0.116 (----------*----------)
2 10 38.194 0.100 (-----------*----------)
3 5 38.212 0.130 (---------------*---------------)
---------+---------+---------+---------+
38.160 38.220 38.280 38.340
Pooled StDev = 0.105
Dunnett's comparisons with a control
Family error rate = 0.05
Individual error rate = 0.0196
Critical value = 2.48
Control = level (0) of PUSHES
Intervals for treatment mean minus control mean
Level Lower Center Upper ------+---------+---------+---------+---
1 -0.1637 -0.0361 0.0914 (-----------*------------)
2 -0.1407 -0.0131 0.1144 (------------*-----------)
3 -0.1467 0.0049 0.1564 (--------------*---------------)
------+---------+---------+---------+---
-0.10 0.00 0.10 0.20
Exercise 4.5 - Trout experiment
10
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
One-way ANOVA: HEMOGLOBIN(GMS PER 100 ML) versus SULFAMERAZINE - gms
Source DF SS MS F P
SULFAMERAZINE - 3 2680 893 5.70 0.003
Error 36 5647 157
Total 39 8327
S = 12.52 R-Sq = 32.19% R-Sq(adj) = 26.54%
Individual 99% CIs For Mean Based on
Pooled StDev
Level N Mean StDev ---------+---------+---------+---------+
0 10 72.00 10.19 (--------*--------)
5 10 93.30 17.17 (--------*--------)
10 10 90.30 11.35 (--------*--------)
15 10 86.90 10.00 (--------*--------)
---------+---------+---------+---------+
72 84 96 108
Pooled StDev = 12.52
Tukey 99% Simultaneous Confidence Intervals
All Pairwise Comparisons among Levels of SULFAMERAZINE - gms
Individual confidence level = 99.81%
SULFAMERAZINE - gms = 0 subtracted from:
SULFAMERAZINE
- gms Lower Center Upper ---+---------+---------+---------+------
5 2.57 21.30 40.03 (---------*--------)
10 -0.43 18.30 37.03 (--------*---------)
15 -3.83 14.90 33.63 (--------*---------)
---+---------+---------+---------+------
-20 0 20 40
SULFAMERAZINE - gms = 5 subtracted from:
SULFAMERAZINE
- gms Lower Center Upper ---+---------+---------+---------+------
10 -21.73 -3.00 15.73 (---------*--------)
15 -25.13 -6.40 12.33 (---------*--------)
---+---------+---------+---------+------
-20 0 20 40
SULFAMERAZINE - gms = 10 subtracted from:
SULFAMERAZINE
- gms Lower Center Upper ---+---------+---------+---------+------
15 -22.13 -3.40 15.33 (--------*---------)
---+---------+---------+---------+------
-20 0 20 40
11
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 5.1 - Pedestrian light experiment
Resi dual
P
e
r
c
e
n
t
0.2 0.1 0.0 - 0.1 - 0.2
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
38.21 38.20 38.19 38.18 38.17
0.2
0.1
0.0
- 0.1
- 0.2
Resi dual
F
r
e
q
u
e
n
c
y
0. 15 0. 10 0. 05 0. 00 -0. 05 -0. 10 -0. 15 -0. 20
8
6
4
2
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
0.2
0.1
0.0
- 0.1
- 0.2
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or TI ME
There is no evidence of model inadequacy.
12
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 5.4 - Reaction time experiment
One-way ANOVA: REACTION TIME versus TC
Source DF SS MS F P
TC 5 0.025549 0.005110 17.66 0.000
Error 12 0.003472 0.000289
Total 17 0.029021
S = 0.01701 R-Sq = 88.04% R-Sq(adj) = 83.05%
Individual 95% CIs For Mean Based on
Pooled StDev
Level N Mean StDev -----+---------+---------+---------+----
11 3 0.18500 0.01735 (-----*-----)
12 3 0.17867 0.01041 (-----*-----)
13 3 0.21200 0.02088 (------*-----)
21 3 0.26833 0.01102 (-----*-----)
22 3 0.25933 0.02401 (-----*-----)
23 3 0.26500 0.01389 (-----*-----)
-----+---------+---------+---------+----
0.175 0.210 0.245 0.280
Pooled StDev = 0.01701
Resi dual
P
e
r
c
e
n
t
0.04 0.02 0.00 - 0.02 - 0.04
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
0.26 0.24 0.22 0.20 0.18
0.02
0.01
0.00
- 0.01
- 0.02
Resi dual
F
r
e
q
u
e
n
c
y
0.02 0.01 0.00 - 0.01 - 0.02
8
6
4
2
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
18 16 14 12 10 8 6 4 2
0.02
0.01
0.00
- 0.01
- 0.02
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or REACTI ON TI ME
13
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
ORDER
R
e
s
i
d
u
a
l
20 15 10 5 0
0.03
0.02
0.01
0.00
-0.01
-0.02
-0.03
Resi dual s Ver sus ORDER
(r esponse is REACTION TIME)
14
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Chapter 6
Exercise 6.1
The main effects model is given by
ij
ijt
2
ijt
ijt j i ijt
r ..., , 2 , 1 t b ..., , 2 , 1 j a ..., , 2 , 1 i
t independen mutually are s '
) , 0 ( N ~
Y
= = =
+ + + =
The two-way complete model is given by
ij
ijt
2
ijt
ijt ij j i ijt
r ..., , 2 , 1 t b ..., , 2 , 1 j a ..., , 2 , 1 i
t independen mutually are s '
) , 0 ( N ~
Y
= = =
+ + + + =
The two-way main effects model should be used when the effect of each factor on the response
does not depend upon the level of the other factor. In that case we say the two factors do not
"interact" with each other. In this case their effects on the response are "additive". The
significance of this case is that the effects of the two factors can be described separately by
merely analyzing the factor level means or the factor main effects. The main effects in this case
directly describe the effect of changing each factor across their various levels. Under these
circumstances it is also of benefit to use the two-way main effects model because the contrasts or
degrees of freedom for the interaction terms are estimating error. Using this model these degrees
of freedom go into the error term resulting in a better estimate for the error variance
2
.
If the two factors do interact, then the two-way complete model must be used. In this case the
main effects must be treated with caution. In this case for example the main effect for factor A is
the effect of factor A averaged over the levels of factor B. This makes the interpretation of the
main effects difficult and in many cases not even meaningful. In fact under some interaction
conditions, the main effects can be zero while both factor A and factor B have a significant
impact on the response variable.
15
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 6.7 - Weld Strength Experiment
The cell means model
ij
ijt
2
ijt
ijt ij ijt
r ..., , 2 , 1 t b ..., , 2 , 1 j a ..., , 2 , 1 i
t independen mutually are s '
) , 0 ( N ~
Y
= = =
+ + =
6.7 (a) - Results for: WELD_STRENGTH.MTW
MTB > Oneway 'STRNTH' 'TRTMT'.
One-way ANOVA: STRNTH versus TRTMT
Source DF SS MS F P
TRTMT 14 1261.2 90.1 8.24 0.000
Error 15 164.0 10.9
Total 29 1425.2
S = 3.307 R-Sq = 88.49% R-Sq(adj) = 77.75%
Individual 95% CIs For Mean Based on
Pooled StDev
Level N Mean StDev -------+---------+---------+---------+--
11 2 11.000 1.414 (----*----)
12 2 15.000 2.828 (----*----)
13 2 25.500 6.364 (----*---)
14 2 17.000 1.414 (----*----)
15 2 19.000 2.828 (----*----)
21 2 17.000 2.828 (----*----)
22 2 13.000 1.414 (----*----)
23 2 34.000 5.657 (----*----)
24 2 13.000 2.828 (----*----)
25 2 13.000 1.414 (----*----)
31 2 9.000 1.414 (----*----)
32 2 10.500 2.121 (----*---)
33 2 7.500 3.536 (----*---)
34 2 14.500 0.707 (----*---)
35 2 15.000 5.657 (----*----)
-------+---------+---------+---------+--
10 20 30 40
Pooled StDev = 3.307
Since the p-value is less than .001, we would reject the null hypothesis and claim that there is a
statistically significant difference in the average weld strength across the treatments.
16
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
6.7(b) -
For the cell means model the pairwise comparisons are of the form
sh ij
The contrast coefficients are all either {0,-1,+1} where the +1's are in the ij positions, the -1 in
the sh positions and 0 elsewhere.
The contrast comparing gage bar setting 3 to the average of the other two settings is given by
2 / ] [
. 2 . 1 . 3
+
There are several possible strategies for intervals. The most sensible is probably to use Tukey's
method at level 99% for pairwise comparisons, and a t interval at level 99% for the difference of
averages contrasts. The overall level will then be at least 98%.
6.7(c) -
For the Tukey 99% simultaneous intervals for
sh ij
, the formulae are
2
MSE 2
2
q
y y
01 ,. 15 , 155
. sh . ij
The interval for
15 13
is
) 695 . 22 , 695 . 9 ( 933 . 10
2
927 . 6
500 . 6 =
This interval tells us that, with overall 98%confidence, the difference in weld strength between
the third and fifth time of welding for the first gage bar setting is somewhere between -9.695 and
22.695 units.
The interval for 2 / ] [
. 2 . 1 . 3
+ is given by
xMSE ) 8 / 1 8 / 1 2 / 1 ( t 2 / ] [
005 ,. 15 . 2 . 1 . 3
+ + +
9 . 10 x 75 . 95 . 2 2 / ] 3 . 11 0 . 18 [ 5 . 17 +
43 . 8 65 . 14 5 . 17
43 . 8 85 . 2
(-5.58,11.28)
17
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
6.7(d) -
The analysis of variance table gives SSE = 164.0. The chi-squared value at 15 degrees of
freedom with p = .90 in the right hand tail is 8.547. Using formula (3.4.10), we have a 90%
confidence bound for
2
as
188 . 19 547 . 8 / 164
2
= <
6.7(e) -
The formula for the confidence intervals for pairwise comparisons is
r
MSE 2
2
q
y y
01 ,. 15 , 155
. sh . ij
so we need
4
r
MSE
q
01 ),. 1 r ( 15 , 15
<
The upper bound for
2
is 19.188 which use for MSE so we need
r 0834 . ) q ( or 4
r
188 . 19
q
2
01 ),. 1 r ( 15 , 15 01 ),. 1 r ( 15 , 15
< <
We need to solve for r which we must do in an iterative fashion.
r 15(r-1)
2
01 ),. 1 r ( 15 , 15
) q (
0.834r Action
7 90 32.5 5.84 Increase r
20 285 29.7 16.68 Increase r
25 360 29.7 20.85 Increase r
35 510 29.7 29.19 Increase r
36 525 29.7 30.02
So r = 36 is just about right which requires 540 total observations.
18
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 6.8 - Weld Strength Experiment Continued
6.8(a) -
Minitab Project Report
4/16/2007 9:13:59 AM
Welcome to Minitab, press F1 for help.
MTB > WOpen "C:\OSU\COURSES\STAT64~1\DATA\MINITA~1\WELD_STRENGTH.MTW".
Retrieving worksheet from file:
'C:\OSU\COURSES\STAT64~1\DATA\MINITA~1\WELD_STRENGTH.MTW'
Worksheet was saved on Fri Dec 17 2004
Results for: WELD_STRENGTH.MTW
MTB > GLM 'STRNTH' = GAGE| TIME;
SUBC> Brief 1 ;
SUBC> GFourpack;
SUBC> RType 1 .
General Linear Model: STRNTH versus GAGE, TIME
Factor Type Levels Values
GAGE fixed 3 1, 2, 3
TIME fixed 5 1, 2, 3, 4, 5
Analysis of Variance for STRNTH, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
GAGE 2 278.60 278.60 139.30 12.74 0.001
TIME 4 385.53 385.53 96.38 8.82 0.001
GAGE*TIME 8 597.07 597.07 74.63 6.83 0.001
Error 15 164.00 164.00 10.93
Total 29 1425.20
S = 3.30656 R-Sq = 88.49% R-Sq(adj) = 77.75%
The p-value for the test of no interaction effect is less than .05 so we reject that
hypothesis in favor of the alternative hypothesis that there is an interaction effect.
Therefore the effects on weld strength between different gage bar settings depend upon
the level of time used.
6.8(b) -
The interaction plot does support our conclusion in 6.8(a). It indicates that the effect of time is
different for gage 3 compared to the other two gages.
6.8(c) -
The differences in gage bar settings are comparisons of averages taken over the levels of time.
Given the significant interaction effect, these comparisons are probably not meaningful. In and
industrial setting it is probably the case that both gage and time can be set independently and so
the combination that provided the best mean strength would be selected and main effects would
not be of interest.
19
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Resi dual
P
e
r
c
e
n
t
5.0 2.5 0.0 - 2.5 - 5.0
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
30 20 10
5.0
2.5
0.0
- 2.5
- 5.0
Resi dual
F
r
e
q
u
e
n
c
y
4 2 0 - 2 - 4
6.0
4.5
3.0
1.5
0.0
Obser vat i on Or der
R
e
s
i
d
u
a
l
30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
5.0
2.5
0.0
- 2.5
- 5.0
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or STRNTH
M
e
a
n
o
f
S
T
R
N
T
H
3 2 1
22
20
18
16
14
12
10
5 4 3 2 1
GAGE TIME
Mai n Ef f ect s f or Wel d St r engt h
20
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
TI ME
M
e
a
n
5 4 3 2 1
35
30
25
20
15
10
1
2
3
GAGE
I nt er act i on Char t f or Wel d St r engt h
21
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 6.9 - Sample Size Calculation
For a design with factor A at 3 levels and factor B at 4 levels there are v=12 treatments.
Therefore there are 12(r-1) degrees of freedom for error.
The half-width of the Tukey 99% simultaneous pairwise intervals is
r
15
01 ),. 1 r ( 12 , 12
q
so r must be selected so that
5
r
15
q
01 ),. 1 r ( 12 , 12
<
or
2
01 ),. 1 r ( 12 , 12
2
01 ),. 1 r ( 12 , 12
) q ( 6 . r
or
25
r
15
) q (
>
<
r 12(r-1)
2
01 ),. 1 r ( 12 , 12
) q (
2
01 ),. 1 r ( 12 , 12
) q ( 6 .
Action
5 48 33.2 19.9 Increase r
10 108 30.25 18.5 Increase r
15 168 29.59 17.7 Increase r
18 204 27.98 16.8
So it appears that 17 to 18 observations should be adequate.
22
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Exercise 6.16 - Survival Experiment
Minitab Project Report
4/16/2007 9:26:51 AM
Welcome to Minitab, press F1 for help.
MTB > WOpen "C:\OSU\Courses\Stat 641 - DOE\Data\Minitab Files\survival.MTW".
Retrieving worksheet from file: 'C:\OSU\Courses\Stat 641 - DOE\Data\Minitab
Files\survival.MTW'
Worksheet was saved on Fri Dec 17 2004
Results for: survival.MTW
MTB > GLM 'TIME' = POISON| TRTMT;
SUBC> Brief 1 ;
SUBC> GFourpack;
SUBC> RType 1 .
General Linear Model: TIME versus POISON, TRTMT
Factor Type Levels Values
POISON fixed 3 1, 2, 3
TRTMT fixed 4 1, 2, 3, 4
Analysis of Variance for TIME, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
POISON 2 1.03301 1.03301 0.51651 23.22 0.000
TRTMT 3 0.92121 0.92121 0.30707 13.81 0.000
POISON*TRTMT 6 0.25014 0.25014 0.04169 1.87 0.112
Error 36 0.80073 0.80073 0.02224
Total 47 3.00508
S = 0.149139 R-Sq = 73.35% R-Sq(adj) = 65.21%
23
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Resi dual
P
e
r
c
e
n
t
0.4 0.2 0.0 - 0.2 - 0.4
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
0.8 0.6 0.4 0.2
0.4
0.2
0.0
- 0.2
- 0.4
Resi dual
F
r
e
q
u
e
n
c
y
0.4 0.3 0.2 0.1 0.0 - 0.1 - 0.2 - 0.3
24
18
12
6
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
45 40 35 30 25 20 15 10 5 1
0.4
0.2
0.0
- 0.2
- 0.4
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or TI ME
MTB > let c4 = 1/c3
MTB > GLM '1/TIME' = POISON| TRTMT;
SUBC> Brief 1 ;
SUBC> GFourpack;
SUBC> RType 1 .
General Linear Model: 1/TIME versus POISON, TRTMT
Factor Type Levels Values
POISON fixed 3 1, 2, 3
TRTMT fixed 4 1, 2, 3, 4
Analysis of Variance for 1/TIME, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
POISON 2 34.8771 34.8771 17.4386 72.63 0.000
TRTMT 3 20.4143 20.4143 6.8048 28.34 0.000
POISON*TRTMT 6 1.5708 1.5708 0.2618 1.09 0.387
Error 36 8.6431 8.6431 0.2401
Total 47 65.5053
S = 0.489985 R-Sq = 86.81% R-Sq(adj) = 82.77%
24
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
Resi dual
P
e
r
c
e
n
t
1.0 0.5 0.0 - 0.5 - 1.0
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
5 4 3 2 1
1.0
0.5
0.0
- 0.5
- 1.0
Resi dual
F
r
e
q
u
e
n
c
y
1. 00 0. 75 0. 50 0. 25 0. 00 -0. 25 -0. 50 -0. 75
16
12
8
4
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
45 40 35 30 25 20 15 10 5 1
1.0
0.5
0.0
- 0.5
- 1.0
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or 1/ TI ME
MTB > Interact 'POISON' 'TRTMT';
SUBC> Response 'TIME' '1/TIME'.
TRTMT
M
e
a
n
4 3 2 1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
1
2
3
POI SON
I nt er act i on Pl ot ( dat a means) f or TI ME
25
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc
TRTMT
M
e
a
n
4 3 2 1
5
4
3
2
1
1
2
3
POI SON
I nt er act i on Pl ot ( dat a means) f or 1/ TI ME
16 (a) -
The equal variance assumption is clearly violated using the response data on the original scale.
The residual variance increases with increasing values for survival times. The normality
assumption is also violated.
16 (b) -
The model assumptions look much better using the transformed response variable.
Based on this response variable there appears to be no interaction between poison and treatment
and significant main effects for both factors. The rate of dying is significantly higher for poison
#3 no matter which treatment is used. The rate of dying appears to be the lowest for poison #1
independent of which treatment is used.
16 (c) -
Based on the interaction graphs it appears that the average survival time for poison #3 is
significantly lower across all treatments compared to poisons #1 and #2, and that the differences
in the effects of the treatments are much smaller for poison #3 compared to poisons #1 and #2
which is creating the interaction effect.
1
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
Chapter 9 -Homework Solutions
Results for: papertoweltable9-8.MTW
DROP RATE
A
B
S
O
R
B
A
N
C
Y
2.3 2.2 2.1 2.0 1.9 1.8
0.8
0.7
0.6
0.5
0.4
0.3
0.2
Scat t er pl ot of ABSORBANCY vs DROP RATE
DROP RATE
A
B
S
O
R
B
A
N
C
Y
2.3 2.2 2.1 2.0 1.9 1.8
0.8
0.7
0.6
0.5
0.4
0.3
0.2
1
2
3
4
5
6
TRTMT
Scat t er pl ot of ABSORBANCY vs DROP RATE
2
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
General Linear Model: ABSORBANCY versus TRTMT
Factor Type Levels Values
TRTMT fixed 6 1, 2, 3, 4, 5, 6
Analysis of Variance for ABSORBANCY, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
DROP RATE 1 0.114712 0.040553 0.040553 7.26 0.043
TRTMT 5 0.241986 0.241986 0.048397 8.66 0.017
Error 5 0.027941 0.027941 0.005588
Total 11 0.384640
S = 0.0747546 R-Sq = 92.74% R-Sq(adj) = 84.02%
Term Coef SE Coef T P
Constant 1.4951 0.3824 3.91 0.011
DROP RATE -0.5076 0.1884 -2.69 0.043
Unusual Observations for ABSORBANCY
Obs ABSORBANCY Fit SE Fit Residual St Resid
1 0.735500 0.652311 0.062604 0.083189 2.04 R
3 0.388400 0.471589 0.062604 -0.083189 -2.04 R
R denotes an observation with a large standardized residual.
Resi dual
P
e
r
c
e
n
t
0.10 0.05 0.00 - 0.05 - 0.10
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
0.7 0.6 0.5 0.4 0.3
0.10
0.05
0.00
- 0.05
- 0.10
Resi dual
F
r
e
q
u
e
n
c
y
0.075 0.050 0.025 0.000 -0.025 -0.050 -0.075
3
2
1
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
12 11 10 9 8 7 6 5 4 3 2 1
0.10
0.05
0.00
- 0.05
- 0.10
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or ABSORBANCY
3
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
RUN
R
e
s
i
d
u
a
l
12 10 8 6 4 2 0
0.10
0.05
0.00
-0.05
-0.10
Resi dual s Ver sus RUN
(r esponse is ABSORBANCY)
DROP RATE
R
e
s
i
d
u
a
l
2.3 2.2 2.1 2.0 1.9 1.8
0.10
0.05
0.00
-0.05
-0.10
Resi dual s Ver sus DROP RATE
(r esponse is ABSORBANCY)
4
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
General Linear Model: ABSORBANCY versus BRAND, PATTERN
Factor Type Levels Values
BRAND fixed 3 BRAND-1, BRAND-2, BRAND-3
PATTERN fixed 2 PRINTED, WHITE
Analysis of Variance for ABSORBANCY, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
DROP RATE 1 0.114712 0.040553 0.040553 7.26 0.043
BRAND 2 0.142377 0.104557 0.052278 9.36 0.020
PATTERN 1 0.006369 0.001698 0.001698 0.30 0.605
BRAND*PATTERN 2 0.093241 0.093241 0.046620 8.34 0.026
Error 5 0.027941 0.027941 0.005588
Total 11 0.384640
S = 0.0747546 R-Sq = 92.74% R-Sq(adj) = 84.02%
Term Coef SE Coef T P
Constant 1.4951 0.3824 3.91 0.011
DROP RATE -0.5076 0.1884 -2.69 0.043
Unusual Observations for ABSORBANCY
Obs ABSORBANCY Fit SE Fit Residual St Resid
1 0.735500 0.652311 0.062604 0.083189 2.04 R
3 0.388400 0.471589 0.062604 -0.083189 -2.04 R
R denotes an observation with a large standardized residual.
Resi dual
P
e
r
c
e
n
t
0.10 0.05 0.00 - 0.05 - 0.10
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
0.7 0.6 0.5 0.4 0.3
0.10
0.05
0.00
- 0.05
- 0.10
Resi dual
F
r
e
q
u
e
n
c
y
0.075 0.050 0.025 0.000 -0.025 -0.050 -0.075
3
2
1
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
12 11 10 9 8 7 6 5 4 3 2 1
0.10
0.05
0.00
- 0.05
- 0.10
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or ABSORBANCY
5
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
RUN
R
e
s
i
d
u
a
l
12 10 8 6 4 2 0
0.10
0.05
0.00
-0.05
-0.10
Resi dual s Ver sus RUN
(r esponse is ABSORBANCY)
DROP RATE
R
e
s
i
d
u
a
l
2.3 2.2 2.1 2.0 1.9 1.8
0.10
0.05
0.00
-0.05
-0.10
Resi dual s Ver sus DROP RATE
(r esponse is ABSORBANCY)
6
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc
M
e
a
n
o
f
A
B
S
O
R
B
A
N
C
Y
BRAND- 3 BRAND-2 BRAND- 1
0.60
0.55
0.50
0.45
0.40
0.35
0.30
WHITE PRINTED
BRAND PATTERN
Mai n Ef f ect s Pl ot ( f i t t ed means) f or ABSORBANCY
PATTERN
M
e
a
n
WHITE PRINTED
0.7
0.6
0.5
0.4
0.3
0.2
BRAND- 1
BRAND- 2
BRAND- 3
BRAND
I nt er act i on Pl ot ( f i t t ed means) f or ABSORBANCY
1
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Fractional Factorial Designs
Homework Assignment
Problem #1
1. Create a Minitab database for the single replication of the 2
4
experiment below that was
conducted in a completely randomized design.
Factor A = Formulation (1 or 2)
Factor B = Cycle Time (15 sec or 25 sec)
Factor C = Pressure (300 psi or 375 psi)
Factor D = Temperature (110 degrees F or 130 degrees F)
Run A B C D Y
1 1 15 300 110 71
2 2 15 300 110 73
3 1 25 300 110 74
4 2 25 300 110 75
5 1 15 375 110 77
6 2 15 375 110 77
7 1 25 375 110 78
8 2 25 375 110 80
9 1 15 300 130 71
10 2 15 300 130 72
11 1 25 300 130 74
12 2 25 300 130 74
13 1 15 375 130 77
14 2 15 375 130 77
15 1 25 375 130 76
16 2 25 375 130 78
2. Add columns to the Minitab database corresponding to the contrasts presented in Table 7.6 on
page 26 of the class notes.
3 Analyze these data by fitting a model that only includes the main effects and two-factor
interactions.
4. Use the BCD interaction as the generating contrast and the +1 values to construct the
corresponding 2
4-1
fractional factorial design matrix.
5. Write down the confounding pattern. Give a reason why this design might be of interest to an
experimenter.
6. Try analyzing the data for this fractional design by fitting a model that only includes the main
effects and two-factor interactions. What happened and why?
7. Try analyzing the fractional design fitting only the main effects. Compare the results to those
obtained in part #3.
2
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Solutions to Part 3.
Results for: fractional factorial HW.MTW
MTB > GLM 'RESPONSE - Y' = A B C D A*B A*C A*D B*C B*D C*D;
SUBC> Brief 1 ;
SUBC> GFourpack;
SUBC> RType 1 .
General Linear Model: RESPONSE - Y versus A, B, C, D
Factor Type Levels Values
A fixed 2 -1, 1
B fixed 2 -1, 1
C fixed 2 -1, 1
D fixed 2 -1, 1
Analysis of Variance for RESPONSE - Y, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
A 1 4.000 4.000 4.000 5.71 0.062
B 1 12.250 12.250 12.250 17.50 0.009
C 1 81.000 81.000 81.000 115.71 0.000
D 1 2.250 2.250 2.250 3.21 0.133
A*B 1 0.250 0.250 0.250 0.36 0.576
A*C 1 0.000 0.000 0.000 0.00 1.000
A*D 1 0.250 0.250 0.250 0.36 0.576
B*C 1 2.250 2.250 2.250 3.21 0.133
B*D 1 1.000 1.000 1.000 1.43 0.286
C*D 1 0.250 0.250 0.250 0.36 0.576
Error 5 3.500 3.500 0.700
Total 15 107.000
S = 0.836660 R-Sq = 96.73% R-Sq(adj) = 90.19%
Resi dual
P
e
r
c
e
n
t
1.0 0.5 0.0 - 0.5 - 1.0
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
80 78 76 74 72
0.8
0.4
0.0
- 0.4
- 0.8
Resi dual
F
r
e
q
u
e
n
c
y
0.8 0.4 0.0 - 0.4 - 0.8
4
3
2
1
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
0.8
0.4
0.0
- 0.4
- 0.8
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or RESPONSE - Y
3
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
M
e
a
n
o
f
R
E
S
P
O
N
S
E
-
Y
1 -1
77
76
75
74
73
1 -1
1 -1
77
76
75
74
73
1 -1
A B
C D
Mai n Ef f ect s Pl ot ( f i t t ed means) f or RESPONSE - Y
A
C
D
B
1 -1 1 -1 1 -1
78
75
72
78
75
72
78
75
72
- 1
1
A
- 1
1
B
- 1
1
C
I nt er act i on Pl ot ( f i t t ed means) f or RESPONSE - Y
4
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Solutions to Part 5.
A = ABCD
B = CD
C = BD
D = BC
This design might be of interest if factor A were the primary factor of interest. It is not
confounded with two- or three-factor interactions.
Solutions to Part 6.
It will not fit the model because the main effects and two-factor interactions are confounded.
General Linear Model: RESPONSE - Y versus A, B, C, D
Factor Type Levels Values
A fixed 2 -1, 1
B fixed 2 -1, 1
C fixed 2 -1, 1
D fixed 2 -1, 1
Analysis of Variance for RESPONSE - Y, using Adjusted SS for Tests
Model
Source DF Reduced DF Seq SS
A 1 1 2.0000
B 1 1 4.5000
C 1 1 32.0000
D 1 1 4.5000
A*B 1 1 0.5000
A*C 1 1 0.0000
A*D 1 1 0.5000
B*C 1 0+ 0.0000
B*D 1 0+ 0.0000
C*D 1 0+ 0.0000
Error -3 0 0.0000
Total 7 7 44.0000
+ Rank deficiency due to empty cells, unbalanced nesting, collinearity, or an
undeclared covariate. No storage of results or further
analysis will be done.
S = *
5
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Solutions to Part 7.
The results are basically the same except that the main effect for factor D is now significant.
Factor D, however, is confounded with the BC interaction. In looking at the original ANOVA
table these two factors had p-values of .133 and which were the smallest non-significant p-
values. So the main effect for D and the BC interaction are probably not zero and we are
probably picking up the combined effect of these two factors.
General Linear Model: RESPONSE - Y versus A, B, C, D
Factor Type Levels Values
A fixed 2 -1, 1
B fixed 2 -1, 1
C fixed 2 -1, 1
D fixed 2 -1, 1
Analysis of Variance for RESPONSE - Y, using Adjusted SS for Tests
Source DF Seq SS Adj SS Adj MS F P
A 1 2.000 2.000 2.000 6.00 0.092
B 1 4.500 4.500 4.500 13.50 0.035
C 1 32.000 32.000 32.000 96.00 0.002
D 1 4.500 4.500 4.500 13.50 0.035
Error 3 1.000 1.000 0.333
Total 7 44.000
S = 0.577350 R-Sq = 97.73% R-Sq(adj) = 94.70%
6
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Resi dual
P
e
r
c
e
n
t
1.0 0.5 0.0 - 0.5 - 1.0
99
90
50
10
1
Fi t t ed Val ue
R
e
s
i
d
u
a
l
78.0 76.5 75.0 73.5 72.0
0.50
0.25
0.00
- 0.25
- 0.50
Resi dual
F
r
e
q
u
e
n
c
y
0.4 0.2 0.0 - 0.2 - 0.4
4
3
2
1
0
Obser vat i on Or der
R
e
s
i
d
u
a
l
8 7 6 5 4 3 2 1
0.50
0.25
0.00
- 0.25
- 0.50
Normal Probabilit y Plot of t he Residuals Residuals Versus t he Fit t ed Values
Hist ogram of t he Residuals Residuals Versus t he Order of t he Dat a
Resi dual Pl ot s f or RESPONSE - Y
M
e
a
n
o
f
R
E
S
P
O
N
S
E
-
Y
1 -1
77
76
75
74
73
1 -1
1 -1
77
76
75
74
73
1 -1
A B
C D
Mai n Ef f ect s Pl ot ( f i t t ed means) f or RESPONSE - Y
7
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Problem #2
1. Suppose that you are faced with an experiment that involves 7 factors each at two levels. List
the available fractional factorial designs.
2. Select a 1/2 fraction design using the seven factor interaction as the generating contrast. List
the alias structure. Explain why this would be a good design for assessing main effects and two-
factor interactions.
3. Select a 1/16th fraction and list the alias structure. Explain what this design might be useful
for and why.
8
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Solutions to Part 1
Solutions to Part 2
Fractional Factorial Design
Factors: 7 Base Design: 7, 64 Resolution: VII
Runs: 64 Replicates: 1 Fraction: 1/2
Blocks: 1 Center pts (total): 0
Design Generators: G = ABCDEF
Alias Structure
I + ABCDEFG
A + BCDEFG
B + ACDEFG
C + ABDEFG
D + ABCEFG
E + ABCDFG
F + ABCDEG
G + ABCDEF
AB + CDEFG
AC + BDEFG
AD + BCEFG
9
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
AE + BCDFG
AF + BCDEG
AG + BCDEF
BC + ADEFG
BD + ACEFG
BE + ACDFG
BF + ACDEG
BG + ACDEF
CD + ABEFG
CE + ABDFG
CF + ABDEG
CG + ABDEF
DE + ABCFG
DF + ABCEG
DG + ABCEF
EF + ABCDG
EG + ABCDF
FG + ABCDE
ABC + DEFG
ABD + CEFG
ABE + CDFG
ABF + CDEG
ABG + CDEF
ACD + BEFG
ACE + BDFG
ACF + BDEG
ACG + BDEF
ADE + BCFG
ADF + BCEG
ADG + BCEF
AEF + BCDG
AEG + BCDF
AFG + BCDE
BCD + AEFG
BCE + ADFG
BCF + ADEG
BCG + ADEF
BDE + ACFG
BDF + ACEG
BDG + ACEF
BEF + ACDG
BEG + ACDF
BFG + ACDE
CDE + ABFG
CDF + ABEG
CDG + ABEF
CEF + ABDG
CEG + ABDF
CFG + ABDE
DEF + ABCG
DEG + ABCF
DFG + ABCE
EFG + ABCD
10
C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc
Solutions to Part 3
Fractional Factorial Design
Factors: 7 Base Design: 7, 8 Resolution: III
Runs: 8 Replicates: 1 Fraction: 1/16
Blocks: 1 Center pts (total): 0
* NOTE * Some main effects are confounded with two-way interactions.
Design Generators: D = AB, E = AC, F = BC, G = ABC
Alias Structure
I + ABD + ACE + AFG + BCF + BEG + CDG + DEF + ABCG + ABEF + ACDF + ADEG + BCDE + BDFG + CEFG +
ABCDEFG
A + BD + CE + FG + BCG + BEF + CDF + DEG + ABCF + ABEG + ACDG + ADEF + ABCDE + ABDFG + ACEFG +
BCDEFG
B + AD + CF + EG + ACG + AEF + CDE + DFG + ABCE + ABFG + BCDG + BDEF + ABCDF + ABDEG + BCEFG +
ACDEFG
C + AE + BF + DG + ABG + ADF + BDE + EFG + ABCD + ACFG + BCEG + CDEF + ABCEF + ACDEG + BCDFG +
ABDEFG
D + AB + CG + EF + ACF + AEG + BCE + BFG + ACDE + ADFG + BCDF + BDEG + ABCDG + ABDEF + CDEFG +
ABCEFG
E + AC + BG + DF + ABF + ADG + BCD + CFG + ABDE + AEFG + BCEF + CDEG + ABCEG + ACDEF + BDEFG +
ABCDFG
F + AG + BC + DE + ABE + ACD + BDG + CEG + ABDF + ACEF + BEFG + CDFG + ABCFG + ADEFG + BCDEF +
ABCDEG
G + AF + BE + CD + ABC + ADE + BDF + CEF + ABDG + ACEG + BCFG + DEFG + ABEFG + ACDFG + BCDEG +
ABCDEF
This design will probably only be useful as a pilot or screening design in cases where the main
effects are thought to be the dominant effects because all the main effects are heavily
confounded with two-factor and higher order interaction terms.
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 6
12 February 2003
Solutions available in this le
c 2003 Angela Dean. All rights reserved.
No part of this work may be displayed on the web. No part of this work may be reproduced
in any form without the written permission of Angela Dean, The Ohio State University.
CHAPTER 6.2
CHAPTER 6.7 weld strength experiment
CHAPTER 6.8 weld strength experiment
CHAPTER 6.15 ink experiment
CHAPTER 6.16 - survival experiment
CHAPTER 6.17 estimability
CHAPTER 6.21 water boiling
1
Solution to Question 6.2
Verify that (
ij
i.
.j
+
..
) is an interaction contrast for the two-way complete model. Write
down the list of contrast coecients in terms of the
ij
s as a = 3 levels and factor B has b = 4 levels.
We can verify this by substituting the equivalent two-way complete model notation with
ij
=
i
+
j
+ ()
ij
. This gives the contrast
()
ij
()
i.
()
.j
+
line()
..
which is a function of interaction parameters only.
For simplicity, let i = j = 1, then we want the contrast coecients for the contrast
11
1.
.1
+
..
=
11
1
b
b
j=1
1j
1
a
a
j=1
i1
1
ab
a
i=1
b
j=1
ij
with
Now let a = 3 and b = 4. The, the coecients must be as in the following table.
ij
term 1 term 2 term 3 term4 Total
11
1
1
4
1
3
1
12
20
12
12
1
4
1
12
4
12
13
1
4
1
12
4
12
14
1
4
1
12
4
12
21
1
3
1
12
4
12
22
1
12
1
12
23
1
12
1
12
24
1
12
1
12
31
1
3
1
12
5
12
32
1
12
1
12
33
1
12
1
12
34
1
12
1
12
2
Solution to Question 6.7 weld strength experiment
a) Using the cell-means model (6.2.1) for these data, test the hypothesis that there is no dierence
in the eects of the treatment combinations on weld strength against the alternative hypothesis that
at least two treatment combinations have dierent eects.
The analysis of variance for the cell means model is as follows:
General Linear Models Procedure
Dependent Variable: STRNTH
Source DF Sum of Squares F Value Pr > F
Model 14 1261.20000000 8.24 0.0001
Error 15 164.00000000
Corrected Total 29 1425.20000000
Source DF Type III SS F Value Pr > F
TC 14 1261.20000000 8.24 0.0001
Since the p-value is less than 0.0001, for most reasonable choices of signicance level, we would
reject the hypothesis of no eect of the treatment combinations and conclude that the dierent
combinations of gage bar setting and time of welding do have dierent eects on the strength of
the weld.
b) Suppose the experimenters had planned to calculate condence intervals for all pairwise com-
parisons between the treatment combinations, and also to look at the condence interval for the
dierence between gage bar setting 3 and the average of the other two. Show what these contrasts
look like in terms of the parameters
ij
of the cell-means model, and suggest a strategy for calculating
all intervals at overall level at least 98%.
In terms of the parameters
ij
of the cell means model, the pairwise comparisons of interest are of
the form
ij
sh
which has coecient list
[000...010.....0 10...0]
where the 1 and -1 are in positions ij and sh respectively.
The other contrast is of the form
3.
[
1.
+
2.
]/2 which has coecient list
[0.5 0.5....... 0.51.0.......1.0]
where there are 10 occurrences of -0.5 and ve occurrences of 1.0
There are several possible strategies for intervals. The most sensible is probably to use Tukeys
method at level 99% for the pairwise comparisons, and a t interval at level 99% for the dierence
of averages contrast. The overall level will then be at least 98%.
c) Give formulae for the intervals in part (b). As an example, calculate the actual interval for
13
15
(the dierence in the true mean strengths at the 3rd and 5th times of welding for the rst gage bar
setting). Explain what this interval tells you.
For the Tukey 99% simulataneous intervals for
ij
sh
, the formulae are
y
ij.
y
sh
q
15,15,.01
2
2
msE .
3
The interval for
13
15
from SAS is
6.500 (6.927/
2)
1
2
+
1
8
+
1
8
msE
=
d) Calculate an upper 90% condence limit for
2
.
The analysis of variance table gives ssE = 164.0. The chi-squared value with 15 degrees of freedom
and prob .9 in the right hand tail is 8.547.
Using formula (3.4.10), we have a 90% condence bound for
2
as
2
164/8.547 = 19.188.
e) If the experimenters were to repeat this experiment and needed the pairwise comparison inter-
vals in (b) to be of width at most 8, how many observations should they take on each treatment
combination? How many observations is this in total?
The formula for the condence intervals for pairwise comparisons in b) is
(y
ij.
y
sh.
) q
15,15r15,.01
/
msE (2/r)
So we need
q
15,15r15,.01
msE/r 4
using the upper bound for
2
of 19.188 in place of msE, we need
q
15,15r15,.01
19.188/r 4
that is
q
2
15,15r15,.01
0.834r
We now need to solve for r .
r 15(r 1) q
2
15,1(5r1),0.01
0.834r Action
7 90 5.7
2
= 32.49 5.84 Increase r
20 285 5.45
2
= 29.7 16.68 Increase r
25 360 5.45
2
= 29.7 20.85 Increase r
35 510 5.45
2
= 29.7 29.19 Increase r
36 525 5.45
2
= 29.7 30.02
r = 36 is about right which requires 540 observations in total. If you use msE=10.9333, you will
require fewer observations. But you need to justify why you think the msE would be about the
same value in the next experiment.
4
Solution to Question 6.8 weld strength
a) Test the hypothesis of no interaction between gage bar setting and time of weld and state your
conclusion.
The analysis of variance table for the two-way complete model is as follows:
General Linear Models Procedure
Dependent Variable: STRNTH
Source DF Sum of Squares F Value Pr > F
Model 14 1261.20000000 8.24 0.0001
Error 15 164.00000000
Corrected Total 29 1425.20000000
Source DF Type III SS F Value Pr > F
GAGE 2 278.60000000 12.74 0.0006
TIME 4 385.53333333 8.82 0.0007
GAGE*TIME 8 597.06666667 6.83 0.0008
We are doing three hypothesis tests. If we choose an overall level of, say, 0.06, we can do each test
at level 0.02. Since the p-value for the test of no interaction is less than 0.02, we reject the hypothesis
of negligible interaction and conclude that the eects on the weld strength between diernt gage bar
settings are not the same at the dierent times of weld.
b) Draw an interaction plot for the two factors Gage bar setting and Time of welding. Does your
interaction plot support the conclusion of your hypothesis test? Explain.
The interaction plot below shows that some of the times of weld are similar, but that the interaction
of gage bar setting with time 3, in particular is quite dierent. This agrees with the hypothesis test that
there is an interaction between gage bar setting and weld time.
Plot of AVSTR*TIME. Symbol is value of GAGE.
AVSTR |
40 +
|
| 2
|
30 +
|
| 1
|
20 + 1
|2 1
| 1 3 3
| 2 2 2
10 +1 3
| 3
|
|
0 +
|
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
TIME
NOTE: 1 obs hidden.
5
c) In view of your answer to part (b), is it sensible to investigate the dierences between the eects
of gage bar setting? Why or why not? Indicate on your plot what would be compared.
The dierences between gage bar settings are comparisons of averages (averaging over the levels
of time, and hence over the interaction). This is probably not of interest since the time of weld can
presumably be set in the industrial process.
d) Regardless of your answer to (c), suppose the experimenters had decided to look at the linear trend
in the eect of gage bar settings. Test the hypothesis that the linear trend in gage setting is negligible
(against the alternative hypothesis that it is not negligible).
From SAS, a test of the hypothsis of no linear trend in the weld strength due to time of weld gives a
sum of squares
(y
3..
y
1..
)
2
/(2/10) = (11.3 17.5)
2
/(2/10) = 192.2
General Linear Models Procedure
Dependent Variable: STRNTH
Contrast DF Contrast SS F Value Pr > F
LIN GAGE 1 192.20000000 17.58 0.0008
The p-value is 0.0008, so for most choices of type I error probability (signicance level) the hypothesis
of no linear trend would be rejected. (Notice that the hypothesis test gives no indication of direction of
trend, since the alternative hypothesis is two-sided.)
6
Solution to Question 6.15 ink experiment
a) Obvious diculties in running the experiment include:
Getting the same amount of stain on each piece of cloth
Washing in water of exactly the same temperature
Reading the 19-point scale
Obvious diculties in analysing the experiment include:
The possibility of non-constant variance due to inaccurate reading of the scale and dierent
propoerties of the cloth.
The possibility of non-normal data due to a discrete scale and diculties reading it.
Ways to reduce the diculties in reading the scale is to have the same person do all the reading
and have him/her have plenty of practice and training beforehand.
Controlling water temperature in the washing machine is dicult unless the cold setting is used.
Cold tap water should be less variable.
Some careful measuring of the amount of stain used and administering it to a constant spot would
be needed.
Non-constant variance would need a transformation or Satterthwaites method. Non-normal data
with equal variances could be analysed with nonparametric methods.
b) The water temperature may vary from wash to wash. If some pieces of cloth are washed in the
same wash and some in dierent, the error variability will no tbe constant. if all pieces of cloth
are washed together then the natrual variability that occurs between washes will not be seen in the
experiment.
c) Plot of Y*CLOTH. Symbol is value of METHOD.
Y |
|
11 + 1
10 +
9 +1 1
8 +1 2
7 +
6 +2 2
5 +2
4 + 1
3 + 1
2 +
1 + 2,2
|
-+-----------------------+-----------------------+-
1 2 3
CLOTH
7
Plot of Y*METHOD. Symbol is value of CLOTH.
Y |
|
|
|
|
|
|
11 + 2
10 +
9 + 1,2
8 + 1 2
7 +
6 + 1,2
5 + 1
4 + 3
3 + 3
2 +
1 + 3,3
|
--+--------------------------------+---------------
1 2
METHOD
If points for corresponding treatment levels are joined up on the two plots, the lines are remarkably
parallel. This suggests that the two-way main eects model would be suitable for this experiment.
Since the stain remover is presumably designed to work on the stain itself rather than to interact
with the cloth, perhaps this could have been anticipated.
d) The GLM Procedure
Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 3 109.2500000 36.4166667 51.41 <.0001
Error 8 5.6666667 0.7083333
Corrected Total 11 114.9166667
The analysis of this pilot data gives ssE = 5.666 based on df = 8 error degrees of freedom. A 90%
unpper bound for sigma
2
is
ssE
2
8,.9
=
5.666
3.49
= 1.624.
For pairwise dierences, we require that each interval in a set of simultaneous 95% condence
intervals (for each factor separately), using Tukeys method, satises msd 1. For the two-way
main eects model, the error degrees of freedom are df = n a b + 1 = 6r 3 2 + 1 = 6r 4.
So, for A, we require
q
a,6r4,.05
2
rb
(1.624) 1
that is, q
2
3,6r4,.05
1.2315r.
8
r 6r 4 q
2
3,6r4,.05
1.2315r Action
10 56 3.4
2
= 11.56 12,31 Decrease r
8 44 3.44
2
= 11.83 9.85 Increase r
7 38 3.42
2
= 11.70 11.08 Increase r
Taking r = 10 observations on each of the six treatment combinations is likely produce condence
intervals of the required length.
Now we need to do a similar calculations for the single interval for B. So, for B, we require
t
6r4,.05
2
ar
(1.624) 1
that is, t
2
6r4,.05
0.9236r. If we take r = 10 observations per treatment combination, then
t
2
56,.05
= 1.673
2
= 2.799 which is less than 0.9236r = 9.236
so r = 10 observations is plenty to satisfy both requirements.
9
Solution to Question 6.16 survival experiment
a. EQUAL VARIANCE ASSUMPTIONS
Plot of Z*YHAT. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
| A
|
| A
|
2 + A
| A
| A
|
| C A A
| A D A A A
0 + B B CA A A
| A A A A
| A C B A
| A AB A
| A A A
| A
-2 +
--+--------+--------+--------+--------+--------+---
0.0 0.2 0.4 0.6 0.8 1.0
YHAT
The equal variance assumption is denitely violated, with variance increasing for large yhats. There
is no need to check for any other assumptions, but if we do we would see normalisty violated also:
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z |
|
| A
|
| A
|
2 + A
| A
| A
|
| ABB
| BCBA
0 + BDCA
| CA
| BBC
| ABB
| AAA
| A
-2 +
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
Rank for Variable Z
10
Independence cannot be checked since we dont have the observation orders.
b. TRANSFORMED DATA
Plot of Z*YHAT. Legend: A = 1 obs, B = 2 obs, etc.
Z |
|
|
| A
|
2 + A A
| A
| A
| A A A A
|A A A A A
|B A A B A
0 + A A A A A
|A A A A A
| AA A A A
| A A A B A A
| A A
| A A A
-2 +
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
YHAT
Plot of Z*TRTMT. Legend: A = 1 obs, B = 2 obs, etc.
Z |
|
| A
|
2 + A A
| A
| A
| A B A
| A B A A
| C C A
0 + A A C
| A A B A
| B A A A
| C B A A
| A A
| A A A
-2 +
--+------------+------------+------------+---------
1 2 3 4
TRTMT
11
Plot of Z*POISON. Legend: A = 1 obs, B = 2 obs, etc.
Z |
|
| A
|
2 +A A
| A
| A
|A A B
|B B A
|E A A
0 +A A C
|A A C
|A A C
|C C A
| A A
|A B
-2 +
-+-----------------------+-----------------------+-
1 2 3
POISON
The equal variance assumption looks more likely to be satised now. The two residual vs factor plots
do not show any obvious dierences in variance between factor levels.
Obs TC AVTY VTY
1 11 2.48688 0.24667
2 12 1.16346 0.03980
3 13 1.86272 0.23949
4 14 1.68968 0.13302
5 21 3.26847 0.67622
6 22 1.39339 0.30602
7 23 2.71392 0.17432
8 24 1.70153 0.49267
9 31 4.80269 0.28051
10 32 3.02897 0.17761
11 33 4.26499 0.05514
12 34 3.09181 0.05956
We can see that, there is still some imbalance in the variances in the cells. Ratio 0.6762/0.0398. So
the transformation has not worked completely. The original ratio of variances was 0.1131/0.0007 !!
With the transformed data Normality appears approximately satised as the Normal Prob. plot
looks fairly straight. (see next plot) Independence cannot be checked since we dont have the observation
orders.
12
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z |
|
|
| A
|
2 + AA
| A
| A
| BB
| ABB
| BCB
0 + DA
| BC
| ACA
| BBBA
| AA
| A AA
-2 +
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
Rank for Variable Z
c. INTERACTION PLOTS
For the original data, there is some evidence of interaction as survival times for treatments 1-3 are
decreasing for poison 1-3, but for treatment 4, the survival time is higher for poison 2.
Plot of MN_Y*POISON. Symbol is value of TRTMT.
MN_Y |
1.00 +
|
|2
| 2
0.75 +
| 4
|4
|3
0.50 +
|1
| 3
| 1 2
0.25 + 3
| 1
|
|
0.00 +
|
-+-----------------------+-----------------------+-
1 2 3
POISON
NOTE: 1 obs hidden.
The interaction plots for the death rates also show some interaction, only now, the pattern is reversed,
i.e. death rates increases for treatments 1-3 from poison 1-3, but for treatment two the death rate is
lowest for poison 3.
13
Plot of MN_INV*POISON. Symbol is value of TRTMT.
MN_INV |
|
5 +
| 1
|
|
| 3
|
4 +
|
|
|
| 1
| 4
3 + 2
|
| 3
|1
|
|
2 +
|3
|4 4
|
| 2
|2
1 +
|
-+-----------------------+-----------------------+-
1 2 3
POISON
** survival experiment; ** chapter 6;
OPTIONS LINESIZE=75;
DATA SVL;
INPUT POISON TRTMT TIME;
LINES;
1 1 0.31
1 1 0.45
1 1 0.46
1 1 0.43
1 2 0.82
1 2 1.10
1 2 0.88
1 2 0.72
1 3 0.43
1 3 0.45
1 3 0.63
1 3 0.76
1 4 0.45
1 4 0.71
1 4 0.66
14
1 4 0.62
2 1 0.36
2 1 0.29
2 1 0.40
2 1 0.23
2 2 0.92
2 2 0.61
2 2 0.49
2 2 1.24
2 3 0.44
2 3 0.35
2 3 0.31
2 3 0.40
2 4 0.56
2 4 1.02
2 4 0.71
2 4 0.38
3 1 0.22
3 1 0.21
3 1 0.18
3 1 0.23
3 2 0.30
3 2 0.37
3 2 0.38
3 2 0.29
3 3 0.23
3 3 0.25
3 3 0.24
3 3 0.22
3 4 0.30
3 4 0.36
3 4 0.31
3 4 0.33
;
RUN;
PROC GLM;
CLASSES POISON TRTMT;
MODEL TIME=POISON TRTMT;
OUTPUT OUT=DATA2 PREDICTED=YHAT RESIDUAL=Z;
PROC STANDARD STD=1.0;
VAR Z;
PROC RANK NORMAL=BLOM;
VAR Z;
RANKS NSCORE;
PROC PLOT;
PLOT Z*POISON Z*TRTMT Z*YHAT Z*NSCORE/VPOS=20 HPOS=50;
RUN; QUIT;
*******************************************************
* TRANSFORM DATA *
15
*******************************************************
DATA INV_SVL; SET SVL;
INV_TIME=1/TIME;
RUN;
PROC PRINT; RUN;
PROC GLM;
CLASSES POISON TRTMT;
MODEL INV_TIME=POISON TRTMT;
OUTPUT OUT=DATA3 PREDICTED=YHAT RESIDUAL=Z;
PROC STANDARD STD=1.0;
VAR Z;
PROC RANK NORMAL=BLOM;
VAR Z;
RANKS NSCORE;
PROC PLOT;
PLOT Z*POISON Z*TRTMT Z*YHAT Z*NSCORE/VPOS=20 HPOS=50;
RUN; QUIT;
*******************************************************
* INTERACTION PLOTS *
*******************************************************
PROC SORT DATA=DATA2;
BY POISON TRTMT;
PROC MEANS DATA=DATA2 NOPRINT MEAN VAR;
VAR TIME;
BY POISON TRTMT;
OUTPUT OUT=INT_Y MEAN=MN_Y VAR=VAR_Y;
PROC PLOT;
PLOT MN_Y*POISON=TRTMT / VPOS=20 HPOS=50;
PLOT MN_Y*TRTMT=POISON / VPOS=20 HPOS=50;
RUN; QUIT;
PROC SORT DATA=DATA3;
BY POISON TRTMT;
PROC MEANS DATA=DATA3 NOPRINT MEAN VAR;
VAR INV_TIME;
BY POISON TRTMT;
OUTPUT OUT=INT_INV MEAN=MN_INV VAR=VAR_INV;
PROC PLOT;
PLOT MN_INV*TRTMT=POISON / VPOS=20 HPOS=50;
PLOT MN_INV*POISON=TRTMT / VPOS=20 HPOS=50;
RUN; QUIT;
***************************************************
*AVERAGES *
***************************************************
;
16
DATA data8; SET SVL;
PROC GLM ;
CLASS TC;
MODEL TIME=TC;
PROC MEANS NOPRINT MEAN VAR;
VAR TIME;
BY TC;
OUTPUT OUT=OUT8 MEAN=AVTY VAR=VTY;
PROC PRINT;
VAR TC AVTY VTY;
DATA data9; SET INV_SVL;
PROC GLM data=data3;
CLASS TC;
MODEL INV_TIME=TC;
PROC MEANS NOPRINT MEAN VAR;
VAR INV_TIME;
BY TC;
OUTPUT OUT=OUT8 MEAN=AVTY VAR=VTY;
PROC PRINT;
VAR TC AVTY VTY;
RUN; QUIT;
17
Solution to Question 6.17 estimability
a) For the two-way main eects model, all combinations of +
i
+
j
are estimable; that is, all
functions of the form
i
j
d
ij
( +
i
+
j
).
(i) Setting d
12
= 1 and all other d
ij
= 0 gives the required function, so it is estimable.
(ii) Setting d
11
= d
12
= 0.5 and all other d
ij
= 0 gives the required function, so it is estimable.
(iii) There is no way to choose the d
ij
so that the
i
and the cancel. So the function is not estimable
it is not a contrast in the
j
.
b) For equal sample sizes,
E[Y
i..
] =
1
3r
E[Y
i11
+ . . . + Y
i1r
+ Y
i21
+ . . . + Y
i2r
+ Y
i31
+ . . . + Y
i3r
]
=
1
3r
[r( +
i
+
1
) + r( +
i
+
2
) + r( +
i
+
3
)]
= +
i
+
.
Similarly,
E[Y
.j.
] = +
.
+
j
E[Y
...
] = +
.
+
.
and the result follows.
It is easiest to calculate the variance if we write the expression in terms of the individual random
variables (otherwsie we have to worry about covariances between terms).
Y
i..
+ Y
.j.
Y
...
= [Y
i11
+ Y
i12
+ . . . + Y
ibr
]/br
+ [Y
1j1
+ Y
1j2
+ . . . + Y
ajr
]/ar
[Y
111
+ Y
112
+ . . . + Y
abr
]/abr
So , if we collect up the terms,
[Y
ij1
+ Y
ij2
+ . . . + Y
ijr
] has multiplier
a + b 1
abr
[Y
sj1
+ Y
sj2
+ . . . + Y
sjr
] has multiplier
b 1
abr
for each s = i
[Y
ih1
+ Y
ih2
+ . . . + Y
ihr
] has multiplier
a 1
abr
for each h = j
[Y
sh1
+ Y
sh2
+ . . . + Y
shr
] has multiplier
1
abr
for each s = i andh = j
Since V ar[Y
ijt
] =
2
, it follows that
V ar[Y
i..
+ Y
.j.
Y
...
]
=
2
r
(a + b 1)
abr
2
+
2
(a 1)r
(b 1)
abr
2
+
2
(b 1)r
(a 1)
abr
2
+
2
(a 1)(b 1)r
1
abr
2
18
=
2
a
2
b
2
r
[(a + b 1)
2
+ (a 1)((b 1)
2
+ (a 1)
2
(b 1) + (a 1)(b 1)]
=
2
a
2
b
2
r
[(a + b 1)
2
+ (a 1)(b 1)(a + b 1)]
=
2
a
2
b
2
r
[(a + b 1)(a + b 1 + ab a b + 1)]
=
2
a
2
b
2
r
[(a + b 1)(ab)] =
(a + b 1)
2
abr
.
c) From part a),
E[Y
i..
] = +
i
+
.
.
So
E[c
i
Y
i..
] = c
i
+ c
i
i
+ c
i
.
,
and since c
i
= 0, it follows that E[c
i
Y
i..
] = c
i
i
.
19
Solution to Question 6.21 water boiling experiment
a) Check the assumptions on the two-way main-eects model.
The plot of residuals versus predicted values is as follows
Plot of Z*PREDY. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A A
| B
| BA
| A B B
| E B D
0 + BC BC
|
| C C
Z | B A
| A A
| A
-2 + A
|
|
|
|
| A
-4 +
-+-----------+-----------+-----------+-----------+-
2 4 6 8 10
PREDY
There appears to be an extreme outlier. This corresponds to observation burner 1 (right back), salt
2 teaspoons, order=13, y
121
= 4. We can see the outlier in the normal prob plot also, which appears
reasonably like a straight line without the outlier. Similiarly there are no problems with independence
apart from the outlier.
The analysis without the outlier is done in part d). If we include the outlier the analysis is as in parts
(b) and (c).
b) Calculate a 99% set of Tukey condence intervals for pairwise dierences between the levels of
salt, and calculate separately a 99% set of intervals for pairwise dierences between the levels of burner.
Dependent Variable: TIME
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 6 117.333333 19.555556 41.47 0.0001
Error 41 19.333333 0.471545
Corrected Total 47 136.666667
Source DF Type III SS Mean Square F Value Pr > F
BURNER 3 110.500000 36.833333 78.11 0.0001
SALT 3 6.833333 2.277778 4.83 0.0057
With the outlier, the Tukey intervals at oveall condence level 99% show all burners except 1 and 3 to
be dierent. The biggest dierence is between burners 2 and 4 with burner 2 boiling the water between
3.3208 and 5.179 minutes faster. We are unable to see any dierences between the eects of the salt
levels:
20
The GLM Procedure
Tukeys Studentized Range (HSD) Test for TIME
NOTE: This test controls the type I experimentwise error rate.
Alpha 0.01
Error Degrees of Freedom 41
Error Mean Square 0.471545
Critical Value of Studentized Range 4.68765
Minimum Significant Difference 0.9292
Comparisons significant at the 0.01 level are indicated by ***.
Difference Simultaneous
BURNER Between 99% Confidence
Comparison Means Interval
4 - 1 1.7500 0.8208 2.6792 ***
4 - 3 2.3333 1.4041 3.2626 ***
4 - 2 4.2500 3.3208 5.1792 ***
1 - 3 0.5833 -0.3459 1.5126
1 - 2 2.5000 1.5708 3.4292 ***
3 - 2 1.9167 0.9874 2.8459 ***
Tukeys Studentized Range (HSD) Test for TIME
NOTE: This test controls the type I experimentwise error rate.
Alpha 0.01
Error Degrees of Freedom 41
Error Mean Square 0.471545
Critical Value of Studentized Range 4.68765
Minimum Significant Difference 0.9292
Comparisons significant at the 0.01 level are indicated by ***.
Difference Simultaneous
SALT Between 99% Confidence
Comparison Means Interval
4 - 0 0.0833 -0.8459 1.0126
4 - 2 0.7500 -0.1792 1.6792
4 - 6 0.8333 -0.0959 1.7626
0 - 2 0.6667 -0.2626 1.5959
0 - 6 0.7500 -0.1792 1.6792
2 - 6 0.0833 -0.8459 1.0126
c) Test a hypothesis that there is no linear trend in the time to boil water due to the level of salt. Do
a similar test for a quadratic trend.
The tests for the hypotheses H
0
:{ no linear trend due to salt} and H
0
: {no quadratic trend due to
salt} have p-values 0.0982 and 0.6764 respectively. So the null hypotheses would not be rejected at most
usual choices of signicance level.
The GLM Procedure
Dependent Variable: TIME
Contrast DF Contrast SS Mean Square F Value Pr > F
LIN SALT 1 1.35000000 1.35000000 2.86 0.0982
QUAD SALT 1 0.08333333 0.08333333 0.18 0.6764
21
d) The experimenter believed that observation number 13 was an outlier, since it has a large stan-
dardized residual and it was an observation taken late on a Friday evening. Repeat the analysis in (b)
and (c) removing this observation. Which analysis do you prefer? Why?
If we remove the outlier, some of the residual plots are:
Plot of Z*PREDY. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
|
| A
2 + A
| A
| A AD
| C B B CA
0 + B B B
| B BC C
| E A A
| A A
-2 + A
| A
|
|
-4 +
|
-+-----------+-----------+-----------+-----------+-
2 4 6 8 10
PREDY
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
|
| A
2 + A
| A
| ABB A
| ABCCB
0 + DB
| BCCB
| AB D
| AA
-2 + A
| A
|
|
-4 +
|
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
RANK FOR VARIABLE Z
22
Plot of Z*ORDER. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
|
| A
2 + A
| A
| A A A A A A
| A AA AA AA AAA A
0 + A A A AAA
| A A AAA A A A A A
| A A A A A A A
| A A
-2 + A
| A
|
|
-4 +
|
-+-------+-------+-------+-------+-------+-------+-
0 8 16 24 32 40 48
ORDER
The equal variance assumption per cell looks fairly well satised. here are a lot of ties in the data
making it dicult to gauge accurately. The normality assumption is questionable, possibly due to the
ties. The plot of residuals against order of observation shows no patterns.
The analysis of variance given by SAS is:
Dependent Variable: TIME
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 6 118.147033 19.691172 60.78 0.0001
Error 40 12.959350 0.323984
Corrected Total 46 131.106383
Source DF Type III SS Mean Square F Value Pr > F
BURNER 3 112.510347 37.503449 115.76 0.0001
SALT 3 5.449741 1.816580 5.61 0.0026
At an overall alpha level of at most 0.01 (each test at .05), the hypotheses of no eect of burner and
no eect of salt would both be rejected.
Least Squares Means for Effect BURNER
Difference Simultaneous 99%
Between Confidence Interval for
i j Means LSMean(i)-LSMean(j)
1 2 2.727642 1.937580 3.517705
1 3 0.810976 0.020913 1.601038
1 4 -1.522358 -2.312420 -0.732295
2 3 -1.916667 -2.688137 -1.145197
2 4 -4.250000 -5.021470 -3.478530
3 4 -2.333333 -3.104803 -1.561863
23
Least Squares Means for Effect SALT
Difference Simultaneous 99%
Between Confidence Interval for
i j Means LSMean(i)-LSMean(j)
1 2 0.439024 -0.351038 1.229087
1 3 -0.083333 -0.854803 0.688137
1 4 0.750000 -0.021470 1.521470
2 3 -0.522358 -1.312420 0.267705
2 4 0.310976 -0.479087 1.101038
3 4 0.833333 0.061863 1.604803
We can see the Tukey 99% condence intervals show all burners to be dierent and, again the largest
dierence is between burners 2 and 4 with a similar dierence as the analysis in b).
The 99% intervals for salt show small dierence in time between salt levels 3 and 4.
The test for the trends in salt requires coecients to be calculated since the levels no longer have the
same number of observations. The formula for the linear trend coecients is given on Page 71 as
c
i
= r
i
(47x
i
118) where x
i
are the coded level 1, 2, 3, 4.
These coecients work out to be -852 -264 276 840.
We can divide by 12 and use the coecients -71 -22 23 70.
(Notice these are just a little dierent from the equally spaced level coecients of -3 -1 1 3.)
The GLM Procedure
Dependent Variable: TIME
Contrast DF Contrast SS Mean Square F Value Pr > F
LIN SALT 1 1.82689454 1.82689454 5.64 0.0225
The p-value is 0.0225 instead of 0.0982 that was obtained when the outlier was included. This would
now be signicant if an individual signicance level of over 0.023 had been selected. Otherwise, the
results are surprisingly close. Here the experimenter truely believed the observation was incorrect. In
this the case, the analysis without the outlier might be preferred. Otherwise, since they are so similar,
the analysis with the outlier might be preferable.
24
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 3
23 August 2006
Solutions available in this le
c 2006 Angela Dean. All rights reserved. No part of this work may be displayed on the web
without permission. No part of this work may be reproduced in any form without the written
permission of Angela Dean, The Ohio State University.
Question 3.2 Randomization
Question 3.3 Randomization
Question 3.4 Estimation
Question 3.5 Estimation
Question 3.12 Balloon experiment
Question 3.13 Heart-lung pump experiment, continued
Question 3.15 Trout experiment
Question 3.16 Trout experiment, sample sizes
Question 3.19 Sample size calculation
1
Solution to Question 3.2
Suppose that you are planning to run an experiment with one treatment factor having three levels
and no blocking factor. It has been determined that r
1
= 3, r
2
= r
3
= 5. Assign at random 13
experimental units to the v = 3 treatments so that the rst treatment is assigned 3 units and the
other two treatments are each assigned 5 units.
SAS commands as given in Section 3.8.1 with treatment 1 listed 3 times and treatments 2 and
3 each listed 5 times are given below. Alternatively, one can assign the random numbers by hand
using Table A.1 and following Section 3.2.
data design;
input treat @@;
ranno=ranuni(0);
lines;
1 1 1 2 2 2 2 2 3 3 3 3 3
;
proc sort;
by ranno;
proc print;
run;
SAS PRINTOUT
Obs treat ranno
1 2 0.17343
2 3 0.26774
3 2 0.39478
4 2 0.43455
5 3 0.52564
6 2 0.60382
7 3 0.72904
8 1 0.77178
9 3 0.79472
10 2 0.80521
11 3 0.90078
12 1 0.91355
13 1 0.99821
We then assign the experimental units in order to the randomly ordered list of treatments. Since
this is a random ordering, no two solutions are likely to be identical.
2
Solution to Question 3.3 Randomization
Suppose that you are planning to run an experiment with three treatment factors, where the rst
factor has two levels and the other factors have three levels each. Write out the coded form of the
18 treatment combinations. Assign 36 experimental units at random to the treatment combinations
so that each treatment combination is assigned two units.
SAS commands as given in Section 3.8.1 with each of the 18 treatment combinations listed twice.
data design;
input treat @@;
ranno=ranuni(0);
lines;
111 111 112 112 113 113 121 121 122 122 123 123 131 131 132 132 133 133
211 211 212 212 213 213 221 221 222 222 223 223 231 231 232 232 233 233
;
proc sort;
by ranno;
proc print;
run;
SAS PRINTOUT
OBS TREAT RANNO
1 121 0.00247
2 113 0.05134
3 212 0.05963
4 122 0.08012
5 222 0.08204
6 113 0.11382
: : :
: : :
33 231 0.88784
34 131 0.92804
35 131 0.96630
36 223 0.98881
We then assign the experimental units in order to the randomly ordered list of treatments. Since
this is a random ordering, no two solutions are likely to be identical.
3
Solution to Question 3.4 Estimation
For the one-way analysis of variance model (3.3.1), page 36, the solution to the normal equations
used by the SAS software is
i
= y
i.
y
v.
(i = 1, . . . , v) and = y
v.
.
(a) Is
i
estimable? Explain.
i
is not estimable since it cannot be written in the form
v
i=1
b
i
( +
i
). Any choice of the b
i
would result in a function which includes and/or at least one of the other
j
.
(b) Calculate the expected value of the least squares estimator for
1
2
corresponding to the
above solution. Is
1
2
estimable? Explain.
The above solution gives least squares estimate of
1
2
as y
1.
y
2.
, so the least squares estimator
of
1
2
is Y
1.
Y
2.
and
E
Y
i.
= E
1
r
i
ri
t=1
Y
it
=
1
r
i
ri
t=1
( +
i
)
= +
i
So,
E
Y
1.
Y
2.
= ( +
1
) ( +
2
) =
1
2
,
so
1
2
estimable.
Solution to Question 3.5 Estimation
Consider a completely randomized with observations on three treatments (coded 1, 2, 3). For the
one-way analysis of variance model (3.3.1), page 36, determine which of the following are estimable.
For those that are estimable, state the least squares estimator.
(a) Yes,
1
+
2
2
3
is estimable. It has the form c
i
i
with
i
c
i
= 0, since c
1
= c
2
= 1, c
3
= 2
and all other c
i
zero. This is a contrast. All contrasts are estimable (page 37). The least squares
estimator of
1
+
2
2
3
is given by
Y
1.
+
Y
2.
2
Y
3.
.
(b) Yes, +
3
is estimable. It has the form
i
b
i
( + t
i
) with b
3
= 1 and b
1
= b
2
= 0. The
least squares estimator of +
3
is given by
Y
3.
.
(c) No,
1
2
3
is not estimable. it cannot be written as b
i
( +
i
) for any selection of
constants b
i
. In order to have
c
i
i
estimable, we need
c
i
= 0.
(d) Yes, +(
1
+
2
+
3
)/3 is estimable. It has the form
i
b
i
(+t
i
) with b
1
= b
2
= b
3
= 1/3.
The least squares estimator of + (
1
+
2
+
3
)/3 is given by (
Y
1.
+
Y
2.
+
Y
3.
)/3.
4
Solution to Question 3.12 Balloon experiment
a). Plot ination time versus color and comment on the results.
From the plot, it appears as though balloon ination time does depend on balloon color. In
particular, it looks as ithough colors 1 and 4 are easier to blow up than colors 2 and 3.
Plot of TIME*COLOR. Legend: A = 1 obs, B = 2 obs, etc.
TIME |
|
30 +
| A
| A
|
|
| A
25 + A
| B A
|
| A *A* B
| ***
|
20 + B A B A
| A A A
| *** B *A*
| A A
| A A
| B A A
15 +
| A
---+----------------+----------------+----------------+--
1 2 3 4
COLOR
b). Estimate the mean ination time for each balloon color, and add these estimates to the plot
from part (a).
SAS was used to calculate the means using the SAS program listed after the solution to part e).
On the above plot, the means are indicated by the asterisks.
c). Construct an analysis of variance table and test the hypothesis that color has no eect on
ination time.
From SAS PROC GLM:
Dependent Variable: TIME
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 3 126.15125 42.05042 3.85 0.0200
Error 28 305.64750 10.91598
Corrected Total 31 431.79875
If we select a signicance level of = 0.05, the p-value of 0.02 leads to a rejection of the hypothesis
that that the color of the balloon has no eect on the ination time and we would conclude that
the mean ination times for these 4 colors of balloons are not the same. However, if we select a
5
signicance level of = 0.01, then we would not have sucient evidence to reject the null hypothesis
of no dierence in ination times of the 4 colors.
d). Plot the data for each color in the order that it was collected. Are you concerned that the
assumptions on the model are not satised? If so, why? If not, why not?
From the plots shown at the end of this question, it is evident that for all four colors of balloons,
the ination time tended to decrease the later the balloons were inated in the experiment. Perhaps
the assistant improved at blowing up the balloons. In the analysis of variance, we are assuming that
the the eight observations for each treatment are independent and identically distributed. The plots
suggest that this is not the case: it appears that the means are decreasing as the run order increases.
e). Is the analysis conducted in part (c) satisfactory?
Since the assumptions for the analysis of variance do not appear to be satised, the stated p-value
in part c) is not correct. We cannot predict whether it is too high or too low.
Plot of TIME*ORDER. Legend: A = 1 obs, B = 2 obs, etc., COLOR 1
|
| A
22 +
|
TIME |
|
| A
20 +
| A
| A
|
|
18 +
| A
|
|
| A
16 + A A
|
---+--------+--------+--------+--------+--------+--------+-------+ORDER
0 5 10 15 20 25 30 35
6
Plot of TIME*ORDER. Legend: A = 1 obs, B = 2 obs, etc. COLOR 2
| A
| A
|
27.5 +
|
TIME |
|
| A
25.0 +
|
|
|
|
22.5 +
| A
|
|
|
20.0 +
A
|
| A
| A
| A
17.5 +
---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
ORDER
7
Plot of TIME*ORDER. Legend: A = 1 obs, B = 2 obs, etc. COLOR 3
| A
| A A
24 +
|
TIME |
| A
| A
22 +
|
|
|
| A A
20 +
|
|
|
|
18 +
|
|
|
|
16 + A
---+--------+--------+--------+--------+--------+--------+--------+- ORDER
0 5 10 15 20 25 30 35
8
Plot of TIME*ORDER. Legend: A = 1 obs, B = 2 obs, etc. COLOR 4
24 + A
|
|
|
|
22 +
|
TIME |
|
|
20 +A
|
| A
| A
|
18 +
|
| A
| A
|
16 +
A
|
|
|
|
14 + A
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
ORDER
9
Solution to Question 3.13 Heart-lung pump experiment, continued.
a). Calculate an analysis of variance table and test the null hypothesis that the number of revo-
lutions per minute has no eect on the uid ow rate.
Using the one-way analysis of variance model, the analysis of variance table obtained from PROC
GLM is as follows:
The GLM Procedure
Dependent Variable: FLOW
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 4 16.12551 4.03138 2901.61 <.0001
Error 15 0.02084 0.00139
Corrected Total 19 16.14635280
Since the p-value is less than most usual choices of signicance level, we reject the null hypothesis
H
0
: {
1
=
2
=
3
=
4
=
5
}, and conclude there is an eect of the rpm on the uid ow rate.
b). Are you happy with your conclusion? Why or why not?
We need to examine the assumptions of the model. The plot in Figure 3.1 on Page 40 suggests
that the variability of the data may increase as the RPM increase. This would violate the assumption
that the error varibles in the one way analysis of variance models are identically distributed with
common variance
2
.
If the model assupmptions are violated then the stated signicant levels and condence levels
are not correct (see Chapter 5).
c. Calculate a 90% upper condence limit for the error variance
2
.
2
15,0.9
= 8.547 so a 90% upper condence limit for the error variance is ssE/8.547 = .0024.
However, this interval also requires that the assumptions of the model are satised.
10
Solution to Question 3.15 Trout experiment
(a) Plot the data and comment on the results. There is a good deal of overlap between the
data obtained at each level of sulfamerazine, so it is possible that there is not much dierence in the
hemoglobin content obtained from the dierent levels of sulfamerazine (but see answer to part c).
The variability of the data looks about the same at each level, although a little smaller for level 3.
Plot of Hem*Sulf. Legend: A = 1 obs, B = 2 obs, etc.
Hem |
12 + A
|
|
| C C
10 + A A
| A D
| -- B__
| B B A B__
8 + B D A
| A
| B__ A B
| A A
6 + A
| A
|
|
4 +
|
--+------------+------------+------------+---------
0 1 2 3
SULF
b) Write down the suitable model for this experiment.
A suitable model would be the one-way analysis of variance model:
Y
it
= +
i
+
it
(1)
it
N(0,
2
)
it
it
is a random error variable.
11
(c)Calculate the least squares estimate of the mean response for each treatment. Show these
estimates on the plot in (a). Can you draw any conclusion from these estimates?
SAS PRINTOUT from the MEANS statement
Level of -------------Hem-------------
Sulf N Mean Std Dev
1 10 7.20000000 1.01871379
2 10 9.33000000 1.71661812
3 10 9.03000000 1.13534136
4 10 8.69000000 1.00049988
The least squares estimate of +
1
is y
1
= 7.2
The least squares estimate of +
2
is y
2
= 9.33
The least squares estimate of +
3
is y
3
= 9.03
The least squares estimate of +
4
is y
4
= 8.69
The means for sulfamerazine levels 2, 3, and 4 are very close together and each one falls within
the range of the data for the other two levels. The mean for sulfamerazine level 1 is outside the
range of the data from level 3, so it is possible that the eects of these two levels are dierent.
(d) Test the hypothesis that sulfamerazine has no eect on the hemoglobin content of trout blood.
SAS PRINTOUT from PROC GLM
Dependent Variable: Hem
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 3 26.80275 8.9342 5.70 0.0027
Error 36 56.47100 1.5686
Corrected Total 39 83.27375
Source DF Type III SS Mean Square F Value Pr > F
Sulf 3 26.80275 8.93425 5.70 0.0027
If we select a signicance level of 0.01. Then, since F > F
(3,36,0.95)
= 2.87, we reject H
0
(or,
equivalently, since P-value=0.0027 < 0.01, we reject H
0
). So we conclude (at signicance level 0.05)
that the level of sulfamerazine does aect the average hemoglobin content in the blood of brown
trout.
(e) Calculate a 95% upper condence limit for
2
.
ssE
36,0.95
=
56.471
22.47
= 2.51
12
Solution to Question 3.16 Trout experiment, continued
(a) For calculating the number of observations needed on each treatment, what would you use as
a guess for
2
? I would use the 95% condence bound found in problem 3.15(e),
(b) Calculate the sample size needed for an analysis of variance test with = 0.05 to have power
0.95 if (i) = 1.5. (ii) = 1.0. (iii) = 2.0.
(i) For v = 4, = 1.5, P = 0.95, = 0.05,
r
2
= 4(r 1) r = 8.629
2
Action
1000 2.33 46.846 Round up to r = 47
47 184 2.20 41.764 Round up to r = 42
42 164 2.20 41.764 Round up to r = 42
Take 42 observations on each treatment.
(ii) For v = 4, = 1.0, P = 0.95, = 0.05,
r
2
= 4(r 1) r = 18.416
2
Action
1000 2.33 105.408 Round up to r = 106
106 420 2.20 93.97 Round up to r = 94
94 372 2.20 93.97 Round up to r = 94
Take 94 observations on each treatment.
(iii) For v = 4, = 2.0, P = 0.95, = 0.05,
r
2
= 4(r 1) r = 18.416
2
Action
1000 2.33 26.35 Round up to r = 27
27 104 2.20 23.49 Round up to r = 24
24 92 2.20 23.49 Round up to r = 24
Take 24 observations on each treatment.
13
Solution to Question 3.19 Sample size calculation
There are v = 5 levels of lighting and we wish to test the null hypothesis that all levels are similar
in terms of their eect on performance. We require
= 0.05 = 4.5 seconds 3 seconds () = 0.9
Now
r =
2v
2
2
=
(2)(5)(3
2
)
2
4.5
2
= 4.444
2
.
We also have degrees of freedom
1
= 4 and
2
= v(r 1) = 5(r 1). Using the top table on page
715, we have
r
2
= 5(r 1) r = 4.444
2
Action
1000 approx 1.8 14.4 round up to 15
15 70 approx 1.85 15.2 round up to 16
16 75 1.85
The table on page 715 has very few values, so we are unable to get an accurate answer. However
it looks as though 16 observations per treatment (80 in total) should be enough to achieve the
required power.
14
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 4
31 January 2003
Solutions available in this le
c 2003 Angela Dean. All rights reserved.
No part of this work may be displayed on the web. No part of this work may be reproduced
in any form without the written permission of Angela Dean, The Ohio State University.
SOLUTIONS AVAILABLE IN THIS FILE
4.3 Pedestrian light experiment
4.4 Reaction time experiment
4.5 Trout experiment, continued
4.6 Battery experiment, continued
4.7 Soap experiment, continued
4.8 Trout experiment, continued
4.9 Battery experiment, continued
4.10 Trout experiment, continued
4.11 Pedestrian light experiment, continued
1
Design and Analysis of Experiments
Dean and Voss
Solutions to Chapters 4
Solution to Question 4.3 Pedestrian Light Experiment
a) We wish to test the null hypothesis that the contrast (
1
+
2
+
3
)/3
0
is zero against the
alternative hypothesis that it is less than zero. [Note: If you did not download the corrections from the
website, then you will be testing that this contrast is greater than zero].
From computer output, msE = 0.01093. The least squares estimate of the contrast is
(y
1.
+ y
2.
+ y
3.
)/3 y
0
= 0.0148095 .
and the corresponding standard error is
_
1
10 9
+
1
10 9
+
1
5 9
+
1
7
_
msE = 0.04524.
So, the test statistic for the one sided test is
least squares estimate
standard error
=
0.0148095
0.04524
= 0.32735
Since the value of the test statistic is not less than t
28,0.05/2
= 2.048 (or, for any other reasonable
choice of , we have no evidence to suggest that pushing the pedestrian light button shortens the waiting
time at this particular light!
b) Using SAS, we can obtain a set of simulataneous 95% condence intervals for the treatment versus
control contrasts using Dunnetts method. We cannot use Dunnetts method from the tables at the back
of the book since we do not have equal sample sizes. The SAS output is as follows:
The GLM Procedure
Dunnetts t Tests for TIME
NOTE: This test controls the Type I experimentwise error for
comparisons
of all treatments against a control.
Alpha 0.05
Error Degrees of Freedom 28
Error Mean Square 0.010927
Critical Value of Dunnetts t 2.47622
Comparisons significant at the 0.05 level are indicated by ***.
Difference
NPUSH Between Simultaneous 95%
Comparison Means Confidence Limits
3 - 0 0.00486 -0.14671 0.15642
2 - 0 -0.01314 -0.14070 0.11442
1 - 0 -0.03614 -0.16370 0.09142
Conclusion: Each of these intervals includes zero, so again there is no evidence to suggest that either
one, two or three pushes is better than no pushes for this pedestrian light.
2
If you do not have access to SAS and decide to use Tukeys method instead, the intervals will be
slightly wider, and will still include zero.
The GLM Procedure
Tukeys Studentized Range (HSD) Test for TIME
NOTE: This test controls the Type I experimentwise error rate.
Alpha 0.05
Error Degrees of Freedom 28
Error Mean Square 0.010927
Critical Value of Studentized Range 3.86125
Comparisons significant at the 0.05 level are indicated by ***.
Difference
NPUSH Between Simultaneous 95%
Comparison Means Confidence Limits
3 - 0 0.00486 -0.16226 0.17197
2 - 0 -0.01314 -0.15379 0.12751
1 - 0 -0.03614 -0.17679 0.10451
Solution to Question 4.4 Reaction time experiment
Solution to Question 4.4 Reaction Time Experiment
a) Identify a set of contrasts that you would nd particularly interesting in this experiment.
treatment combinations are coded as: 1= auditory, 5 seconds4= visual, 5 seconds 2= auditory, 10
seconds 5= visual, 10 seconds 3= auditory, 15 seconds6= visual, 15 seconds
Contrasts of interest 1) c1= 1/3, c2 = 1/3, c3= 1/3, c4= -1/3, c5= -1/3, c6= -1/3 Test for dierences
between the responses due to visual and auditory cues.
2) c1=1/2 , c2 = -1/4, c3= -1/4, c4= 1/2, c5= -1/4, c6= -1/4 Test for dierences between the response
times after 5 seconds vs. 10 or 15 seconds.
3) c1=1/4 , c2 = 1/4, c3= -1/2, c4= 1/4, c5= 1/4, c6= -1/2 Test for dierences between the response
times after 5 or 10 seconds vs. 15 seconds.
b) Plot the data. What does the plot suggest about the treatments?
The plot suggests that the subjects responded faster with the auditory cue than the visual cue. Also,
as the elapsed time between the cue and stimulus increased, there was an increase in the amount of time
that the subjects took to respond.
c) Test the hypothesis that the treatments do not have dierent eects on the reaction time against
the alternative hypothesis that they do have dierent eects.
Ho: (1 = (2 = (3 = (4 = (5 = (6 H1: at least two of the treatments means dier We nd that the F*
critical value is 17.66 with a p-value of .001 so we reject Ho and conclude at the alpha =0.05 level that
at least two of the means dier. (The mean response time diers for at least two of the treatments).
One-way ANOVA: time versus treatment
Analysis of Variance for time Source DF SS MS F P treatmen 5 0.025549 0.005110 17.66 0.000 Error
12 0.003472 0.000289 Total 17 0.029021
d) Calculate a set of simultaneous 90
simultaneous 90(ci ( tn-(, (/2m tn-(, (/2 = t18-6, .01/2*3 = t12, .00167 = 3.6381
treatment means: =.185 =.179 =.212 =.268 =.259 =.265
= = .0080
Condence interval:
1. (ci= .573/3 - .792/3 = -.073 (-.073 ( .0291) (-.102, -.044) We conclude at the 90
2. (ci= .185/2 - .179/4 - .212/4 + .268/2 - .259/4 - .265/4 = -.002
3
(-.002 ( 3.6381*sqrt(.000289*.25)) (-.002 ( 3.6381*.0085) (-.002 ( .0309) (-.0329, .0289) Since the value
zero is contained in the 90we conclude at the 90between the response time after an elapsed time of 5
seconds vs. 10 or 15 seconds.
3. (ci= .185/4 + .179/4 - .212/2 + .268/4 + .259/4 - .265/2 = -.01575 (-.01575 ( 3.6381(sqrt(.000289*.25))
(-.01575 (0.0309) (-.04665, .01515) Since the value zero is contained in the 90we conclude at the 90dier-
ence between the response time after an elapsed time of 5 or 10 seconds vs. 15 seconds.
e) Ignoring the previous parts of the exercise, use Hsus method of multiple comparisons with the
best to determine the best/worst treatment or treatments. Dene the best to be the treatment that
produces the quickest response (that is, the smallest value of the response variable).
One-way ANOVA: time versus treatment
Analysis of Variance for time Source DF SS MS F P treatmen 5 0.025549 0.005110 17.66 0.000 Error 12
0.003472 0.000289 Total 17 0.029021 Individual 95Based on Pooled StDev Level N Mean StDev -+
+++ 1 3 0.18500 0.01735 (-*) 2 3 0.17867 0.01041 (*-) 3 3 0.21200 0.02088
(-*-) 4 3 0.26833 0.01102 (-*-) 5 3 0.25933 0.02401 (*-) 6 3 0.26500 0.01389 (-*)
-++++ Pooled StDev = 0.01701 0.160 0.200 0.240 0.280
Hsus MCB (Multiple Comparisons with the Best)
Family error rate = 0.0500
Critical value = 2.50
Intervals for level mean minus largest of other level means
Level Lower Center Upper ++++ 1 -0.11809 -0.08333 0.00000 (*
-) 2 -0.12442 -0.08967 0.00000 (*) 3 -0.09109 -0.05633 0.00000 (*-)
4 -0.03142 0.00333 0.03809 (*) 5 -0.04375 -0.00900 0.02575 (*) 6 -0.03809 -0.00333
0.03142 (*) ++++ -0.100 -0.050 -0.000 0.050
Hsus MCB (Multiple Comparisons with the Best)
Family error rate = 0.0500
Critical value = 2.50
Intervals for level mean minus smallest of other level means
Level Lower Center Upper +++ 1 -0.02842 0.00633 0.04109 (*) 2
-0.04109 -0.00633 0.02842 (*) 3 -0.00142 0.03333 0.06809 (*) 4 0.00000 0.08967 0.12442
(*) 5 0.00000 0.08067 0.11542 (*) 6 0.00000 0.08633 0.12109 (
-*) +++ 0.000 0.050 0.100 The rst and second treatments (auditory,
5 and 10 seconds) yield the lowest sample means. This implies that these are the best because they have
the shortest sample mean response time.
Solution to Question 4.5 Trout experiment, continued.
SAS Commands:
data one;
infile DV3-15.dat;
input Hem Sulf;
Proc glm;
class Sulf;
model Hem=Sulf;
means Sulf/TUKEY cldiff alpha=0.01;
contrast 1 - (2+3+4)/3
Sulf 3 -1 -1 -1/divisor=3; run;
(a) Compare the four treatment using Tukeys method of pairwise comparisons and a 99% overall
condence level.
SAS PRINTOUT
The GLM Procedure
Tukeys Studentized Range (HSD) Test for Hem
NOTE: This test controls the Type I experimentwise error rate.
Alpha 0.01
4
Error Degrees of Freedom 36
Error Mean Square 1.568639
Critical Value of Studentized Range 4.72945
Minimum Significant Difference 1.8731
Comparisons significant at the 0.01 level are indicated by ***.
Difference
Sulf Between Simultaneous 99%
Comparison Means Confidence Limits
2 - 3 0.3000 -1.5731 2.1731
2 - 4 0.6400 -1.2331 2.5131
2 - 1 2.1300 0.2569 4.0031 ***
3 - 2 -0.3000 -2.1731 1.5731
3 - 4 0.3400 -1.5331 2.2131
3 - 1 1.8300 -0.0431 3.7031
4 - 2 -0.6400 -2.5131 1.2331
4 - 3 -0.3400 -2.2131 1.5331
4 - 1 1.4900 -0.3831 3.3631
1 - 2 -2.1300 -4.0031 -0.2569 ***
1 - 3 -1.8300 -3.7031 0.0431
1 - 4 -1.4900 -3.3631 0.3831
The only pair of treatment means that are signicantly dierent at = 0.01 are treatments 1 and
2. Therefore, deierence between adding 5 grams of Sulfamerazine and not adding any Sulfamerazine
produces an average dierence of between 2.1300 and 4.0031 gm of Hemoglobin per 100ml of brown trout
blood. However, adding 10 or 15 grams of Sulfamerazine does not lead to a dierence in Hemoglobin
levels.
(b) Our new condence interval must have condence level of 99% if the overall condence level is
to be at least 98%. To do the actual comparison we will need to use the contrast (1, 1/3, 1/3, 1/3)
because it will give the estimate for the eect of treatment 1 minus the average eect of the other 3
treatments. Our least squares estimate for
1
(
2
+
3
+
4
)/3 is
y
1.
1/3( y
2.
+ y
3.
+ y
4.
) = 7.2 (9.33 + 9.03 + 8.69) = 1.817.
The standard deviation is given by
_
msE
4
i=1
c
2
i
ri
and there are 36 degrees of freedom for error.
From SAS, we know msE =1.568639, and
4
i=1
c
2
i
r
i
=
1
10
4
i=1
c
2
i
=
1
10
(1
2
+ (
1
3
)
2
+ (
1
3
)
2
+ (
1
3
)
2
) = 0.133.
Thus our standard error is
_
msE
4
i=1
c
2
i
r
i
= 0.457
.
Also, t
36,(
0.01
2
)
= 2.719. Thus our 99% Condence Interval for
1
(
2
+
3
+
4
)/3 is
1.817 2.719 0.457 = (3.0604, 0.5730).
Since 0 is not in this interval we may conclude thatthe average eect of no sulfermerazine is signicantly
dierent form the average eect of the other 3 levels of sulfermerazine at the = 0.01 level, producing
between 0.573 and 3.06 gm less hemoglobin per 100 ml of brown trout blood.
Alternative Method:
5
SAS PRINTOUT
The GLM Procedure
Dependent Variable: Hem
Standard
Parameter Estimate Error t Value Pr > |t|
1 - (2+3+4)/3 -1.81666667 0.45733123 -3.97 0.0003
Solution to Question 4.6 Battery experiment, continued
Verify that Tukeys method gives shorter condence intervals than would either of the Bonferroni or
Schee methods (for v = 4 and r = 4).
In this experiment, v = 4,r = 4, n = v r = 16 and = 0.05. And only the 6 pairwise comparisons
s
, i = s, are of interest. We can compare the critical coecients for these methods,
Bonferroni: w
B
= t
12,
.025
6
= 3.15,
Schee: w
S
=
_
3F
3,12,.05
= 3.24,
Tukey: w
T
=
1
2
q
4,12,.05
= 2.97.
Since w
T
is less than w
B
, which is less than w
S
, the Tukey intervals will be shorter than either of the
Bonferroni or Schee intervals.
6
Solution to Question 4.7 Soap experiment, continued
a) Suppose that the experimenter had been interested only in the contrast
1
1
2
(
2
+
3
), which compares
the weight loss for the regular soap with the average weight loss for the other two soaps. Calculate a
condence interval for this single contrast.
The SAS ESTIMATE statement gives
Contrast DF Contrast SS F Value Pr > F
T1-(T2+T3)/2 1 15.12093750 195.93 0.0001
T for H0: Pr > |T| Std Error of
Parameter Estimate Parameter=0 Estimate
T1-(T2+T3)/2 -2.38125000 -14.00 0.0001 0.17011944
Since t
9,0.025
= 2.262, a 95% condence interval for the contrast
1
1
2
(
2
+
3
) is
2.38125 2.262 0.17 = 2.38125 0.385 = (2.766, 1.9964)
b. Test the hypothesis that the regular soap has the same average weight loss as the average of the
other two soaps. Do this via your condence interval in part (a) and also via (4.3.13) and (4.3.15).
Since the 95% condence interval does not include 0, we would reject, at level 0.05, the null hypothesis
the regular soap has the same average weight loss as the other soaps.
By (4.3.13), | 2.38125/.17| = 14 which corresponds to a p-value of the t
9
distribution of less than
.0001. By (4.3.15), ssc/msE = 195.93 corresponds to a p-value from the F
1,9
distribution of less than
.0001 also. Hence we would reject the null hypothesis for any reasonable choice of signicance level .
c. In Example 4.4.5 (page 89), Dunnetts method was used for simultaneous 99% condence intervals
for two preplanned treatment-versus-control contrasts. Would either or both of the Bonferroni and Tukey
methods have given shorter intervals?
The critical coecient for Bonferroni method for two preplanned treatment versus control intervals is
w
B
= t
9,(0.01)/4
= 3.69 and the critical coecient for Tukeys method is w
T
= q
3,9,.01
/
2 = 5.43/
2 =
3.84, as compared with Dunnetts two-sided critical coecient of w
D2
= 3.63. Since the standard error
does not depend on the method used, the condence intervals for the treatment versus control contrasts
sre shorter using Dunnetts method.
d. Which method would be the best if all pairwise dierences are required? Calculate a set of
simultaneous 99% condence intervals for all of the pairwise dierences. Why are the intervals longer
than those in part (c)?
There are three pairwise comparisons. The critical coecient for Bonferronis method is t(9, .01/(2
3)) = 3.95422 compared with Tukeys method which has critical coecient w
T
= 3.84 as in part (c).
Consequently, Tukeys method gives shorter intervals than Bonferronis method. Dunnetts method is not
considered since it is not valid for all pairwise comparisons. The Bonferroni intervals are longer than those
in part (c) since the critical value takes account of the number of intervals and t
9,.01/(23)
> t
9,.01/(22)
.
7
Solution to Question 4.8 Trout experiment, continued
SAS Command:
data one;
input Hem Sulf;
lines;
1 6.7
1 7.8
1 5.5
: :
: :
4 7.2
proc print;
Proc glm;
class Sulf;
model Hem=Sulf;
means Sulf/dunnett(1) cldiff ALPHA=0.01;
contrast linear Sulf l -3 -1 1 3;
contrast quadratic Sulf 1 -1 -1 1;
run;
(a) For the trout experiment in Exercise 15 of Chapter 3, test the hypothesis that the linear and
quadratic trends in hemoglobin content of trout blood due to the amount of sulfamerazine added to the
diet is negligible. State the overall signicance level of your tests.
There are two tests to be done. If we do each test at signicance level of = 0.025, the overall level
will be at most 0.05.
Linear Trend: The contrast coecients for the test
H
0
: Linear Trend is negligible vs H
A
: Linear Trend is NOT negligible
are given in Table A2 (page 702) as (3, 1, 1, 3). Using the CONTRAST statement in SAS, we get a p-value
of 0.0241, so that we would reject the null hypothesis at the = 0.025 level. Therefore, we conclude that
there is a linear trend in hemoglobin levels due to increasing sulfamerazine.
The contrast sum of squares is
ssc =
[3(7.2) 9.33 + 9.03 + 3(8.69)]
2
[
9
10
+
1
10
+
1
10
+
9
10
]
=
[4.17]
2
2.0
= 8.6944
SAS PRINTOUT
Dependent Variable: Hem
Contrast DF Contrast SS Mean Square F Value Pr > F
linear 1 8.69445000 8.69445000 5.54 0.0241
quadratic 1 15.25225000 15.25225000 9.72 0.0036
Quadratic Trent: The contrast coecients for the test
H
0
: Quadratic Trend is negligible vs H
A
: Quadratic Trend is NOT negligible
are given in Table A2 as (1, 1, 1, 1). Using the CONTRAST statement in SAS, we get a p-value of 0.0036
and we reject H
0
at the = 0.025 level. Therefore, we conclude that there is a quadratic trend in
hemoglobin levels due to invcreasing sulfamerazine.
8
(b) Regarding the absence of sulfamerazine in the diet as the control treatment, calculate simultaneous
99% condence intervals for the three treatment-versus-control comparisons. Which method did you use
and why?
Using Dunnetts method, since it is specically designed for treatments vs control experiments and
therefore gives the smallest condence intervals, using SAS, we get
SAS PRINTOUT
Dunnetts t Tests for Hem
NOTE: This test controls the Type I experimentwise error for
comparisons of all treatments against a control.
Alpha 0.01
Error Degrees of Freedom 36
Error Mean Square 1.568639
Critical Value of Dunnetts t 3.11170
Minimum Significant Difference 1.7429
Comparisons significant at the 0.01 level are indicated by ***.
Difference
Sul Between Simultaneous 99%
Comparison Means Confidence Limits
2 - 1 2.1300 0.3871 3.8729 ***
3 - 1 1.8300 0.0871 3.5729 ***
4 - 1 1.4900 -0.2529 3.2329
(c) What is the overall condence level of the intervals in part (b) together with those in Exercise 5?
Is there a better strategy than using three dierent procedure for the three sets of intervals? Explain.
The overall condence level for the intervals in 5(a) was 99%, the interval in 5(b) had condence level
99%, and the intervals in 8(b) had overall condence level 0.99. Thus the combined overall condence
level is
100(1 (0.01 + 0.01 + 0.01)0% = 97%.
The method used to answer each question was the method that would yield the narrowest condence
intervals. For instance, Dunnetts method gives the narrowest condence intervals for treatment vs control
experiments. Using a dierent method in each case would widen the condence intervals unnecessarily.
However, one might want to compare the Schees method since that method allows you to make an
innite number of statements with a specied overall condence level, and the overall would not need
to be split into three parts.
9
Solution to Question 4.9 Battery experiment, continued
a) Suppose the battery experiment of Section 2.5.2 (page 26) is to be repeated. The experiment
involved four treatments, and the error standard deviation is estimated from that experiment to be about
48.66 minutes per dollar (minutes/dollar). Calculate a 90% upper condence limit for the error variance
2
.
Since msE = 48.66
2
, then ssE=(16 4) 48.66
2
= 28, 413.5. So, a 90% upper condence bound for
2
is
ssE
2
12,0.9
=
28, 413.55
6.304
= 4507.23 .
(b). How large should the sample sizes be in the new experiment if Tukeys method of pairwise
comparisons is to be used and it is desired to obtain a set of 95% simultaneous condence intervals of
length at most 100 minutes per dollar?
We need
w
T
_
msE
2
r
=
1
2
q
4,4r4,.05
4507.23
_
2
r
_
50 .
This uses the upper bound for
2
obtained in part (a), which is the largest likely value of msE for the
repeat experiment. So we need
q
2
4,4r4,.05
50
2
r
4507.23
= 0.5547r .
r 4r 4 q
2
4,4r4,0.05
0.5546r Action
11 40 3.79
2
= 14.36 6.10 Increase r
29 120 3.68
2
= 13.54 66.56 Decrease r
20 76 3.7
2
= 13.69 11.09 Increase r
24 92 3.7
2
= 13.69 13.31 Increase r
25 96 3.7
2
= 13.69 13.69 Increase r
So we need approximately 25 observations per battery type, which is a total of 100 observations.
c. How large should the sample sizes be in the new experiment if Schees method is to be used to
obtain a set of 95% simultaneous condence intervals for various contrasts and if the condence interval
for the duty contrast is to be of length at most 100 minutes per dollar?
The condence interval for the duty contrast needs to have at most 100 minutes per dollar, as part
of a set of 95% simultaneous Schee intervals. The duty contrast (page 71) is
1
+
2
2
3
+
4
2
with least squares estimate 0.5(y
1.
+y
2.
y
3.
y
4.
). The corresponding variance is 0.25(4
2
/r), so using
the upper bound for
2
from part (a) as the largest likely value of msE, we require
_
3F
3,4r4,.05
_
4507.23/r 50 ;
that is F
3,4r4,.05
0.1848r.
r 4r 4 F
3,4r4,.05
0.1848r Action
26 100 2.70 4.80 Decrease r
16 60 2.76 2.96 Decrease r
15 56 2.77 2.77
About 15 observations per treatment would meet this requirement.
10
Solution to Question 4.10 Trout experiment, continued
(a) Suppose the experiment were to be repeated. Suggest the largest likely value for the error mean
square MSE.
From section 3.46, a 95% upper condence limit for
2
is given by
ssE
2
df,0.95
.
From problem 3.15, we have ssE = 56.471. And
2
36,0.95
= 23.26861. Thus, a good largest value for
2
is given by
2
=
56.471
23.26861
= 2.427.
(b) How many observations should be taken in each treatment so that the length of each interval in a
set of simultaneous 95% condence intervals for pairwise comparison should be at most 2g per 100ml.
Since the length of each interval must be less than 2 it follows that the msd for each interval must be
less than 1. For pairwise comparisons, Tukeys method or Bonferronis method will lead to the smaller
numbert of observations for given msd.
(i) Using Bonferonnis Method The radius of a Bonferroni interval for 6 pairwise comparisons and 4
treatment levels is given by t
n4,
12
_
MSE(
2
r
) , where r is the number of samples taken at each level
and n is the total number of samples taken (n = 4r). To be conservative, I will use the largest value
of
2
supplied by part (a) of this problem. Thus we desire msd = t
n4,
12
_
4.8538
r
1.
r Degreeoffreedom t
4r4,
0.05
12
msd
10 36 2.7920 1.8452
20 76 2.7091 1.3346
30 116 2.6843 1.0797
35 136 2.6774 0.9971
34 132 2.6786 1.0121
By using the Bonferronis method, we need 35 samples at each level in order to get the desired length.
By using the Schees method, we need 39 samples at each level in order to get the desired length.
(ii) Using Tukeys Method We need msd =
q,n,
2
_
2MSE
r
1. For this particular problem, we
want msd = q
4,4r4,0.05
_
2.4269
r
1.
r Degreeoffreedom q
4,4r4,0.05
msd
30 116 3.69 1.05
31 120 3.68 1.03
32 124 3.68 1.01
33 128 3.68 0.998
By using the Tukeys method, we need 33 samples at each level in order to get the desired length.
11
Solution to Question 4.11 pedestrian light experiment
(a) Suppose that you are planning to repeat the pedestrian light experiment at a pedestrian crossing
of your choosing. Select v = 4 levels for the treatment factor number of pushes including the level no
pushes. Give reasons for your selection.
Level Number of pushes Reasons
1 No pushes For control purposes
2 1 push This is how the device
is supposed to work,
you push it once and then the
signal changes (in theory)
3 5 pushes 5 seems like a nice round number
that the average person might push
4 Continuous Continuous pushing
pushing until the light changes
(b) Using no pushes as the control treatment, write down the formula for a set 95% simultaneous
condence intervals for treatment-versus-control contrasts.
Dunnetts method gives shorter intervals than Tukeys method and Schees method for treatment
versus control contrasts. It may or may not give shorter intervals than Bonferroni method for preplanned
comparisons. The formula for a set of simultaneous condence intervals for the 3 treatment versus control
contrasts using Dunnetts method and equal sample sizes is
y
i.
y
1.
w
D2
_
msE(2/r) for i = 2, 3, 4 n
where w
D2
is based on = 0.05 and degrees of freedom v 1 = 3 and n v = 4(r 1).
(c) How many observation would you need to ensure your treatment-versus-control condence intervals
are of length less than 0.1 seconds? What value are you going to use for msE and why?
One could use the upper 95% condence limit for
2
generated by the data in Table 3.12, however,
this data is for 0, 1, 2, and 4 pushes and not for 0, 1, 5, and continuous pushes. Since we are assuming
that all of our variances are equal and the two experiments share levels 1 and 2 and Table 3.12 is all we
have to make any kind of estimate, we will proceed with the upper 95% condence limit for
2
based
upon the data in Table 3.12. Using SAS and the data from Table 3.12, we get SSE = 0.3059529. Also,
we have
2
324,0.95
16.9279. Thus, our condence upper bound for
2
is 0.01807. Now, if our intervals
are to have length less than 0.1 seconds then they must have a minimum signicant dierence less than
0.05 seconds. From part (b), we know our msd is given by
msd = w
D2
_
msE(2/r),
so we require w
2
D2
0.05
2
r/2msE = 0.06917r.
If we use Table A.10 with = 0.05 and degrees of freedom equal to
1
= v 1 = 3 and
2
= 4(r 1),
we obtain the following:
r 4(r 1) w
2
D2
0.06917r Action
10 36 2.47
2
= 6.1 0.69 Increase r
100 396 2.35
2
= 5.52 6.92 Decrease r
80 316 2.35
2
= 5.52 5.53 About right
Thus, r = 80 observations per treatment should generate condence intervals for treatment versus
control with length of less than 0.1. This we require a total of 320 observations.
(d) If you had selected v=6 instead of v=4 would you have required more observation per treatment,
or fewer, or the same.
12
Our new msd would be given by
msd = w
D2
_
msE(2/r),
with = 0.05 and degrees of freedom equal to
1
= v 1 = 5 and
2
= 6(r 1), and we still require
w
2
D2
0.05
2
r/2msE = 0.06917r.
it appears that the value of w
D2
increases as v 1 increases and decreases as n v increases making
it dicult to judge what will happen. If we calculate the msd with r = 80, we obtain
r 6(r 1) w
2
D2
msd
80 474 2.51 0.053
Based upon this, it looks as though would need slightly more observations per treatment to achieve a
msd of 0.05 if v = 6.
13
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 5
3 February 2003
Solutions available in this le
c 2003 Angela Dean. All rights reserved.
No part of this work may be displayed on the web. No part of this work may be reproduced
in any form without the written permission of Angela Dean, The Ohio State University.
SOLUTIONS AVAILABLE IN THIS FILE
5.3 Margerine experiment
5.4a Reaction time experiment
5.5 Catalyst experiment needs rewriting
5.6 Bicycle experiment
5.7 Dessert experiment
5.9 Spaghetti sauce experiment
1
Solution to Question 5.3
(a). A plot of the standardized residuals vs. the predicted values indicates unequal variance. This is
also apparent from the standard deviations given in the problem. Before proceeding, a variance-stabilizing
transformation is needed.
Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.
Z |
2 + A A
|
| A
| A B
| A
| A
| B
| A A
| C B
0 +-------C--A------------------B-----------------A--
| A
| C A
| A
| A B
| A A A
| A
| A
|
-2 + A A
-+-----------+-----------+-----------+-----------+-
160 180 200 220 240
YPRED
If we plot log(var)vs. log(mean), where var and mean are the variances and means of the responses
for the four levels of treatment, we get
2
Plot of LN_VAR*LN_AVG. Legend: A = 1 obs, B = 2 obs, etc.
LN_VAR |
4.5 +
| A
| A
|
4.0 +
|
|
|
3.5 +
| A
|
|
3.0 +
| A
|
|
2.5 +
-+-----------+-----------+-----------+-----------+-
5.1 5.2 5.3 5.4 5.5
LN_AVG
This plot has a slope of approximately 4, so by Eqn 5.5.3 of the text, the transformation 1/y is
suggested. The analysis of the data was then carried out using 1/y as the response. Well now check the
assumptions on the model again, using the transformed data: From the plot of standardized residuals vs.
predicted, we see no apparent outliers, and they show no non-random pattern about zero. The run order
of the experiment is not given, so independence of error terms cannot be checked with a plot of residuals
vs. order. The variances appear similar from the plot, and this is checked by calculating the variances
with SAS (see below). The normal probability plot looks linear, (apart from possibly one observation)
indicating that the residuals approximately follow a normal distribution. The assumptions appear to be
approximately satised.
3
Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.
Z |
2 + A A
|
| A A
| A
| A A
| A A
| B A
| B
| A A
0 +-----A-------------B--------------------A---B-----
| A A A
| B C
|
| B
| B
| A A A
| B
|
-2 + A
-+-----------+-----------+-----------+-----------+-
4.0 4.5 5.0 5.5 6.0
YPRED
OBS BRAND AVGTIME VARTIME
1 1 .0056740 .000000032103
2 2 .0041961 .000000023033
3 3 .0058376 .000000021217
4 4 .0047940 .000000037671
4
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z |
2 + A A
|
| AA
| A
| B
| B
| C
| B
| B
0 +-----------------------ABC------------------------
| AB
| ACA
|
| B
| B
| AAA
| AA
|
-2 + A
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
RANK FOR VARIABLE Z
(b). Using the SAS ESTIMATE statement to calculate a 95% C.I. for the contrast t
4
(t
1
+t
2
+t
3
)/3,
we get 0.00044184 t
(0.025,36)
(0.00006165) = (0.000567, 0.000317) This does not include zero, so
we conclude H
a
, at the 0.05 level, that the average melting time of the margarines is less than that of
butter.
(c). Using Satterthwaites approximation for unequal variances,
Here
c
1
= c
2
= c
3
= 1/3, c
4
= 1
s
1
, s
2
, s
3
, s
4
are given in the problem
r
1
= r
2
= r
3
= r
4
= 10.df = 12.6 from Eqn. (5.5.4) (round down to 12 to be conservative)
Var(c
i
i
) =
c
2
i
r
s
2
i
= 23 and df =
(c
2
i
s
2
i
/r)
2
(c
2
i
s
2
i
/r)
2
(r1)
= 3.62
.
We round the degrees of freedom down to 3.
Using the Bonferroni method, at overall level at least 99%, (i.e. each interval at 99.5%), a condence
interval for the linear trend is given by
l.s.e. w
B
[
est var]
= 140.6667 5.481[
23]
= [114.38, 166.95].
Since the interval does not contain 0, the hypothesis of no linear trend is rejected.
For the quadratic trend, the contrast is given by (2 -1 -2 -1 2) with a least squares estimate of 4.6667.
Using (5.6.4) again, we have
Var(c
i
i
) =
c
2
i
r
s
2
i
= 27 and df =
(c
2
i
s
2
i
/r)
2
(c
2
i
s
2
i
/r)
2
(r1)
= 4.72
,
round down to 4.
So the 99.5% condence interval for the quadratic trend is given by
4.6667 4.604[
2
) is calculated as follows:
sd(contrast)=sqrt(49/3+8.3/3)=4.370355 df=(3 1) (49 + 8.3)
2
/(49
2
+ 8.3
2
) = 2.658653 2 and
w=t(2,.03/6)=t(2,.005)=9.925
So the CI for (
1
2
) is
(58-65.677) 5.841*4.37 = (-33.2, 17.87).
The 94% simultaneous CIs are:
Contrast CI
----------------------------------
21
tau1-tau2 (-51.05, 35.72)
tau3-tau4 (-23.84, 11.84)
tau5-tau6 (-19.91, 19.24)
tau1-tau5 ( -1.1, 86.43)
tau1-tau3 ( -6.25, 88.25)
tau3-tau5 (-16.28, 19.62)
c) The plot of Residuals vs WT does not oer any clear suggestions of what type of transformation
to use. A plot of log(VAR
i
) vs. log(aveWT) and corresponding regression also does not indicate any of
the transformations in (5.6.3) are suitable sincve no straight line is apparent.
Plot of LN_VAR*LN_AV. Legend: A = 1 obs, B = 2 obs, etc.
LN_VAR |
4 + A
|
|
|
3 + A
|
|
| A A
2 + A
|
|
|
1 +
| A
|
|
0 +
|
--+--------+--------+--------+--------+--
2.5 3.0 3.5 4.0 4.5
LN_AV
Using a regression routine from SAS, the best tting straight line has q=0.72 which indicates that
1/
y would be a reasonable transformation. However, we already know that this wont be very successful.
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 0.00241 2.21152 0.00 0.9992
LN_AV 1 0.72201 0.66239 1.09 0.3370
22
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 7
March 1st 2003
Solutions available in this le
c 2003 Angela Dean. All rights reserved.
No part of this work may be displayed on the web. No part of this work may be reproduced
in any form without the written permission of Angela Dean, The Ohio State University.
Question 7.6 Weathering experiment, continued
Question 7.8 Paper towel strength experiment
Question 7.9 Rocket experiment
Question 7.12 Washing power experiment
Question 7.14 Popcorn-robust experiment
Question 7.15 Steel.bar
1
Solution to Question 7.6 Weathering experiment, continued
First, we need to recreate the anlaysis of variance table. The sums of squares for the treatment
factors can be calculated by hand using the rules in Chapter 7. Alternatively, the averages can be entered
into a computer p[ackage, such as SAS PROC GLM and the resulting sums of squares and mean squares
multiplied by r. In this experiment, r = 2. The error mean square can only be obtained from the raw
data. According to the information in the paper, msE = 6.598, with 36 degrees of freedom. In the
analysis of variance table shown below, the mean squares are those obtained from the computer program
using the averages. The F-value is calculated from the corrected mean square (multiplied by r = 2) and
divided by the error mean square.
The GLM Procedure
Dependent Variable: Y
Source DF Type III SS Mean Square F value
E 1 260.82250 260.82250 79.061
A 2 519.57389 259.78694 78.747
D 1 1.03361 1.03361 0.313
F 2 51423.42389 25711.71194 7793.790
E*A 2 13.56167 6.78083 2.055
E*D 1 1.03361 1.03361 0.313
E*F 2 40.68500 20.34250 6.166
A*D 2 6.06056 3.03028 0.918
A*F 4 198.21778 49.55444 15.021
D*F 2 240.67722 120.33861 36.477
E*A*D 2 8.67722 4.33861 1.315
E*A*F 4 26.90333 6.72583 2.039
E*D*F 2 149.92722 74.96361 22.723
A*D*F 4 43.53111 10.88278 3.299
E*A*D*F 4 6.73444 1.68361 0.510
If we test each hypothesis of negligible main eect or interaction at individual level
= 0.001, the
overall level will be at most = 0.015.
From the F-tables we have
F
1,36,0.001
= 12.9 F
2,36,0.001
= 8.47 F
4,36,0.001
= 5.88
The reults of the hypothesis tests are that, at overall level at most = 0.015, the interactions EDF,
AF are non-negligble. Averaged over the the third factor, the interactions DF and possibly EF are
non-negligible. Averaged over these interactions, there is a signicant dierence in the levels of E, A and
F. In order to be able to draw conclusions about the factors, it would be necessary to examine interaction
plots.
b). To test the null hypothesis that the interaction FA is negligible, against the alternative hypothesis
that it is not negligible, we obtain the formula from rules 1-8 of Section 7.3. First, write the factors in
alphabetical order (A, D, E, F).
AF has (a 1)(f 1) = af a f + 1 degrees of freedom. So the corresponding sum of squares is
ssFA = edr
a
i=1
f
l=1
( y
i..l.
y
i....
y
...l.
+ y
.....
)
2
.
Using the cell means model or the equivalent four-way complete model, the error sum of squares is
ssE = (y
ijklt
y
ijkl.
)
2
.
We reject the null hypothesis of no AF interaction if
ssFA/4
ssE/36
> F
4,36,
.
2
c) In order to answer this question, we need to examone the interaction plots. We see that there
is a clear dierence in the fabrics and the interaction, in comparison, is relatively small ( see also the
analysis of variance table). Consequently, it may well be of interest to calculate condence intervals for
the dierences in the fabrics averaged over the various weather conditions to which the fabric may be
exposed.
A formula for such condence intervals using Bonferroni method of mutiple comparisons is
y
...1.
y
...2.
t
36,0.01/6
(2/12)msE
Plot of AVY*ED. Symbol is value of F.
50 +
|
|
|
|
| 2
0 + 2
| 2 2
|
AVY |
|
|
-50 + 1 1 1 1
|
|
|
| 3
| 3 3
-100 + 3
--+------------+------------+------------+---------
1 2 3 4
ED
Plot of AVY*E. Symbol is value of F.
50 +
|
|
|
|
|
0 + 2
| 2
|
AVY |
|
|
-50 + 1 1
|
|
|
|
| 3
-100 + 3
--+--------------------------------+---------------
1 2
E
3
Plot of AVY*D. Symbol is value of F.
50 +
|
|
|
|
|
0 + 2
| 2
|
AVY |
|
|
-50 + 1 1
|
|
|
|
| 3
-100 + 3
--+--------------------------------+---------------
1 2
D
Plot of AVY*A. Symbol is value of F.
0 +2 2 2
|
|
|
AVY |
|
|
|
|1
-50 + 1
| 1
|
|
|
|
|3
|
| 3
-100 + 3
-+-----------------------+-----------------------+-
1 2 3
A
d) We can see from the DF interaction plot, that averaging over the exposure fabrics 2 and 3 reacted
dierently to direction of the pull. One had larger breaking strength in direction 1 while the oterh had
the larger strength in direction 2. From the ED*F interaction plot, we can see this dierence was more
marked at exposure 1 than exposure 2. these dierences are signicantly larger than the experimental
error. Therefore, it makes no sense to say that direction has no eect on the breaking strength although
one can argue that the eect is small as compared with the fabric dierences.
4
Solution to Question 7.8 Paper towel strength experiment
a) The assumed model is
Y
ijkt
= +
i
+
j
+
k
+ ()
ij
+
ijkt
ijkt
N(0,
2
) (1)
ijkt
s mutually independent
t = 1, 2, 3; i = 1, 2; j = 1, 2; k = 1, 2 .
b) All factors have two levels, so the experimenters were problably interested in
1
2
(since C is not
involved in any interactions), plus the interaction contrast
()
11
()
12
()
21
+ ()
22
.
If the interaction appears to be negligible, then they would be interested in the two main eects contrasts
2
and
2
, where
i
=
i
+ ()
i.
and
j
=
j
+ ()
.j
.
On the other hand, if there is a non-negligible interaction, then the experimenters may be interested
in pairwise dierences in the combinations of the dierent levels of A and B averaged over C.
Thus we might plan to look at 10 contrasts in total.
c) The AC and BC interaction plots are shown below. Neither of these plots exhibits interaction and
the assumptions of no AC and BC interactions look reasonable. The AB interaction plot (not shown)
suggests that the AB interaction is also neglgible.
The SAS System
Obs AMOUNT LIQUID avy vary
1 1 1 3302.33 465084.23
2 1 2 2903.68 139966.03
3 2 1 3035.00 361395.28
4 2 2 2677.10 248273.80
Plot of avy*AMOUNT. Symbol is value of LIQUID.
avy |
3400 +
|
| 1
|
3200 +
|
|
| 1
3000 +
|
| 2
|
2800 +
|
| 2
|
--+--------------------------------+---------------
1 2
AMOUNT
5
Obs BRAND LIQUID avy vary
1 1 1 3635.45 277207.81
2 1 2 3161.20 8906.13
3 2 1 2701.88 69223.94
4 2 2 2419.58 80140.53
Plot of avy*BRAND. Symbol is value of LIQUID.
avy |
|
| 1
3500 +
|
|
| 2
3000 +
|
| 1
|
2500 +
| 2
|
|
2000 +
--+--------------------------------+---------------
1 2
BRAND
d) Some residual plots are shown below. The plot of the standardized residulas against order suggests
some possible non-independence, but this is prmarily caused by the two large residuals in the center of the
plot. An alternative explanation is that these two large values belong to the larger predicted responses,
and so it is possible that the variance is increasing as the mean increases. Both these values belong to
the low level of liquid and Brand 1. There may be a transformation that would help to equalize the
variances. The normality appears to be well-satised.
The SAS System
Plot of Z*ORDER. Legend: A = 1 obs, B = 2 obs, etc.
|
| A
2 + A
|
| A
Z | A
| A A
| A A A
0 + A A A A
| A A A A
| A A A A
|
| A
| A A
-2 +
-+-------+-------+-------+-------+-------+-------+-
0 4 8 12 16 20 24
ORDER
6
Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.
| A
2 + A
|
| A
Z | A
| A A
| A A A
0 + A A A A
| A A B
| A A A A
|
| A
| A A
-2 +
-+-----------+-----------+-----------+-----------+-
2000 2500 3000 3500 4000
YPRED
Plot of Z*AMOUNT. Legend: A = 1 obs, B = 2 obs, etc.
| A
2 + A
|
| A
Z | A
| A A
| B A
0 + A C
| B B
| B B
|
| A
| A A
-2 +
--+--------------------------------+---------------
1 2
AMOUNT
Plot of Z*BRAND. Legend: A = 1 obs, B = 2 obs, etc.
| A
2 + A
|
| A
Z | A
| B
| C
0 + A C
| C A
| B B
|
| A
| A A
-2 +
--+--------------------------------+---------------
1 2
BRAND
7
Plot of Z*LIQUID. Legend: A = 1 obs, B = 2 obs, etc.
|
| A
2 + A
|
| A
Z | A
| A A
| A B
0 + B B
| D
| B B
|
| A
| B
-2 +
--+--------------------------------+---------------
1 2
LIQUID
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
| |
| | A
2 + | A
| |
| | A
Z | | A
| | A A
| | A AA
0 +-----------------------A+AAA----------------------
| A AAA |
| AA A A |
| |
| A |
| A A |
-2 + |
-+-----------+-----------+-----------+-----------+-
-2 -1 0 1 2
Rank for Variable Z
e) The variances are certainly not equal:
Obs TC AVY VARY
1 111 3817.80 277021.33
2 112 3200.57 4035.10
3 121 2786.87 88571.60
4 122 2606.80 81460.84
5 211 3453.10 316243.63
6 212 3121.83 13581.02
7 221 2616.90 62821.75
8 222 2232.37 13740.25
Without any transformation, we cannot rely on the stated p-values, signicance levels and condence
levels. The analysis of variance table gives
8
The GLM Procedure
Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr> F
AMOUNT 1 365930.510 365930.510 3.73 0.0684
BRAND 1 4209358.800 4209358.800 42.93 <.0001
LIQUID 1 858551.854 858551.854 8.76 0.0081
AMOUNT*BRAND 1 3822.850 3822.850 0.04 0.8456
Error 19 1862905.935 98047.681
Corrected Total 23 7300569.950
Thus, even if the p-values are considerably inaccurate, it is clear that there is no substantial AB
interaction and that there is a substantial main eect of Brand. If an overall signicance level of
= 0.04 is selected, so that each test is done at level 0.01, the two levels of liquid type appear to give
signicantly dierent strengths, but the amounts do not. However, if the p-values are corrected for the
dierent variances, a dierent conclusion may be reached.
We may note that the variances of the data at each of the two levels of each factor are not too dierent:
Obs AMOUNT AVY VARY
1 1 3103.01 318365.16
2 2 2856.05 312056.60
Obs BRAND AVY VARY
1 1 3398.33 191391.72
2 2 2560.73 89627.48
Obs LIQUID AVY VARY
1 1 3168.67 395163.54
2 2 2790.39 190474.47
Consequently, any adjustment that we make using Satterthwaites approximation for main eect com-
parisons will make little dierence. If a transformation was to be tried, the most sensible transformation
would be 1/
2
(246.96 365.73) = (612.69, 118.77)
2
(837.59 365.73) = (1203.32, 471.86)
2
(378.28 365.73) = (744.01, 12.55) .
Thus, at an overall 90% condence level, the brands dier in strength by between 472 and 1203
units with brand 2 being the stronger. The amount of liquid absorbed seemed not to aect the strength
substantially, and the type of liquid had a marginal eect with the towels being able to withstand water
better than beer!
9
Solution to Question 7.9 Rocket experiment
a) State a reasonable model for this experiment, including any assumptions on the error term.
Since there is only one observation per treatment combination and since the experimenters were willing
to assume that the 3-factor and 4-factor interactions were negligible, a suitable model would be
Y
ijkl
= +
i
+
j
+
k
+
l
+ ()
ij
+ ()
ik
+ ()
il
+ ()
jk
+ ()
jl
+ ()
kl
+
ijkl
,
ijkl
N(0,
2
) ,
ijkl
s mutually independent ,
i = 1, . . . , a; j = 1, . . . , b; k = 1, . . . , c; l = 1, . . . , d.
where
i
,
j
,
k
,
l
are the eects (positive or negative) on the response of factors A, B, C, D at levels
i, j, k, l, respectively, ()
ij
, ()
ik
, ()
il
, ()
jk
, ()
jl
, ()
kl
are the additional eects of the pairs
of factors together at the specied levels.
b) How would you check the assumptions on your model?
Plot the standardized residuals against (i) the tted values y
ijkl
and against the levels of each of the
four factors to look for equal variance and outliers, (ii) the order of collection to look for independence of
the error variables (this is not possible in this experiment since we do not have the order), (iii) normal
scores to check for normality of the error variables.
c) Calculate an analysis of variance table and test any relevant hypotheses, stating your choice of the
overall level of signicance and your conclusions.
There are 10 hypotheses to be tested. Suppose that we select an overall signicance level of at most
0.1 so that we test the signicance of each eect at level 0.01. We test the interactions rst. If the
interactions containing a given factor are zero, we will then test whether the corresponding main eect
is zero. The ANOVA table is below.
General Linear Models Procedure
Dependent Variable: Y
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 18 673.212725 37.400707 50.39 0.0001
Error 13 9.648825 0.742217
Corrected Total 31 682.861550
Source DF Type III SS Mean Square F Value Pr > F
A 1 0.021012 0.021012 0.03 0.8690
B 1 0.405000 0.405000 0.55 0.4732
C 1 0.610513 0.610513 0.82 0.3809
D 3 665.516025 221.838675 298.89 0.0001
A*B 1 0.556512 0.556512 0.75 0.4022
A*C 1 0.011250 0.011250 0.02 0.9039
A*D 3 1.064613 0.354871 0.48 0.7030
B*C 1 0.427813 0.427813 0.58 0.4613
B*D 3 1.435825 0.478608 0.64 0.5999
C*D 3 3.164163 1.054721 1.42 0.2814
Only the main eect of D appears signicantly dierent from zero at overall signicance level 0.1.
10
d) Levels 0 and 1 of factor D represent temperatures 75
F and 170
F at 35,000 feet. Suppose the experimenters had been interested in two preplanned
contrasts. The rst compares the eects of levels 0 and 1 of D, and the second compares the eects the
levels 0 and 2 of D. Using an overall level of at least 98%, give a set of simultaneous condence intervals
for these two contrasts.
Assume that we are intersted in just these two pre-planned contrasts. For an overall condence level
of at least 98%, we calculate individual 99% condence intervals for the two contrasts. Now, t
13,0.005
=
3.012, and using the SAS output below, the two condence intervals are:
0
: 10.18 3.012(0.431) = (11.48, 8.88)
0
: 0.99 3.012(0.431) = (2.29, 0.31)
At an overall condence level of 98%, the duration of thrust is between 8.8 and 11.4 seconds longer
when level 0 of D is used than when level 1 is used. There does not appear to be a signicant dierence
between the eects of levels 0 and 2.
T for H0: Pr > |T| Std Error of
Parameter Estimate Parameter=0 Estimate
d1-d0 -10.1762500 -23.62 0.0001 0.43076017
d2-d0 -0.9900000 -2.30 0.0388 0.43076017
e) Test the hypotheses that each contrast identied in part (d) is negligible. Be explicit about which
method you are using and your choice of the overall level of signicance.
Using Bonferroni method at overall level at most 0.02 for the two tests, we reject H
0
if
|lse/
(v 1)F
0.02,v1,13
=
0
: 10.18 7.53(0.431) = (13.43, 6.93)
0
: 0.99 7.53(0.431) = (4.24, 2.26)
The condence intervals are much wider than those in part (d), so they give much less precise infor-
mation. However, we still see that level 0 of D gives longer thrust duration than level 0 (at most 14
seconds longer).
11
g) Although it may not be of great interest in this particular experiment, draw an interaction plot for the
CD interaction and explain what it shows.
Plot of avy*D. Symbol is value of C.
25 +
|
|
|
| 1
| 0 1
20 + 0
|
|
avy |
|
|
15 +
|
|
| 0,1
| 0
| 1
10 +
--+------------+------------+------------+---------
0 1 2 3
D
The plot shows almost parallel lines indicating almost no interaction between C and D. It also shows
that levels 0 and 2 of D give a longer duration of thrust than levels 1 and 3 no matter the level of C.
h) If the experimenters had included the 3-factor and 4-factor interactions in the model, how could they
have decided upon the important main eects and interactions?
If these interactions are included in the model, there are no degrees of freedom to estimate the error
variance. A normal probability plot of the normalized contrasts or Voss-Wang method could be used to
identify important eects. Those eects lying o the straight line are likely to be signicantly dierent
from zero. Note that factor D has 3 degrees of freedom, so the plot should include estimates for three
orthogonal contrasts in the levels of D. (Trend contrasts would not make sense here, since D does not
have 4 equally spaced levels). Similarly, each interaction involving D has three degrees of freedom.
12
Solution to Question 7.12 washing power experiment
a) The contrast coecients are given by the following columns:
Trtmt lA qA lC qC lAlC lAqC qAlC qAqC
111 -1 1 -1 1 1 -1 -1 1
112 -1 1 0 -2 0 2 0 -2
113 -1 1 1 1 -1 -1 1 1
121 -1 1 -1 1 1 -1 -1 1
122 -1 1 0 -2 0 2 0 -2
123 -1 1 1 1 -1 -1 1 1
131 -1 1 -1 1 1 -1 -1 1
132 -1 1 0 -2 0 2 0 -2
133 -1 1 1 1 -1 -1 1 1
211 0 -2 -1 1 0 0 2 -2
212 0 -2 0 -2 0 0 0 4
213 0 -2 1 1 0 0 -2 -2
221 0 -2 -1 1 0 0 2 -2
222 0 -2 0 -2 0 0 0 4
223 0 -2 1 1 0 0 -2 -2
231 0 -2 -1 1 0 0 2 -2
232 0 -2 0 -2 0 0 0 4
233 0 -2 1 1 0 0 -2 -2
311 1 1 -1 1 -1 1 -1 1
312 1 1 0 -2 0 -2 0 -2
313 1 1 1 1 1 1 1 1
321 1 1 -1 1 -1 1 -1 1
322 1 1 0 -2 0 -2 0 -2
323 1 1 1 1 1 1 1 1
331 1 1 -1 1 -1 1 -1 1
332 1 1 0 -2 0 -2 0 -2
333 1 1 1 1 1 1 1 1
b) Using the formula for the variance of the contrasts in terms of coecients for
i
jk (Rule 11,sec.7.3),
the divisors for Linear A and Quadratic A are
18 and
54.
The LSE for the Linear A contrast (without divisors) is y
3..
y
1..
= 104.796.
and LSE for the Quadratic A contrast (without divisors) is [y
1..
+ y
3..
] 2y
2..
= 78.2.
So the LSEs of the normalized contrasts are
LSE(lA) = 104.796/(
18) = 24.70065
and
LSE(qA) = 78.2/(
54) = 10.64167 .
c) The contrasts [1, 0, 1] and [.5, 1, .5] for the three levels of factor B are orthogonal. These should
be interpreted as: the contrast which compares the eect of the .2% detergent with that of the .05%
detergent; and the contrast which compares the eect of the .1% detergent with the average eects
of the other two detergents. It probably makes more sense to take the two contrasts [-1, 1, 0] and
[.5, .5, -1]. The sums of squares connected with the two orthogonal contrasts should add to ssB.
13
d) The least squares estimates of the normalized contrasts are listed under CONS. The contrast estimates
with divisor 27 are listed under EST1. NORM lists 27/
1
0.5(
2
+
3
) and
2
, where
i
is the eect of Brand i
averaged over the (almost) signicant brandtime and brandoil interactions; and where
j
is the eect
of oil j averaged over the brandoil interaction.
From SAS, the contrast estimates are as follows. Suppose that we continue to test at level 0.01 for
each hypothesis.
Standard
Parameter Estimate Error t Value Pr > |t|
STORE-AV -0.5000 2.7740 -0.18 0.8590
OIL 2-1 2.9722 2.6154 1.14 0.2707
At an overall type I error probability of at most 0.02, we do not have sucient evidence to reject the
null hypothesis of no dierence between the store brand and the average of the other two (averaged
over oil and time). Similarly, we do not have sucient evidence to reject the null hypothesis of no
dierence between the oil types (averaged over brand and time). However, there is an indication of a
brandoil interaction, so the brand-oil combinations (averaged over time) should perhaps be compared
(in particular, the dierence between combination 31 and the others).
17
c) Analyze the experiment as a product array, and calculate the sample average and the log sample
variance percentage of popped kernels for each brandoil combination. Draw AB interaction plots similar
to those of Figure 7.9, page 223. If the goal of the experiment is still to nd brandoil combinations
that give a high percentage of edible kernels and that are not too sensitive to the popping time, what
recommendations would you make? How do your recommendations compare with those that you made in
part (a)?
Analysed as a product array, we calculate the average o the six observations at each combination of
brand and oil, and also calculate the log sample variance. This gives
Obs BRAND OIL AVPC LNVAR
1 1 1 67.0000 5.36223
2 1 2 73.4167 5.34349
3 2 1 60.0833 4.41814
4 2 2 71.6667 4.48149
5 3 1 80.0833 3.78058
6 3 2 71.0000 4.95371
We see that the highest average percent popped and the lowest variance is obtained from treatment com-
bination 31, exactly as noted in part (a). The two plots are shown below and illustrate that combination
31 is considerably better than the other possibilities in reducing variability and increasing yield.
Plot of LNVAR*BRAND. Symbol is value of OIL.
LNVAR |
5.5 +
|1,2
|
|
5.0 + 2
|
|
|
4.5 + 2
| 1
|
|
4.0 +
|
| 1
|
3.5 +
-+-----------------------+-----------------------+-BRAND
1 2 3
18
Plot of AVPC*BRAND. Symbol is value of OIL.
80 + 1
|
|
|
AVPC |
|
|2
| 2
| 2
70 +
|
|
|1
|
|
|
|
|
60 + 1
-+-----------------------+-----------------------+-BRAND
1 2 3
19
Solution to Question 7.15 Steel bar experiment
We will analyze the data with the outlier removed (observation y
2234
= 0).
i. Variance assumptions.
The residual plots of residual vs predicted and vs. each factor show no indications of heteroscedacity.
Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.
Z |
5 +
| A A A
| AA A A A A
| AA AA A
2 + A A A A A
| AA A A B A C
| A AB AAA B C C AA A
|-------------BA--AA---B--C---A-----A----
-1 + A BA A A AA
| A A AA A B A ABA A
| A A A B B A
| A AA A
-4 + A A A
|
-+------------+------------+------------+
-5 0 5 10
YPRED
Plot of Z*A. Legend: A = 1 obs, B = 2 obs, etc.
Z |
5 +
| B A
| C C
| C B
2 + B C
| F D
| H J
|-C--------------------------I-----------
-1 + E C
| H E
| D D
| B B
-4 + B A
|
--+--------------------------+-----------
1 2
A
20
Plot of Z*B. Legend: A = 1 obs, B = 2 obs, etc.
Z |
5 +
|A B
|B A C
|B B A
2 +B B A
|B C C B
|C D D G
|A------------C------------E------------C
-1 +C A C A
|C D D B
|B B D
|A B A
-4 +B A
|
-+------------+------------+------------+
1 2 3 4
B
Plot of Z*C. Legend: A = 1 obs, B = 2 obs, etc.
Z |
5 +
|A B
|A B C
|A B B
2 +A A C
|E D A
|G I B
|E------------------C------------------D-
-1 +B B D
|F C D
|B E A
| A C
-4 +A B
|
-+------------------+------------------+-
1 2 3
C
ii. Independence assumption
The order of observation is not given, so we cannot check the independence assumption.
21
iii. Normality.
The normal probability plot shows no serious departure from normality.
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z |
2.438 +
| AAA
| BCA
| CB
0.975 + DA
| BFB
| DJD
|------------------GE--------------------
-0.488 + GA
| FFA
| DD
| AC
-1.950 + AAA
|
--+--------+--------+--------+--------+--
-4 -2 0 2 4
RANK FOR VARIABLE Z
General Linear Models Procedure
Dependent Variable: Y
Source DF Sum of Squares F Value Pr > F
Model 23 626.58333333 4.89 0.0001
Error 71 395.41666667
Corrected Total 94 1022.00000000
R-Square C.V. Y Mean
0.613095 58.99814 4.00000000
Source DF Type III SS F Value Pr > F
A 1 82.60388128 14.83 0.0003
B 3 421.46444444 25.23 0.0001
C 2 22.24253941 2.00 0.1433
A*B 3 1.94444444 0.12 0.9502
A*C 2 0.83375563 0.07 0.9280
B*C 6 84.01749466 2.51 0.0290
A*B*C 6 21.30916132 0.64 0.6996
For an OVERALL level of .05, we can conclude there is an eect due to heat (A) and machine (B)
but no eects due to time (C) nor any (statistically signicant) eect due to interaction. However, we
note the fairly small p-value for interaction of B and C.
22
d.)
10 +
|
|
AV_Y | 3
| 2
|
| 1
5 + 3 2 1
|
| 1
|
|
| 2
| 1
0 +
---+---------------+---------------+---------------+--
1 2 3 4
Machine
NOTE: 3 obs hidden.
It appears machine 3 is most robust as the average lengths at each time (C) are closer than the average
lengths at each time for the other machines. Assuming the machines are identical in make and model, a
possible cause for the dierence in robustness could be age of the machine or the operator.
e.)
Least Squares Means
95% 95%
Lower Upper
Confidence Confidence
B Limit Y LSMEAN Limit
1 2.456149 3.416667 4.377185
2 5.235384 6.222222 7.209061
3 -0.085518 0.875000 1.835518
4 4.706149 5.666667 6.627185
It appears that machine 4 is closest to specications.
23
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 10
20 August 2006
Solutions available in this le
c 2006 Angela Dean. All rights reserved.
No part of this work may be displayed on the web or reproduced in any form without
the written permission of Angela Dean, The Ohio State University.
Question 10.6 Candle experiment
Question 10.7 Salt water experiment
Question 10.8 Chemical experiment
Question 10.10 Length perception experiment
Question 10.12 Biscuit experiment
Question 10.16 Exam paper experiment
1
Solution to Question 10.6 Candle experiment
(a) Explain what blocktreatment interaction means in the context of this experiment. Can you think of
any causes that might have led to the presence of interaction in the pilot experiment?
In this experiment, the treatments are the dierent candle colors and the blocks are the dierent
experimenters. So a blocktreatment interaction would indicate that the color of the candle aected the
speed of burning dierently for each of the dierent experimenters. For example, the red candles may have
burned fastest for Tsai and Wheeler, the white fastest for Yang, and the yellow fastest for Schultz. The
presence of the interaction could possibly have been caused by bias on the part of an experimenter. For
example, one experimenter might have let the red candle burn past the designated mark, while blowing
out the white candle prematurely.
(b) Plot the data (Table 10.20) from the main experiment and interpret your plot(s).
Below is a plot of the data, plotting burning time vs. experimenters (blocks) with the colors (treat-
ments) as the labels. The plot suggests that there may exist some color (treatment) dierences, as the
data for color 3 (blue) are mostly below the data for the other colors for all blocks, and the data for color
1 (red) are mostly above the data for the other colors for all blocks. There probably does not exist a
colorexperimenter (treatmentblock) interaction, since the relative position of the data for each block
is similar (i.e. color 1 (red) is always near the top and color 3 (blue) is always near the bottom).
Plot of AV_TIME*BLOCK. Symbol is value of COLOR.
1100 +
|
|
|
| 1
| 2
1000 +
| 3 1
| 2
AV_TIME |
| 4
| 1 1
900 +
| 4
| 2 3
| 3
| 3
|
800 +
--+------------+------------+------------+---------
1 2 3 4
BLOCK
2
(c) Complete an analysis of variance table for the data using the blocktreatment interaction model (??)
for a general complete block design.
The block-treatment interaction model is as follows:
Y
hit
= +
h
+
i
+ ()
hi
+
hit
.
hit
N(0,
2
) ,
hit
s are mutually independent ,
t = 1, 2, 3, 4; h = 1, 2, 3, 4; i = 1, 2, 3, 4.
The anlysis of variance table is shown below.
The GLM Procedure
Dependent Variable: time
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 15 227824.7500 15188.3167 8.89 <.0001
Error 48 82025.0000 1708.8542
Corrected Total 63 309849.7500
Source DF Type I SS Mean Square F Value Pr > F
Source DF Type III SS Mean Square F Value Pr > F
block 3 151659.1250 50553.0417 29.58 <.0001
color 3 60345.0000 20115.0000 11.77 <.0001
block*color 9 15820.6250 1757.8472 1.03 0.4315
(d) Test the null hypotheses of negligible blocktreatment interaction and, if appropriate, test the null
hypothesis of equality of treatment eects.
Using an overall signicance level of at most 0.02, we test the eect on the response of the blockcolor
interaction at individual level 0.01 and, if relevant, the eect of color at level 0.01. For the interaction,
we test the hypothesis:
H
T
0
: {()
hi
()
h.
()
.i
+ ()
..
= 0 for all h, i}
against H
T
1
:{ at least one interaction contrast is nonzero}. The value of the test statistic ms(T)/msE =
1.03 with a p-value of 0.4315 > 0.01. Therefore, we fail to reject H
T
0
and there is not sucent eveidence
to conclude a signicant blockcolor interaction.
Since there is not a signifcant blockcolor interaction, we can now test for dierences in average
burning times between the colors; that is H
T
0
: {
1
=
2
=
3
=
4
} against H
T
1
: {at least two color
eects dier}. The value of the test statistic msT/msE = 11.77 with a p-value of p < 0.0001 < 0.01.
Therefore, we reject H
T
0
and conclude that a statistically signicant color (treatment) eect exists; that
is, we conclude that at least one of the colors burns at a dierent speed from the others.
(e) Use an appropriate multiple comparisons procedure to evaluate which color of candle is best. Interpret
the results.
These intervals were probably pre-planned, so we can use Bonferonni or Tukey methods to examine
the m = 6 pairwise comparisons. To determine which type of multiple comparisons to compute, we rst
examine the critical coecients for each type of interval. The critical coecients for condence level level
99% are:
w
B
= t
nvb,/2m
= t
48,0.00083
= 3.3332
and
w
T
= q
v,nvb,
/
2 = q
4,48,0.01
/
2 = 4.644/
2 = 3.283.
3
We see that w
T
and w
B
are comparable, with w
T
just slightly smaller. Therefore, we compute all pairwise
multiple comparisons using Tukeys method at an overall level of 99%.
The following output is produced by SAS:
The GLM Procedure
Tukeys Studentized Range (HSD) Test for TIME
NOTE: This test controls the Type I experimentwise error rate.
Alpha 0.01
Error Degrees of Freedom 48
Error Mean Square 1708.854
Critical Value of Studentized Range 4.64437
Minimum Significant Difference 47.998
Comparisons significant at the 0.01 level are indicated by ***.
Difference Simultaneous
COLOR Between 99% Confidence
Comparison Means Limits
1 - 4 14.25 -33.75 62.25
1 - 2 25.25 -22.75 73.25
1 - 3 81.00 33.00 129.00 ***
4 - 2 11.00 -37.00 59.00
4 - 3 66.75 18.75 114.75 ***
2 - 3 55.75 7.75 103.75 ***
Based on this output, we can conclude that blue candles (color 3) burn more quickly than the other
colors, but there is not a signicant dierence between the red (color 1), white (color 2) or yellow (color
4) candles. Therefore, if slower burning is better, one should not buy blue candles!
(f) Discuss whether blocking was important in this experiment.
If we compare ms with msE, we see that ms is about 30 times as large as msE. 830 is large.
Therefore, clearly blocking was important in this experiment, and it did reduce the error variability.
4
Question 10.7 Salt water experiment
a) Plot the data and interpret the results.
The following plot of average temperature for each salt level for each block indicates a linear trend in
boiling point as the salt level increases. There may be some interaction between block and salt contrary
to the experimenters assumptions.
Plot of MN_TEMP*SALT. Symbol is value of BLOCK.
MN_TEMP |
|
|
99.0 +
| 1,3
|
| 2
98.5 +
| 1,2
| 3
|
98.0 +
|
| 1,3
|
97.5 +2
|1,3 3 2
| 2
|
97.0 +
| 1
|
|
96.5 +
|
-+-----------+-----------+-----------+-----------+-
0 8 16 24 32
SALT
b) Complete an analysis of variance table for the data and test for equality of treatment eects.
With no block*salt interaction in the model, we have
The GLM Procedure
Dependent Variable: TEMP
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 6 15.72088889 2.62014815 30.03 <.0001
Error 38 3.31555556 0.08725146
Corrected Total 44 19.03644444
Source DF Type III SS Mean Square F Value Pr > F
BLOCK 2 0.14444444 0.07222222 0.83 0.4448
SALT 4 15.57644444 3.89411111 44.63 <.0001
5
The hypothesis of equality of treatment (salt) means would be rejected for any reasonable choice of
signicance level .
c) Evaluate whether blocking was worthwhile and whether the assumption of no treatmentblock in-
teraction looks reasonable.
The mean square for Blocks (ms) is less than msE, indicating blocking was not very benecial.
However, since it only accounts for 2 degrees of freedom and the error is based on 44 degrees of freedom,
the power of the test for no treatment dierences was not greatly reduced.
Although the interaction plot does indicate some interaction, we note (i) the size of the dierences
between the blocks at each salt level is rather small and (ii) for each block, the same story is being
told about the relationship between salt and temperature. We may conclude that the model with no
treatment-block interaction is reasonable. The lack of the interaction term in the model may possibly
account for msE being larger than ms.
d) Compute sums of squares for orthogonal trend contrasts, and test the trends for signicance, using
a simultaneous error rate of 5%. Explain your results in terms of the eect of salt on the boiling point of
water.
The contrast coecients from Table A.2 are
CONTRAST LINEAR SALT -2 -1 0 1 2;
CONTRAST QUAD SALT 2 -1 -2 -1 2;
CONTRAST CUBIC SALT -1 2 0 -2 1;
CONTRAST QUARTIC SALT 1 -4 6 -4 1;
The contrast sums of squares are
Linear Quad. Cubic Quartic
SSC 12.996 1.786 0.784 0.0107
and msE t
38,.005
= 0.2362694. Using Table A.2, the 95% simultaneous Bonferroni intervals are
Lower bound Upper bound
Linear 2.956860 4.643140
Quadratic 197.269050 199.264284
Cubic -1.776474 -0.090193
Quartic -1.941851 2.519628
So the Linear,Quadratic and Cubic trends are simultaneously signicantly diferent from zero.
Alternatively, from SAS we obtain
Contrast DF Contrast SS Mean Square F Value Pr > F
LINEAR 1 12.99600000 12.99600000 150.24 <.0001
QUAD 1 1.78571429 1.78571429 20.64 <.0001
CUBIC 1 0.78400000 0.78400000 9.06 0.0045
QUARTIC 1 0.01073016 0.01073016 0.12 0.7265
Selecting individual signicance level 0.05/4 = 0.0125, and comparing this with the p-values, we reject
the hypotheses that the linear, quadratic and cubic trends are each negligible, but fail the reject the
hypothesis that the quartic trend is negligible.
e) Calculate the number of observations needed per treatment if a test of equal ity of treatment eects
using = 0.05 is to have power 0.95 in detecting a dierence of 1
C when = 0.5
C.
TO BE ADDED AT A LATER DATE
6
Question 10.8 Chemical experiment
a) Draw a graph of the data and comment on it.
First, recode the treatment combination labels 111, 112, 121, . . ., 122 as treatment labels 1, 2, 3, . . .,
8. A plot of the average response for each treatment in each block is shown below.
Plot of Y*BLOCK. Symbol is value of TRT.
30 +
|
|
| 6
| 5
| 4
20 + 6
| 6 4,5 8
| 5 3,7 5,6
Y | 4 3,8 4
| 3,8 2 8
| 7 2,7 1 3
10 + 2 7
| 1 2
| 1 1
|
|
|
0 +
--+------------+------------+------------+---------
1 2 3 4
BLOCK
The plot indicates very little interaction between block and treatment eects, since treatments 4, 5, and
6 give consistently highest yields, while treatments 1, 2 and 7 give consistently the lowest yields.
b) State a possible model for this experiment. List any assumptions you have made and discuss the
circumstances in which you would expect the assumptions to be valid.
A possible model for this experiment is the block-treatment model
Y
hijk
= +
h
+
ijk
+
hijk
(1)
hijk
N(0,
2
)
hijk
hi
N(0,
2
) ,
hi
2
Circle:
3
4
Triangle:
5
6
(ii) Area dierence on average (
1
+
3
+
5
6
)/3
(iii) Shape dierences on average
Squarecircle : (
1
+
2
4
)/2
Squaretriangle : (
1
+
2
6
)/2
Circletriangle: (
3
+
4
6
)/2
15
d) Give a set of 99% simultaneous condence intervals for the contrasts in c(i). State your conclusions.
For the three contrasts in part c(i), at an overall level of 99%, we assume that these were preplanned
and use Bonferonnis method. From SAS:
The GLM Procedure
Dependent Variable: Y
Parameter Estimate Error t Value Pr > |t|
SHP1 AREA 2-1 0.61785714 0.16044891 3.85 0.0003
SHP2 AREA 2-1 0.24285714 0.16044891 1.51 0.1350
SHP3 AREA 2-1 0.23214286 0.16044891 1.45 0.1527
Each condence interval should be of the form
estimate t
65,0.01/6
Standard error
The error degrees of freedom are n b v + 1 = 6 14 14 6 + 1 = 65. The critical coecient is
t
65,0.01/6
= 3.0477, so the three condence intervals at overall level 99% are
SHP1 AREA 2-1 0.61785714 3.047 0.16044891 = (0.129, 1.107)
SHP2 AREA 2-1 0.24285714 3.047 0.16044891 = (0.246, 0.732)
SHP3 AREA 2-1 0.23214286 3.047 0.16044891 = (0.257, 0.721)
At overall level 99%, we conclude that there is no dierence in the eects of the area for circle or
triangle, but that for the square the small square causes the line to be drawn between 0.129 cm and 1.107
cm larger than the large square.
e) Under what conditions would the contrasts in c(ii) and c(iii) be of interest? Do these conditions hold
for this experiment?
The contrasts in c(ii) and c(iii) would be of interest if the shape by area interaction is not signicantly
dierent from zero. From the following analysis of variance table, we see that we would fail to reject the
null hypothesis of no interaction at any signicance level smaller than .16 and so these contrasts would
be of interest.
The GLM Procedure
Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 18 32.81690476 1.82316138 10.12 <.0001
Error 65 11.71345238 0.18020696
Corrected Total 83 44.53035714
Source DF Type III SS Mean Square F Value Pr > F
SUBJECT 13 29.26869048 2.25143773 12.49 <.0001
SHAPE 2 0.08589286 0.04294643 0.24 0.7886
AREA 1 2.78678571 2.78678571 15.46 0.0002
SHAPE*AREA 2 0.67553571 0.33776786 1.87 0.1617
16
Question 10.12 Biscuit experiment
a) State a suitable model for this experiment and check that the assumptions on your model hold for
these data.
The block-treatment model is
Y
hijt
= + b
h
+
ij
+
hijt
;
h = 1, .., 4; i = 1, 2, 3; j = 1, 2, 3; t = 1, 2
hijt
N(0,
2
)
where b
h
is the eect due to block h and
ij
is the eect due to treatment combination ij (height, kneading
time).
The three residual plots below do not show any serious signs of heteroscedacity.
Plot of Z*PREDY. Symbol is value of BLOCK.
|
| 4
2 + 2 3
| 2 3
Z | 1 2 3 1 34
| 1 2 1 3
| 1142 1142 114
0 +---------1434-2-1-4------------------4--1--2------
| 332 243 2 3
| 4 21 3 2 2
| 433 1 2 4
| 3
-2 + 1
| 4 1
|
--+--------+--------+--------+--------+--------+---
150 200 250 300 350 400
PREDY
Plot of Z*BLOCK. Legend: A = 1 obs, B = 2 obs, etc.
|
| A
2 + A A
| A A
Z | B A B B
| B A A
| G B A E
0 +-C------------C------------C------------D---------
| C D A
| A E B B
| A A B B
| A
-2 + A
| A A
--+------------+------------+------------+---------
1 2 3 4
BLOCK
17
Plot of Z*TC. Legend: A = 1 obs, B = 2 obs, etc.
|
| A
2 + A A
| A A
Z | A B A A A A
| A A A A
| A B D C B B A
0 +-B----A----B---------A----A----D---------B--------
| A C A B A
| A C A A A B A
| A B B A
| A
-2 + A
| A A
|
--+----+----+----+----+----+----+----+----+--------
11 12 13 21 22 23 31 32 33
TC
The Normality assumption appears satised.
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
| |
| | A
2 + | AA
| | AA
Z | | BBBA
| | CA
| |BEDD
0 +----------------------AEDC------------------------
| DD |
| CCD |
| BBB |
| A |
-2 + A |
| A A |
| |
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
Rank for Variable Z
b) Use an appropriate multiple comparisons procedure to evaluate which treatment combination is
best.
The Tukey pairwise comparisons at level 95% show that treatment combinations 11, 12, and 13 are all
signicantly dierent from the other treatment combinations (averaged over blocks). Since the dierences
are positive, we can conclude that a smaller initial height leads to a higher percentage increase in height
and hence uer biscuits. For height 1 we see no signicant dierences in the eect of dierent kneading
times. However, each contrast of treatment combination 13 versus each other treatment combination is
positive and large. Thus, it looks as though a longer kneading time may be benecial and this should
perhaps be studied further in a follow-up experiment.
18
General Linear Models Procedure
Tukeys Studentized Range (HSD) Test for variable: Y
NOTE: This test controls the type I experimentwise error rate.
Alpha= 0.05 Confidence= 0.95 df= 60 MSE= 567.8419
Critical Value of Studentized Range= 4.550
Minimum Significant Difference= 38.337
Comparisons significant at the 0.05 level are indicated by ***.
Simultaneous Simultaneous
Lower Difference Upper
TC Confidence Between Confidence
Comparison Limit Means Limit
13 - 12 -23.65 14.69 53.02
13 - 11 -17.44 20.90 59.24
13 - 21 71.64 109.98 148.31 ***
13 - 23 90.39 128.73 167.06 ***
13 - 22 95.08 133.41 171.75 ***
13 - 33 125.31 163.65 201.99 ***
13 - 32 126.86 165.20 203.54 ***
13 - 31 134.65 172.99 211.32 ***
12 - 11 -32.12 6.21 44.55
12 - 21 56.95 95.29 133.62 ***
12 - 23 75.70 114.04 152.37 ***
12 - 22 80.39 118.73 157.06 ***
12 - 33 110.63 148.96 187.30 ***
12 - 32 112.18 150.51 188.85 ***
12 - 31 119.96 158.30 196.64 ***
11 - 21 50.74 89.08 127.41 ***
11 - 23 69.49 107.83 146.16 ***
11 - 22 74.18 112.51 150.85 ***
11 - 33 104.41 142.75 181.09 ***
11 - 32 105.96 144.30 182.64 ***
11 - 31 113.75 152.09 190.42 ***
21 - 23 -19.59 18.75 57.09
21 - 22 -14.90 23.44 61.77
21 - 33 15.34 53.67 92.01 ***
21 - 32 16.89 55.22 93.56 ***
21 - 31 24.68 63.01 101.35 ***
23 - 22 -33.65 4.69 43.02
23 - 33 -3.41 34.93 73.26
23 - 32 -1.86 36.48 74.81
23 - 31 5.93 44.26 82.60 ***
22 - 33 -8.10 30.24 68.57
22 - 32 -6.55 31.79 70.12
22 - 31 1.24 39.57 77.91 ***
33 - 32 -36.79 1.55 39.89
33 - 31 -29.00 9.34 47.67
32 - 31 -30.55 7.79 46.12
19
c) Evaluate whether blocking was worthwhile in this experiment.
We see that relative to MSE, MSblock is larger. That is MSE/MSblock = 2.5. The plot below shows
on average, biscuits in Block 1 were not as uy. Blocking was probably worthwhile.
General Linear Models Procedure
Dependent Variable: Y
Source DF Sum of Squares F Value Pr > F
Model 11 317818.006250 50.88 0.0001
Error 60 34070.516944
Corrected Total 71 351888.523194
Source DF Type I SS F Value Pr > F
BLOCK 3 4254.129306 2.50 0.0682
TC 8 313563.876944 69.03 0.0001
Plot of AV_Y*BLOCK. Legend: A = 1 obs, B = 2 obs, etc.
AV_Y |
290 +
|
| A
|
280 +
| A
|
| A
270 +
|
| A
|
260 +
---+---------------+---------------+---------------+--
1 2 3 4
BLOCK
20
Question 10.16 Exam paper experiment
a) Plot the data for each treatment combination in each block. Can you conclude anything from looking
at the data plots?
In block=1
Plot of score*tc. Legend: A = 1 obs, B = 2 obs, etc.
score |
100 +
|
| A B A
| C A A C
80 + A C A
| A
| A B A
| A
60 + A A B
| A C
| A A
| B A
40 +
| A
| A A
|
20 +
--+--------+--------+--------+-
11 12 21 22
tc
In block=2
Plot of score*tc. Legend: A = 1 obs, B = 2 obs, etc.
score |
100 + A
| B E A
| B A
| A
| B
| A
75 + A A
| E B B
| A A A
| A A B
| C A B B
| A
50 + A A
|
|
| A A
|
| A
25 + A
--+--------+--------+--------+-
11 12 21 22
tc
21
As seen in the above plots, the data in blocks 2 and 3 are mostly between 50 and 100 with a few
low scores. In block 1, the data a re perhaps more evenly spread. it is not clear that the equal variance
assumption is approximately satised.
b) Fit a block-treatment model without block*treatment interaction. Using a computer package,
calculate the analysis of variance table and state your conclusions.
The model is
Y
hit
= +
h
+
1i
+
2j
+
hit
hit
N(0, (
2
),
hit
s mutually independent
h = 1, 2, 3; i = 1, 2; j = 1, 2; t = 1, ..., 49.
The analysis of variance table from SAS is
The GLM Procedure
Dependent Variable: score
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 4 1159.54816 289.88704 0.85 0.4934
Error 125 42402.02876 339.21623
Corrected Total 129 43561.57692
Source DF Type III SS Mean Square F Value Pr > F
block 2 259.3146437 129.6573219 0.38 0.6831
color 1 27.5663936 27.5663936 0.08 0.7761
version 1 818.7570356 818.7570356 2.41 0.1228
Individual tests for the eects of color and version are each insignicant since there p-values ore very
large. Thus, we conclude that both color and version have negligible eect on the test scores. Blocking
by teaching assistants did not increase the power of the tests for this experiment since ms < msE..
22
c) Check the assumptions on your model by plotting the standardized residuals.
Plot of z*nscore. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A
| AEBCBA
| FFEB
| FHA
| GB
0 +-----------------------DHB------------------------
| CHE
| FGE
z | ADE
| C
| B
-2 + ABA
| AAA
|
|
| A
|
-4 +
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
Rank for Variable z
The normal probability plot shows a fairly straight line, although there is a short right tail.
Plot of z*ypred. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A
| B B B B E A
| C A C D B A A BA A
| C A A D BB B
| A A B A A C
0 + C A B A EB
| B A D A A C A B A
| C A A B A B CB C
z | C A A A A C
| B A
| A A
-2 + A A A A
| A A A
|
|
| A
|
-4 +
-+-----------+-----------+-----------+-----------+-
65.0 67.5 70.0 72.5 75.0
ypred
23
The plot of the standardized residuals versus the predicted values shows no particular pattern. There
is one value that could be an outlier since it has a z-score that is less than -3.
Plot of z*block. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A
|B I C
|G C I
|H C D
|B C D
0 +C I B
|D G E
|D G G
z |D B D
|B A
| A A
-2 +B B
|A A A
|
|
| A
|
-4 +
-+-----------------------+-----------------------+-
1 2 3
block
Plot of z*color. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| B
| E I
| I J
| K D
| E D
0 + G G
| H H
| I I
z | C G
| A B
| A A
-2 + B B
| A B
|
|
| A
|
-4 +
--+--------------------------------+---------------
1 2
color
24
Plot of z*version. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A
| F H
| H K
| K D
| E D
0 + J D
| D L
| K G
z | E E
| C
| A A
-2 + B B
| A B
|
|
| A
|
-4 +
--+--------------------------------+---------------
1 2
version
We can now see that, although there was concern about the constant variance assumption in part (a),
for tests of color and version, the equal variance assumption does appear reasonable. There appears to
be an outlier for version 2, color 1 in block 3.
Plot of z*order. Legend: A = 1 obs, B = 2 obs, etc.
2 +
| A A
| AA B A AAAAAA BA
| D AB AC AAA A CA
| ACC BA A A A A A
| A AA AA A A A A
0 + AAB B BA A A AB
| A A A BA AA A A B BA A
| AB A B BA AB BAAA A
z | A A A BB B A
| A AA
| AA
-2 + A A A A
| A A A
|
|
| A
|
-4 +
--+---------+---------+---------+------------------
0 20 40 60
order
The plot of the standardized residuals vs. order veries that the independence assumption has not
been violated.
25
d) If the same teaching assistant had been assigned to all three classes, should the experiment still
have been designed as a block design? Discuss.
Yes, the experiment should still be a block design. Even though the same teaching assistant would
have proctored all three exams, there may still be an order eect. Suppose one exam was given at
9:00AM and another was given later in the afternoon, we must account for the possibility that students
from the earlier sections spoke with the students in the later sections, or that students may be tired later
in the day.. Furthermore, we must account for environmental dierences between the three classrooms;
for example, one classroom may be excessively hot or cold.
26
Design and Analysis of Experiments
Angela Dean and Daniel Voss
Solutions to Chapter 12
12 February 2003
Solutions available in this le
c 2003 Angela Dean. All rights reserved.
No part of this work may be displayed on the web. No part of this work may be reproduced
in any form without the written permission of Angela Dean, The Ohio State University.
Question 12.6 Video Game Experiment
Question 12.10 Quantity Perception Experiment
1
Solution to Question 12.6 - Video Game Experiment
(a) Model: Y
hqi
= +
h
+
q
+
i
+
hqi
hqi
N(0,
2
)
hqi
s mutually independent
h = 1, 2, 3, 4, 5; q = 1, 2, 3, 4, 5; i = 1, 2, 3, 4, 5; (h, q, i)inthedesign
Below is a plot of the standardized residuals against the treatment levels, a plot of the standardized
residuals again the days (column block), and a plot of the standardized residuals again the order (row
block). Each plot is randomly distributed about zero, thus indicating that there does not exist a problem
of lack of t. This model appears to be appropriate for this data.
The SAS System 6
16:06 Sunday, August 5, 2001
Plot of Z*trt. Legend: A = 1 obs, B = 2 obs, etc.
4 +
|
|
|
|
|
2 +A
| A
| A A
Z | A
| A B
| A
0 +A-----------A-----------A-----------A-----------A-
|B A A
|
| B A A
|A A
| A
-2 +
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
trt
2
Plot of Z*day. Legend: A = 1 obs, B = 2 obs, etc.
4 +
|
|
|
|
|
2 + A
| A
| A A
Z |A
| B A
| A
0 +B-----------B-----------------------A-------------
|A A B
|
|A A A A
| A A
| A
-2 +
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
day
Plot of Z*order. Legend: A = 1 obs, B = 2 obs, etc.
4 +
|
|
|
|
|
2 + A
| A
|A A
Z | A
| A A A
| A
0 +B-----------------------------------------------C-
|A A A A
|
|A A B
| A A
| A
-2 +
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
order
3
Below is a plot of the standardized residuals vs. the predicted values. Again, the residuals appear
to be randomly distributed about zero. There do not appear to be any strong increasing or decreasing
trends to the data. Therefore, we conclude that the assumption of equal variances is valid.
Plot of Z*pred. Legend: A = 1 obs, B = 2 obs, etc.
4 +
|
|
|
|
|
2 + A
| A
| A A
Z | A
| A A A
| A
0 +---------------------A--B--A--A-------------------
| B A A
|
| A A AA
| A A
| A
-2 +
--+------------+------------+------------+---------
60 80 100 120
pred
A normal probability plot of the residuals is shown below. The plot idicates a relatively straight line,
indicating that the normality assumption is reasonable.
Plot of Z*nscore. Legend: A = 1 obs, B = 2 obs, etc.
4 + |
| |
| |
| |
| |
| |
2 + | A
| | A
| | A A
Z | | A
| | A AA
| | A
0 +-----------------------AAAA-A---------------------
| AAA A |
| |
| A A AA |
| A A |
|A |
-2 + |
-+-----------+-----------+-----------+-----------+-
-2 -1 0 1 2
Rank for Variable Z
4
(b) A plot of the adjusted data vs the treatment levels is presented below. Based on this plot, it
appears that Professor Wardrops scores are lower for treatment 1 than for the other four treatmend;
Professor Wardrops scores are approximately equal for treatments 2,3,4, and 5, after adjusting for the
two blocking factors.
Plot of yadj*trt. Legend: A = 1 obs, B = 2 obs, etc.
120 +
|
| A
|
| A B
| B
100 + B A B
|A
| B A A
yadj | B
| A
|
80 + A A
|B
|A
|
|A
|
60 +
-+-----------+-----------+-----------+-----------+-
1 2 3 4 5
trt
(c) The analysis of variance table produced by SAS is presented below.
The GLM Procedure
Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr>F
Model 12 4094.720000 341.226667 2.34 0.0774
Error 12 1748.720000 145.726667
Corrected Total 24 5843.440000
R-Square Coeff Var Root MSE Y Mean
0.700738 12.93584 12.07173 93.32000
Source DF Type III SS Mean Square F Value Pr>F
order 4 514.240000 128.560000 0.88 0.5033
day 4 1711.440000 427.860000 2.94 0.0661
trt 4 1869.040000 467.260000 3.21 0.0523
(d) To evaluate whether or not blocking was eective, we must compare the mean square for each
blocking factor to the msE. For the blocking factor of day, ms/msE = 427.86/145.726667 = 2.9360
which is relatively large. So we would conclude that the day block was eective. Similarly, for the
blocking factor of order, ms/msE = 128.56/145.72667 < 1. Since the ratio is less than 1, we would
conclude that the use of order for blocking was not eective.
5
(e) Using Schees Method, simultaneous 95% condence intervals for all pairwise comparisons as well
as the music vs. no music and game sounds vs. no game sounds contrasts are
i
d
i
i
d
i
i
w
V ar(
i
d
i
i
)
where w =
(v 1)F
v1,bcbcv+2,
and, for these data, w =
4 F
4,12,.05
=
4 3.2592 = 3.6106 .
From SAS, the 95% simultaneous condence intervals for all pairwise dierences are:
2
(49.366574, 5.766574)
3
(45.366574, 9.766574)
4
(43.566574, 11.566574)
5
(52.566574, 2.566574)
3
(23.566574, 31.566574)
4
(21.766574, 33.366574)
5
(30.766574, 24.366574)
4
(25.766574, 29.366574)
5
(34.766574, 20.366574)
5
(36.566574, 18.566574)
Since each of the condence intervals contains zero, we conclude that there does not exist a statistically
signicant dierence between any of the treatments, at an overall level of 95%
The condence interval for the music vs. no music contrast
1
3
(
1
+
2
+
3
)
1
2
(
4
+
5
) is:
i
d
i
i
{
i
d
i
i
w
V ar(
i
d
i
I
)}
= 7.30 3.6106 4.92826316 = (25.0942, 10.4942) .
Since this condence interval contains zero, we conclude that there does not exist a statistically
signicant dierence between the music and no music treatment conditions.
And the condence interval for the games sound vs. no game sound contrast
1
4
(
1
+
2
+
3
+
4
)
5
is:
i
d
i
i
{
i
d
i
i
w
V ar(
i
d
i
I
)}
= 11.1 3.6106 6.03586503 = (32.8934, 10.6934) .
Since this condence interval contains zero, we conclude that there does not exist a statistically
signicant dierence between the games sounds and no game sounds treatment conditions.
The GLM Procedure
Least Squares Means
Adjustment for Multiple Comparisons: Scheffe
LSMEAN
trt Y LSMEAN Number
1 77.200000 1
2 99.000000 2
3 95.000000 3
4 93.200000 4
5 102.200000 5
6
Least Squares Means for effect trt
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Y
i/j 1 2 3 4 5
1 0.1528 0.3051 0.4014 0.0831
2 0.1528 0.9903 0.9621 0.9958
3 0.3051 0.9903 0.9996 0.9208
4 0.4014 0.9621 0.9996 0.8409
5 0.0831 0.9958 0.9208 0.8409
trt Y LSMEAN 95% Confidence Limits
1 77.200000 65.437370 88.962630
2 99.000000 87.237370 110.762630
3 95.000000 83.237370 106.762630
4 93.200000 81.437370 104.962630
5 102.200000 90.437370 113.962630
Least Squares Means for Effect trt
Difference Simultaneous 95%
Between Confidence Limits for
i j Means LSMean(i)-LSMean(j)
1 2 -21.800000 -49.366574 5.766574
1 3 -17.800000 -45.366574 9.766574
1 4 -16.000000 -43.566574 11.566574
1 5 -25.000000 -52.566574 2.566574
2 3 4.000000 -23.566574 31.566574
2 4 5.800000 -21.766574 33.366574
2 5 -3.200000 -30.766574 24.366574
3 4 1.800000 -25.766574 29.366574
3 5 -7.200000 -34.766574 20.366574
4 5 -9.000000 -36.566574 18.566574
The GLM Procedure
Dependent Variable: Y
Standard
Parameter Estimate Error t Value Pr > |t|
music -7.3000000 4.92826316 -1.48 0.1643
game sound -11.1000000 6.03586503 -1.84 0.0908
(f) Based on the multiple comparisons of part (e), I would conclude that there does not exist a sta-
tistically signicant dierence between any of the treatment conditions, and thus no treatment condition
produces better scores than any other treatment condition. Thus, it does not matter which sound mode
Professor Wardrop uses.
7
*Chapter 12;
*Exercise 6 - Video Game Experiment;
options linesize=72;
data video;
input order day trt Y;
cards;
1 1 1 94
1 2 3 100
1 3 4 98
1 4 2 101
1 5 5 112
2 1 3 103
2 2 2 111
2 3 1 51
2 4 5 110
2 5 4 90
3 1 4 114
3 2 1 75
3 3 5 94
3 4 3 85
3 5 2 107
4 1 5 100
4 2 4 74
4 3 2 70
4 4 1 93
4 5 3 106
5 1 2 106
5 2 5 95
5 3 3 81
5 4 4 90
5 5 1 73
;
proc glm;
classes order day trt;
model Y = order day trt / solution;
output out=resids predicted =pred residual=Z;
estimate music trt 2 2 2 -3 -3 /divisor = 6;
estimate game sound trt 1 1 1 1 -4 /divisor=4;
lsmeans trt / pdiff=all cl adjust=scheffe;
proc standard std=1.0;
var Z;
proc rank normal=blom;
var Z;
ranks nscore;
proc plot;
plot Z*pred Z*trt Z*order Z*day / vref=0 vpos=19 hpos=50;
plot Z*nscore / vref=0 href=0 vpos=19 hpos=50;
*second run;
8
data video2;
input day dhat @@;
lines;
1 5.8 2 -6.6 3 -18.8 4 -1.8 5 0
;
proc means mean;
var dhat;
data video3;
input order ohat @@;
lines;
1 12 2 4 3 6 4 -.4 5 0
;
proc means mean;
var ohat
*third run;
data video4;
set video;
if day=1 then yadj=Y-(5.8+4.28);
else if day=2 then yadj=Y-(-6.6+4.28);
else if day=3 then yadj=Y-(-18.8+4.28);
else if day=4 then yadj=Y-(-1.8+4.28);
else if day=5 then yadj=Y-(0+4.28);
if order=1 then yadj=yadj-(12-4.32);
else if order=2 then yadj=yadj-(4-4.32);
else if order=3 then yadj=yadj-(6-4.32);
else if order=4 then yadj=yadj-(-.4-4.32);
else if order=5 then yadj=yadj-(0-4.32);
proc plot;
plot yadj*trt / vpos=19 hpos=50;
9
Solution to Question 12.10, Quantity Perception Experiment
a) The subjects in this study may possibly be representative of the students from The Ohio State
University. However, we should be cautious about this conclusion since only those students who frequent
the Ohio Union had the opportunity to take part in the study. There may be slection bias on the part of
the experimenters in recruiting the students (e.g. recruiting studernts who look friendly and unhurried).
Presumably, no student was allowed to return for a second attempt and, since students were not allowed
to view the experiment in progress with a previous subject, they did not have the chance to remember
the true number of candies in advance.
The conclusions of the study may not be relevant to people in general since the students who are from
the Ohio Union hallway are likely to be dierent from the general population in the country because of
the dierence in average age, education, etc.
b) The following plots are residual plots for the model shown in part (c) with Y being (true number
- guessed number)/(true number). The residuals are approximately normally distributed and have ap-
proximately the same variance for each treatment apart from two two outliers from treatment 2 (subjects
3 and 14) whose standardized residuals are around 4.
The SAS System
3
Plot of Z*TRTMT. Legend: A = 1 obs, B = 2 obs, etc.
5 +
| A
|
|
Z |
|A B
|A B A B A
| C A C A C A C D
|D C E E B D E A D
0 +F-----D-----B-----------H-----------F-----J-------
|D C E E B D E A D
| C A C A C A C D
|A B A B A
|A B
|
|
|
| A
-5 +
-+-----+-----+-----+-----+-----+-----+-----+-----+-
1 2 3 4 5 6 7 8 9
TRTMT
10
Plot of Z*SUBJ. Legend: A = 1 obs, B = 2 obs, etc.
5 +
| A
|
|
Z |
| A A A
| A A A A A A A
| A A C B B A A B B B A A
| A B B A B E A A B C C A A A B C B
0 +---D-A---B-B-A-D-A-C-A-A-A-C-C-B-B-C-B------------
| B C C A A B A C C B A C A A B B B
| A B B B B A A B A B B A
| A A A A A A A
| A B
|
|
|
| A
-5 +
--+---------+---------+---------+---------+--------
0 5 10 15 20
SUBJ
If we remove the two outliers, the residual plots look much better:
Plot of Z*TRTMT. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
|
| A
2 +A A A A B
|A B A A A A D
|A B C D B C A B C
|E C C C C C C B B
0 +B-----B-----B-----B-----D-----------H-----H-------
|E C C C C C C B B
|A B C D B C A B C
|A B A A A A D
-2 +A A A A B
| A
|
|
-4 +
|
-+-----+-----+-----+-----+-----+-----+-----+-----+-
1 2 3 4 5 6 7 8 9
TRTMT
11
Plot of Z*SUBJ. Legend: A = 1 obs, B = 2 obs, etc.
Z |
4 +
|
|
| A
2 + A A A A A A
| A A A B A B A A A
| A A B B B B B B B A A B A
| B B B B A A B B A B B B B A C
0 +---A-A-B-C-A-B-B---B-A-C-A-B---A-B-B-B------------
| B C A C A C A C B A A A B B A
| A B A A B A B C C A B B
| A A A B A A A A A A
-2 + A A A A A A
| A
|
|
-4 +
|
--+---------+---------+---------+---------+--------
0 5 10 15 20
SUBJ
Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.
Z | |
4 + |
| |
| |
| | A
2 + | ABAAA
| | AECB
| | CGGD
| |BJIF
0 +-----------------------IJI------------------------
| FIJB|
| DGGC |
| BCEA |
-2 + AAABA |
| A |
| |
| |
-4 + |
| |
-+-----------+-----------+-----------+-----------+-
-4 -2 0 2 4
Rank for Variable Z
12
c) The model for the experiment is the row-column-treatment model for the 2-replicate Latin square
design:
Y
hqi
= +
h
+
q
+
i
+ ()
qi
+
hqi
,
hqi
N(0,
2
),
hqi
s are mutually independent,
h = 1 . . . 18; q = 1 . . . 9; i = 1 . . . 9,
where is a constant,
h
is the eect of the hth row block (sublect),
q
is the eect of the qth column
block (time order),
i
is the eect of the ith treatment, ()
qi
is the eect of the interaction of the
qth time order and ith treatment, Y
hqi
is the random variable representing the (true number - guessed
number)/(true number) for treatment i observed for subject h and time order q, and
hqi
is the associated
random error.
The analysis of variance table obtained from SAS (after omitting the two outliers) is
The GLM Procedure
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
SUBJ 17 2.02359502 0.11903500 6.88 <.0001
ORDER 8 0.31489067 0.03936133 2.28 0.0330
TRTMT 8 1.09980189 0.13747524 7.95 <.0001
ORDER*TRTMT 63 1.38403721 0.02196884 1.27 0.1724
Error 63 1.08946693 0.01729313
Corrected Total 159 9.09581904
We choose overall signicant level = 0.04, and split it into divide it between four hypotheses tests.
i) H
intera
0
: no interaction between time order and treatment. We
reject H
intera
0
if msOT/msE > F
64,64,.01
= 1.8004.
Since msOT/msE = 0.0220/0.0173 = 1.27 < 1.8004, we fail to reject H
0
at signicant level = 0.01
and there is not sucient eveidence to conclude an interaction between column block factor (order) and
treatment.
ii) H
T
0
: all 9 treatments have the same efect on the response.
Reject H
T
0
if msT/msE > F
8,64,.01
= 2.8027.
From the SAS output above, msT/msE = 0.1375/0.0173 =7.95 > 2.8027, we reject H
0
at signicance
level = 0.01 and conclude that the combination of true number of candies and color do not all have
the same eect on the abilities of subjects to count them.
iii) We would now like to test H
0
: Quadratic trend of number equals zero and we would
Reject H
0
if ssC/msE > F
1,64,.01
= 7.0483.
Similarly, we would like to test H
0
: Linear trend of color equals zero and we would
Reject H
0
if ssC/msE > F
1,64,.01
= 7.0483. S
When the two outliers are removed, the usual coecients in the Appendix are no longer the correct
cooecents due to the unequal number of observations per treatment. We would need to calculate the
coecients specially for this situation. If we make all tests including the two outliers, we nd the same
conclusions as above and the linear trend due to number is signicantly dierent from zero at level 0.01.
13
Source DF Type III SS Mean Square F Value Pr > F
SUBJ 17 1.97988929 0.11646408 4.73 <.0001
ORDER 8 0.32674684 0.04084336 1.66 0.1261
TRTMT 8 1.09932801 0.13741600 5.58 <.0001
ORDER*TRTMT 64 1.54244613 0.02410072 0.98 0.5342
Error 64 1.57607923 0.02462624
Corrected Total 161 9.61972136
Contrast DF Contrast SS Mean Square F Value Pr > F
NUMBER LINEAR 1 0.90715809 0.90715809 36.84 <.0001
NUMBER QUADRATIC 1 0.06966527 0.06966527 2.83 0.0975
Although we are not testing whether the block eects equal zero or not, by comparing the mean
square of ORDER and SUBJECT with mean square error, we conclude that it was worthwhile to create the
two block factors in the model to reduce the experimental error.
d) The analysis of variance in terms of number and color is given below (excluding the two outliers).
The conclusions about the blocking factors remain the same. Using an overall signicance level of 0.06
(0.01 for each test), we conclude that there is no signicant interaction eect of ORDER by NUMBER
by COLOR. There is no NUMBER by COLOR interaction eect. The interaction eects of ORDER by
NUMBER and ORDER by COLOR are not signicant at individual levels 0.01. The dierent numbers
of candies do aect the subjects abilities to count them (consistent with the linear trend found above),
whereas the dierent colors have no eect.
The GLM Procedure
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
SUBJ 17 2.02359502 0.11903500 6.88 <.0001
ORDER 8 0.31712431 0.03964054 2.29 0.0319
NUMBER 2 0.94356973 0.47178487 27.28 <.0001
COLOR 2 0.03389871 0.01694935 0.98 0.3809
NUMBER*COLOR 4 0.08376415 0.02094104 1.21 0.3151
ORDER*NUMBER 16 0.45154695 0.02822168 1.63 0.0863
ORDER*COLOR 16 0.47166600 0.02947912 1.70 0.0689
ORDER*NUMBER*COLOR 31 0.46256507 0.01492145 0.86 0.6676
Error 63 1.08946693 0.01729313
Corrected Total 159 9.09581904
e) There are many possible answers to this question. One supplied by a student is as follows:
Although the hypothesis test says the color itself does not have dierent eects on the response, from
the standardized residual plot in part b), it seems that response from treatment 2, 5 and 8 seems have
larger variance than the others in general. Thus one possible followup experiment we might want to
study is that does Orange color especially inuence the guessed number of candies.
Checklist
i) Dene the objective of the experiment.
The experiment is to study the eects of orange and other silimar shades with green on the accuracy
of guessed number of candies for a certain true number of candies.
ii) Identify all sources of variation.
Timing of the experiment. We assume people do not concentrate well when they are hungry or in
hurry, thus we select mid-afternoon for the study. Subjects should not have previously participated in the
14
study, so we will select a location at the other end of the campus, but still frequented by many dierent
types of student. So we select the mall outside the bookstore and the central classroom building.
Subjects. As before, subjects should not be allowed to view the experiment in progress with previous
subjects in order to prevent them build up the knowledge of the true number of candies.
Treatment factors and levels. Since we want to focus the study on the eect of dierent colors, we still
have the two treatment factors as NUMBER and COLOR. But we will have only 2 levels of NUMBER
13 and 37, and 4 levels of COLOR as: yellow, brown, orange and green. Thus there are total 8 treatment
combinations.
Block factors. As before, we still have two block factors: subject and order. Since we have 8 treatment
combinations now. We will set 8 levels of order and 16 subjects.
iii) Still as before we will use 2-replicate Latin square design and assign the experimental unit to the
treatment combination as before.
15