Top Banner
1 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc Solutions to Stat 641 Homework Assignments Chapter 2 Exercise 2.1 - Specific to the student Exercise 2.3 - For experiment #2 complete steps a-c on the checklist a) Define the objectives of the experiment. It is believed that the boiling point of water may be affected by the concentration of salt in the water. The purpose of this experiment is to determine the extent to which the boiling point of water changes with varying levels of salt concentrations in the water. b) Identify all sources of variation. a. treatments - various concentrations of salt. Four (4) equally spaced concentration levels (C 1 , C 2 , C 3 , and C 4 ) will be used in the experiment. b. experimental units - Twenty (20) glass beakers containing constant, known volumes of distilled water will be made available for the study. c. blocking factors - days on which the experiment is executed could be considered as blocking factors due to differences in relative humidity and atmospheric pressure. These tests, however, will be executed in an environmentally controlled laboratory so blocking will not be necessary. c) Choose a rule by which to assign the experimental units to the levels of the treatment factors. a. A completely randomized design will be employed. Each of the 20 beakers will be randomly assigned a unique identification number between 1 and 20. A computer program has been used to generate a randomized sequence of the integers from 1 to 20, and the assignment of concentration levels to the experimental units is presented below. The experiment will be run in the original order of experimental unit numbers. CONC C1 C1 C1 C1 C1 C2 C2 C2 C2 C2 C3 C3 C3 C3 C3 C4 C4 C4 C4 C4 EU 20 9 7 14 19 4 18 12 3 2 16 1 8 17 5 11 13 10 6 15 Run order 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
178
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Solutions

1 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Solutions to Stat 641 Homework Assignments

Chapter 2 Exercise 2.1 - Specific to the student Exercise 2.3 - For experiment #2 complete steps a-c on the checklist

a) Define the objectives of the experiment. It is believed that the boiling point of water may be affected by the concentration of salt in the water. The purpose of this experiment is to determine the extent to which the boiling point of water changes with varying levels of salt concentrations in the water.

b) Identify all sources of variation.

a. treatments - various concentrations of salt. Four (4) equally spaced concentration levels (C1 , C2, C3, and C4) will be used in the experiment.

b. experimental units - Twenty (20) glass beakers containing constant, known volumes of distilled water will be made available for the study.

c. blocking factors - days on which the experiment is executed could be considered as blocking factors due to differences in relative humidity and atmospheric pressure. These tests, however, will be executed in an environmentally controlled laboratory so blocking will not be necessary.

c) Choose a rule by which to assign the experimental units to the levels of the treatment

factors. a. A completely randomized design will be employed. Each of the 20 beakers will

be randomly assigned a unique identification number between 1 and 20. A computer program has been used to generate a randomized sequence of the integers from 1 to 20, and the assignment of concentration levels to the experimental units is presented below. The experiment will be run in the original order of experimental unit numbers.

CONC C1 C1 C1 C1 C1 C2 C2 C2 C2 C2 C3 C3 C3 C3 C3 C4 C4 C4 C4 C4 EU 20 9 7 14 19 4 18 12 3 2 16 1 8 17 5 11 13 10 6 15

Run order

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Page 2: Solutions

2 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Exercise 2.7 - For experiment #8 write down all the possible sources of variation.

a) course (confounding effects like professor and time of day) b) class topic (English, history, mathematics, statistics, etc) c) Students d) length of exam e) type of exam - multiple choice, written, true false, problem solving, etc f) color of exam paper g) unknown h) unexplainable, random effects

This design should probably be run as some type of block design. The blocking variables might be some combination of course, topic and length of the exam. Exercise 2.8 - For experiment #8 write down all the possible sources of variation

Page 3: Solutions

3 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Chapter 3 Exercise 3.3 TABLE 3.3.1 TREATMENT DEFINITION TREAMENT Row TREATMENT CODE A B C 1 1 111 1 1 1 2 2 112 1 1 2 3 3 113 1 1 3 4 4 121 1 2 1 5 5 122 1 2 2 6 6 123 1 2 3 7 7 131 1 3 1 8 8 132 1 3 2 9 9 133 1 3 3 10 10 211 2 1 1 11 11 212 2 1 2 12 12 213 2 1 3 13 13 221 2 2 1 14 14 222 2 2 2 15 15 223 2 2 3 16 16 231 2 3 1 17 17 232 2 3 2 18 18 233 2 3 3 TABLE 3.3.2 EXPERIMENTAL ASSIGNMENT AND RUN ORDER TREAMENT RUN Row TREATMENT CODE A B C EU ORDER 1 1 111 1 1 1 15 22 2 1 111 1 1 1 29 25 3 2 112 1 1 2 22 31 4 2 112 1 1 2 8 13 5 3 113 1 1 3 2 5 6 3 113 1 1 3 21 1 7 4 121 1 2 1 5 34 8 4 121 1 2 1 36 2 9 5 122 1 2 2 13 4 10 5 122 1 2 2 20 20 11 6 123 1 2 3 4 29 12 6 123 1 2 3 6 12 13 7 131 1 3 1 25 6 14 7 131 1 3 1 27 33 15 8 132 1 3 2 3 35 16 8 132 1 3 2 33 9 17 9 133 1 3 3 35 3 18 9 133 1 3 3 32 10 19 10 211 2 1 1 12 8 20 10 211 2 1 1 14 27 21 11 212 2 1 2 7 24 22 11 212 2 1 2 17 7 23 12 213 2 1 3 31 23 24 12 213 2 1 3 30 36 25 13 221 2 2 1 19 11 26 13 221 2 2 1 11 18 27 14 222 2 2 2 34 32 28 14 222 2 2 2 10 16 29 15 223 2 2 3 23 17 30 15 223 2 2 3 9 19 31 16 231 2 3 1 28 15 32 16 231 2 3 1 1 14 33 17 232 2 3 2 26 26 34 17 232 2 3 2 18 21 35 18 233 2 3 3 16 28 36 18 233 2 3 3 24 30

Page 4: Solutions

4 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Exercise 3.14 - Pedestrian light experiment

PUSHES

TIM

E

3.02.52.01.51.00.50.0

38.4

38.3

38.2

38.1

38.0

37.9

Scatterplot of TIME vs PUSHES

a) This plot indicates that there is no evidence that the number of pushes affects the waiting time.

b) ANOVA table. We fail to reject the hypothesis that there is no effect of pushes on wait

time. ( p-value > .05) 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

c) Estimates of the mean waiting time and standard deviation by number of pushes.

Page 5: Solutions

5 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Data Display Mean Wait Sample Row Time StDev Size 1 38.2071 0.068243 7 2 38.1710 0.116089 10 3 38.1940 0.099577 10 4 38.2120 0.129885 5

d) contrast estimate: 0148.0ˆ =θ e) 222 1873.)]5/1()10/1()10/1)[(9/(])7/1[()ˆ(Var σ=++σ+σ=θ So the variance for the

estimator of the contrast is approximately 1/5 the size of the variance associates with the random error terms in the model.

Page 6: Solutions

6 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Exercise 3.15 - Trout experiment

SULFAMERAZINE - gms

HEM

OGL

OBI

N(GM

S PE

R 1

00 M

L)

1614121086420

12

11

10

9

8

7

6

5

Scatterplot of HEMOGLOBIN(GMS PER 100 ML) vs SULFAMERAZINE - gms

a) There appears to be an effect on the hemoglobin response due to the level of sulfamerazine in the food. The variance of the unexplained variation around the mean appears to be comparable across all levels of sulfamerazine.

b) itititY ε+µ= with the usual assumptions on the error terms. c) Least squares estimates

Descriptive Statistics: HEMOGLOBIN SULFAMERAZINE N Mean StDev 0 10 7.200 1.019 5 10 9.330 1.717 10 10 9.030 1.135 15 10 8.690 1.000

The effect may be non-linear. It appears as though hemoglobin is significantly increased when any level of sulfamerzine is added to the food, but that the amount is increased the hemoglobin level may decrease.

d) The hypothesis of no effect of sulfamerazine on hemoglobin is rejected at the p < .003

level of significance.

Page 7: Solutions

7 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Sulfamerizine

Hem

oglo

bin

1614121086420

12

11

10

9

8

7

6

5

HEMOGLOBIN * SULFAMERAZINEMean1 * ByVar1

Variable

Scatterplot of HEMOGLOBIN vs SULFAMERAZINE with GROUP MEANS

One-way ANOVA: HEMOGLOBIN versus SULFAMERAZINE Source DF SS MS F P SULFAMERAZINE 3 26.80 8.93 5.70 0.003 Error 36 56.47 1.57 Total 39 83.27 S = 1.252 R-Sq = 32.19% R-Sq(adj) = 26.54% Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev ------+---------+---------+---------+--- 0 10 7.200 1.019 (-------*-------) 5 10 9.330 1.717 (-------*-------) 10 10 9.030 1.135 (-------*-------) 15 10 8.690 1.000 (-------*-------) ------+---------+---------+---------+--- 7.0 8.0 9.0 10.0 Pooled StDev = 1.252

e) .3.23/47.5642.2isforboundconfidence%95aso,5647SSE,3.23 22

95,.36 =σ==χ

Page 8: Solutions

8 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Exercise 3.17 - Soap experiment Power and Sample Size One-way ANOVA Alpha = 0.05 Assumed standard deviation = 0.2828 Number of Levels = 3 Sample Maximum SS Means Size Power Difference 0.03125 4 0.144533 0.25 The sample size is for each level.

Exercise 3.18 - Soap experiment Power and Sample Size One-way ANOVA Alpha = 0.05 Assumed standard deviation = 0.03 Number of Levels = 3 Sample Target Maximum SS Means Size Power Actual Power Difference 0.00005 342 0.98 0.980229 0.01 Exercise 3.19 - Soap experiment Power and Sample Size One-way ANOVA Alpha = 0.05 Assumed standard deviation = 3 Number of Levels = 5 Sample Target Maximum SS Means Size Power Actual Power Difference 10.125 15 0.9 0.907403 4.5 The sample size is for each level.

Page 9: Solutions

9 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Exercise 4.3 - Pedestrian experiment

1) contrast estimate: 0148.0ˆ =θ 2) 222 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

Page 10: Solutions

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

Page 11: Solutions

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

Residual

Per

cent

0.20.10.0-0.1-0.2

99

90

50

10

1

Fitted Value

Res

idua

l

38.2138.2038.1938.1838.17

0.2

0.1

0.0

-0.1

-0.2

Residual

Freq

uenc

y

0.150.100.050.00-0.05-0.10-0.15-0.20

8

6

4

2

0

Observation Order

Res

idua

l

3230282624222018161412108642

0.2

0.1

0.0

-0.1

-0.2

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for TIME

There is no evidence of model inadequacy.

Page 12: Solutions

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

Residual

Per

cent

0.040.020.00-0.02-0.04

99

90

50

10

1

Fitted Value

Res

idua

l

0.260.240.220.200.18

0.02

0.01

0.00

-0.01

-0.02

Residual

Freq

uenc

y

0.020.010.00-0.01-0.02

8

6

4

2

0

Observation Order

Res

idua

l

18161412108642

0.02

0.01

0.00

-0.01

-0.02

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for REACTION TIME

Page 13: Solutions

13 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

ORDER

Res

idua

l

20151050

0.03

0.02

0.01

0.00

-0.01

-0.02

-0.03

Residuals Versus ORDER(response is REACTION TIME)

Page 14: Solutions

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

2ijt

ijtjiijt

r...,,2,1tb...,,2,1ja...,,2,1i

tindependenmutuallyares'

),0(N~

Y

===

ε

σε

ε+β+α+µ=

The two-way complete model is given by

ij

ijt

2ijt

ijtijjiijt

r...,,2,1tb...,,2,1ja...,,2,1i

tindependenmutuallyares'

),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.

Page 15: Solutions

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

2ijt

ijtijijt

r...,,2,1tb...,,2,1ja...,,2,1i

tindependenmutuallyares'

),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.

Page 16: Solutions

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

shij τ−τ

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 shij τ−τ , the formulae are

2MSE2

2q

yy 01,.15,155.sh.ij ±−

The interval for 1513 τ−τ is

)695.22,695.9(933.102

927.6500.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/18/12/1(t2/][ 005,.15.2.1.3 ++±τ+τ−τ

9.10x75.95.22/]3.110.18[5.17 ±+−

43.865.145.17 ±−

43.885.2 ±

(-5.58,11.28)

Page 17: Solutions

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.19547.8/1642 =<σ 6.7(e) - The formula for the confidence intervals for pairwise comparisons is

rMSE2

2q

yy 01,.15,155.sh.ij ±−

so we need

4r

MSEq 01),.1r(15,15 <−

The upper bound for σ2 is 19.188 which use for MSE so we need

r0834.)q(or4r188.19q 2

01),.1r(15,1501),.1r(15,15 << −−

We need to solve for r which we must do in an iterative fashion.

r 15(r-1) 201),.1r(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.

Page 18: Solutions

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.

Page 19: Solutions

19 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Residual

Per

cent

5.02.50.0-2.5-5.0

99

90

50

10

1

Fitted Value

Res

idua

l

302010

5.0

2.5

0.0

-2.5

-5.0

Residual

Freq

uenc

y

420-2-4

6.0

4.5

3.0

1.5

0.0

Observation Order

Res

idua

l

30282624222018161412108642

5.0

2.5

0.0

-2.5

-5.0

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for STRNTH

Mea

n of

STR

NTH

321

22

20

18

16

14

12

1054321

GAGE TIME

Main Effects for Weld Strength

Page 20: Solutions

20 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

TIME

Mea

n

54321

35

30

25

20

15

10

123

GAGE

Interaction Chart for Weld Strength

Page 21: Solutions

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

r1501),.1r(12,12

q−

so r must be selected so that

5r

15q 01),.1r(12,12 <−

or

201),.1r(12,12

201),.1r(12,12

)q(6.ror

25r

15)q(

>

<

r 12(r-1) 201),.1r(12,12 )q( − 2

01),.1r(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.

Page 22: Solutions

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%

Page 23: Solutions

23 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Residual

Per

cent

0.40.20.0-0.2-0.4

99

90

50

10

1

Fitted Value

Res

idua

l

0.80.60.40.2

0.4

0.2

0.0

-0.2

-0.4

Residual

Freq

uenc

y

0.40.30.20.10.0-0.1-0.2-0.3

24

18

12

6

0

Observation Order

Res

idua

l

454035302520151051

0.4

0.2

0.0

-0.2

-0.4

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for TIME

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%

Page 24: Solutions

24 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

Residual

Per

cent

1.00.50.0-0.5-1.0

99

90

50

10

1

Fitted Value

Res

idua

l

54321

1.0

0.5

0.0

-0.5

-1.0

Residual

Freq

uenc

y

1.000.750.500.250.00-0.25-0.50-0.75

16

12

8

4

0

Observation Order

Res

idua

l

454035302520151051

1.0

0.5

0.0

-0.5

-1.0

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for 1/TIME

MTB > Interact 'POISON' 'TRTMT'; SUBC> Response 'TIME' '1/TIME'.

TRTMT

Mea

n

4321

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

123

POISON

Interaction Plot (data means) for TIME

Page 25: Solutions

25 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap1-6.doc

TRTMT

Mea

n

4321

5

4

3

2

1

123

POISON

Interaction Plot (data means) for 1/TIME

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.

Page 26: Solutions

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

ABS

OR

BANC

Y

2.32.22.12.01.91.8

0.8

0.7

0.6

0.5

0.4

0.3

0.2

Scatterplot of ABSORBANCY vs DROP RATE

DROP RATE

ABS

OR

BANC

Y

2.32.22.12.01.91.8

0.8

0.7

0.6

0.5

0.4

0.3

0.2

123456

TRTMT

Scatterplot of ABSORBANCY vs DROP RATE

Page 27: Solutions

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.

Residual

Per

cent

0.100.050.00-0.05-0.10

99

90

50

10

1

Fitted Value

Res

idua

l

0.70.60.50.40.3

0.10

0.05

0.00

-0.05

-0.10

Residual

Freq

uenc

y

0.0750.0500.0250.000-0.025-0.050-0.075

3

2

1

0

Observation Order

Res

idua

l

121110987654321

0.10

0.05

0.00

-0.05

-0.10

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for ABSORBANCY

Page 28: Solutions

3 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc

RUN

Res

idua

l

121086420

0.10

0.05

0.00

-0.05

-0.10

Residuals Versus RUN(response is ABSORBANCY)

DROP RATE

Res

idua

l

2.32.22.12.01.91.8

0.10

0.05

0.00

-0.05

-0.10

Residuals Versus DROP RATE(response is ABSORBANCY)

Page 29: Solutions

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.

Residual

Per

cent

0.100.050.00-0.05-0.10

99

90

50

10

1

Fitted Value

Res

idua

l

0.70.60.50.40.3

0.10

0.05

0.00

-0.05

-0.10

Residual

Freq

uenc

y

0.0750.0500.0250.000-0.025-0.050-0.075

3

2

1

0

Observation Order

Res

idua

l

121110987654321

0.10

0.05

0.00

-0.05

-0.10

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for ABSORBANCY

Page 30: Solutions

5 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc

RUN

Res

idua

l

121086420

0.10

0.05

0.00

-0.05

-0.10

Residuals Versus RUN(response is ABSORBANCY)

DROP RATE

Res

idua

l

2.32.22.12.01.91.8

0.10

0.05

0.00

-0.05

-0.10

Residuals Versus DROP RATE(response is ABSORBANCY)

Page 31: Solutions

6 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Solutions\Bishop Solutions\Solutions to Stat 641 Homework Assignmentschap9.doc

Mea

n of

ABS

OR

BANC

Y

BRAND-3BRAND-2BRAND-1

0.60

0.55

0.50

0.45

0.40

0.35

0.30WHITEPRINTED

BRAND PATTERN

Main Effects Plot (fitted means) for ABSORBANCY

PATTERN

Mea

n

WHITEPRINTED

0.7

0.6

0.5

0.4

0.3

0.2

BRAND-1BRAND-2BRAND-3

BRAND

Interaction Plot (fitted means) for ABSORBANCY

Page 32: Solutions

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 24 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 24-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.

Page 33: Solutions

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%

Residual

Per

cent

1.00.50.0-0.5-1.0

99

90

50

10

1

Fitted Value

Res

idua

l

8078767472

0.8

0.4

0.0

-0.4

-0.8

Residual

Freq

uenc

y

0.80.40.0-0.4-0.8

4

3

2

1

0

Observation Order

Res

idua

l

16151413121110987654321

0.8

0.4

0.0

-0.4

-0.8

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for RESPONSE - Y

Page 34: Solutions

3 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc

Mea

n of

RES

PONS

E -

Y

1-1

77

76

75

74

73

1-1

1-1

77

76

75

74

73

1-1

A B

C D

Main Effects Plot (fitted means) for RESPONSE - Y

A

C

D

B

1-1 1-1 1-1

78

75

7278

75

7278

75

72

-11

A

-11

B

-11

C

Interaction Plot (fitted means) for RESPONSE - Y

Page 35: Solutions

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 = *

Page 36: Solutions

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%

Page 37: Solutions

6 C:\OSU\Courses\Stat 641 - DOE\Homework Assignments\Fractional Factorial HW.doc

Residual

Per

cent

1.00.50.0-0.5-1.0

99

90

50

10

1

Fitted Value

Res

idua

l

78.076.575.073.572.0

0.50

0.25

0.00

-0.25

-0.50

Residual

Freq

uenc

y

0.40.20.0-0.2-0.4

4

3

2

1

0

Observation Order

Res

idua

l87654321

0.50

0.25

0.00

-0.25

-0.50

Normal Probability Plot of the Residuals Residuals Versus the Fitted Values

Histogram of the Residuals Residuals Versus the Order of the Data

Residual Plots for RESPONSE - Y

Mea

n of

RES

PONS

E -

Y

1-1

77

76

75

74

73

1-1

1-1

77

76

75

74

73

1-1

A B

C D

Main Effects Plot (fitted means) for RESPONSE - Y

Page 38: Solutions

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.

Page 39: Solutions

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

Page 40: Solutions

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

Page 41: Solutions

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.

Page 42: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 612 February 2003

Solutions available in this file

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

Page 43: Solutions

Solution to Question 6.2

Verify that (τij − τ i. − τ .j + τ ..) is an interaction contrast for the two-way complete model. Writedown the list of contrast coefficients 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 coefficients for the contrast

τ11 − τ1. − τ .1 + τ ..

= τ11 − 1b

∑bj=1 τ1j − 1

a

∑aj=1 τi1 − 1

ab

∑ai=1

∑bj=1 τij

withNow let a = 3 and b = 4. The, the coefficients must be as in the following table.

τij term 1 term 2 term 3 term4 Totalτ11 1 1

413

112

2012

τ1214

112

412

τ1314

112

412

τ1414

112

412

τ2113

112

412

τ22112

112

τ23112

112

τ24112

112

τ3113

112

512

τ32112

112

τ33112

112

τ34112

112

2

Page 44: Solutions

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 differencein the effects of the treatment combinations on weld strength against the alternative hypothesis thatat least two treatment combinations have different effects.

The analysis of variance for the cell means model is as follows:

General Linear Models ProcedureDependent Variable: STRNTH

Source DF Sum of Squares F Value Pr > FModel 14 1261.20000000 8.24 0.0001Error 15 164.00000000Corrected Total 29 1425.20000000

Source DF Type III SS F Value Pr > FTC 14 1261.20000000 8.24 0.0001

Since the p-value is less than 0.0001, for most reasonable choices of significance level, we wouldreject the hypothesis of no effect of the treatment combinations and conclude that the differentcombinations of gage bar setting and time of welding do have different effects on the strength ofthe weld.

b) Suppose the experimenters had planned to calculate confidence intervals for all pairwise com-parisons between the treatment combinations, and also to look at the confidence interval for thedifference between gage bar setting 3 and the average of the other two. Show what these contrastslook like in terms of the parameters τij of the cell-means model, and suggest a strategy for calculatingall intervals at overall level “at least 98%.”

In terms of the parameters τij of the cell means model, the pairwise comparisons of interest are ofthe form τij − τsh which has coefficient 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 coefficient list

[−0.5− 0.5.......− 0.51.0.......1.0]

where there are 10 occurrences of -0.5 and five occurrences of 1.0

There are several possible strategies for intervals. The most sensible is probably to use Tukey’smethod at level 99% for the pairwise comparisons, and a t interval at level 99% for the differenceof 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 difference in the true mean strengths at the 3rd and 5th times of welding for the first gage barsetting). Explain what this interval tells you.

For the Tukey 99% simulataneous intervals for τij − τsh, the formulae are

yij. − ysh ± q15,15,.01√2

√22msE .

3

Page 45: Solutions

The interval for τ13 − τ15 from SAS is

6.500± (6.927/√

2)×√

10.9333 = (−9.695, 22.695) .

This interval tells us that, with overall 98% confidence, the difference in weld strength between thethird and fifth time of welding for the first gage bar setting is somewhere between -9.695 and 22.695units.

The interval for τ3. − [τ1. + τ2.]/2, is

y3.. − (y1.. + y1..)/2 ± t15,.005

√(12

+18

+18

)msE

=

d) Calculate an upper 90% confidence limit for σ2.

The analysis of variance table gives ssE = 164.0. The chi-squared value with 15 degrees of freedomand prob .9 in the right hand tail is 8.547.

Using formula (3.4.10), we have a 90% confidence 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 treatmentcombination? How many observations is this in total?

The formula for the confidence intervals for pairwise comparisons in b) is

(yij. − ysh.)± q15,15r−15,.01/√

2 ∗√

msE (2/r)

So we needq15,15r−15,.01

√msE/r ≤ 4

using the upper bound for σ2 of 19.188 in place of msE, we need

q15,15r−15,.01

√19.188/r ≤ 4

that isq215,15r−15,.01 ≤ 0.834r

We now need to solve for r .

r 15(r − 1) q215,1(5r−1),0.01 0.834r Action

7 90 5.72 = 32.49 5.84 Increase r20 285 5.452 = 29.7 16.68 Increase r25 360 5.452 = 29.7 20.85 Increase r35 510 5.452 = 29.7 29.19 Increase r36 525 5.452 = 29.7 30.02

r = 36 is about right which requires 540 observations in total. If you use msE=10.9333, you willrequire fewer observations. But you need to justify why you think the msE would be about thesame value in the next experiment.

4

Page 46: Solutions

Solution to Question 6.8— weld strength

a) Test the hypothesis of no interaction between gage bar setting and time of weld and state yourconclusion.

The analysis of variance table for the two-way complete model is as follows:

General Linear Models ProcedureDependent Variable: STRNTH

Source DF Sum of Squares F Value Pr > FModel 14 1261.20000000 8.24 0.0001Error 15 164.00000000Corrected Total 29 1425.20000000

Source DF Type III SS F Value Pr > FGAGE 2 278.60000000 12.74 0.0006TIME 4 385.53333333 8.82 0.0007GAGE*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 testat level 0.02. Since the p-value for the test of no interaction is less than 0.02, we reject the hypothesisof negligible interaction and conclude that the effects on the weld strength between differnt gage barsettings are not the same at the different times of weld.

b) Draw an interaction plot for the two factors Gage bar setting and Time of welding. Does yourinteraction 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 interactionof gage bar setting with time 3, in particular is quite different. This agrees with the hypothesis test thatthere 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

TIMENOTE: 1 obs hidden.

5

Page 47: Solutions

c) In view of your answer to part (b), is it sensible to investigate the differences between the effectsof gage bar setting? Why or why not? Indicate on your plot what would be compared.

The differences between gage bar settings are comparisons of averages (averaging over the levelsof time, and hence over the interaction). This is probably not of interest since the time of weld canpresumably be set in the industrial process.

d) Regardless of your answer to (c), suppose the experimenters had decided to look at the linear trendin the effect 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 asum of squares

(y3.. − y1..)2/(2/10) = (11.3− 17.5)2/(2/10) = 192.2

General Linear Models ProcedureDependent Variable: STRNTH

Contrast DF Contrast SS F Value Pr > FLIN GAGE 1 192.20000000 17.58 0.0008

The p-value is 0.0008, so for most choices of type I error probability (significance level) the hypothesisof no linear trend would be rejected. (Notice that the hypothesis test gives no indication of direction oftrend, since the alternative hypothesis is two-sided.)

6

Page 48: Solutions

Solution to Question 6.15 — ink experiment

a) Obvious difficulties 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 difficulties in analysing the experiment include:

• The possibility of non-constant variance due to inaccurate reading of the scale and differentpropoerties of the cloth.

• The possibility of non-normal data due to a discrete scale and difficulties reading it.

—Ways to reduce the difficulties in reading the scale is to have the same person do all the readingand have him/her have plenty of practice and training beforehand.

—Controlling water temperature in the washing machine is difficult 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 wouldbe needed.

—Non-constant variance would need a transformation or Satterthwaite’s method. Non-normal datawith 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 thesame wash and some in different, the error variability will no tbe constant. if all pieces of clothare washed together then the natrual variability that occurs between washes will not be seen in theexperiment.

c) Plot of Y*CLOTH. Symbol is value of METHOD.Y ||

11 + 110 +9 +1 18 +1 27 +6 +2 25 +24 + 13 + 12 +1 + 2,2|-+-----------------------+-----------------------+-1 2 3

CLOTH

7

Page 49: Solutions

Plot of Y*METHOD. Symbol is value of CLOTH.

Y |||||||

11 + 210 +9 + 1,28 + 1 27 +6 + 1,25 + 14 + 33 + 32 +1 + 3,3|--+--------------------------------+---------------1 2

METHOD

If points for corresponding treatment levels are joined up on the two plots, the lines are remarkablyparallel. This suggests that the two-way main effects model would be suitable for this experiment.

Since the stain remover is presumably designed to work on the stain itself rather than to interactwith the cloth, perhaps this could have been anticipated.

d) The GLM ProcedureDependent Variable: Y

Sum ofSource 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 sigma2 is

σ2 ≤ ssE

χ28,.9

=5.6663.49

= 1.624.

For pairwise differences, we require that each interval in a set of simultaneous 95% confidenceintervals (for each factor separately), using Tukey’s method, satisfies msd ≤ 1. For the two-waymain effects model, the error degrees of freedom are df = n− a− b + 1 = 6r − 3− 2 + 1 = 6r − 4.

So, for A, we requireqa,6r−4,.05√

2

√2rb

(1.624) ≤ 1

that is, q23,6r−4,.05 ≤ 1.2315r.

8

Page 50: Solutions

r 6r − 4 q23,6r−4,.05 1.2315r Action

10 56 3.42 = 11.56 12,31 Decrease r8 44 3.442 = 11.83 9.85 Increase r7 38 3.422 = 11.70 11.08 Increase r

Taking r = 10 observations on each of the six treatment combinations is likely produce confidenceintervals of the required length.

Now we need to do a similar calculations for the single interval for B. So, for B, we require

t6r−4,.05√2

√2ar

(1.624) ≤ 1

that is, t26r−4,.05 ≤ 0.9236r. If we take r = 10 observations per treatment combination, then

t256,.05 = 1.6732 = 2.799 which is less than 0.9236r = 9.236

so r = 10 observations is plenty to satisfy both requirements.

9

Page 51: Solutions

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 definitely violated, with variance increasing for large yhats. Thereis 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

Page 52: Solutions

Independence cannot be checked since we don’t 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

Page 53: Solutions

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 satisfied now. The two residual vs factor plotsdo not show any obvious differences in variance between factor levels.

Obs TC AVTY VTY1 11 2.48688 0.246672 12 1.16346 0.039803 13 1.86272 0.239494 14 1.68968 0.133025 21 3.26847 0.676226 22 1.39339 0.306027 23 2.71392 0.174328 24 1.70153 0.492679 31 4.80269 0.2805110 32 3.02897 0.1776111 33 4.26499 0.0551412 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. Sothe transformation has not worked completely. The original ratio of variances was 0.1131/0.0007 !!

With the transformed data Normality appears approximately satisfied as the Normal Prob. plotlooks fairly straight. (see next plot) Independence cannot be checked since we don’t have the observationorders.

12

Page 54: Solutions

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 PLOTSFor 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

POISONNOTE: 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 islowest for poison 3.

13

Page 55: Solutions

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.311 1 0.451 1 0.461 1 0.431 2 0.821 2 1.101 2 0.881 2 0.721 3 0.431 3 0.451 3 0.631 3 0.761 4 0.451 4 0.711 4 0.66

14

Page 56: Solutions

1 4 0.622 1 0.362 1 0.292 1 0.402 1 0.232 2 0.922 2 0.612 2 0.492 2 1.242 3 0.442 3 0.352 3 0.312 3 0.402 4 0.562 4 1.022 4 0.712 4 0.383 1 0.223 1 0.213 1 0.183 1 0.233 2 0.303 2 0.373 2 0.383 2 0.293 3 0.233 3 0.253 3 0.243 3 0.223 4 0.303 4 0.363 4 0.313 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

Page 57: Solutions

*******************************************************

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

Page 58: Solutions

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

Page 59: Solutions

Solution to Question 6.17 — estimability

a) For the two-way main effects model, all combinations of µ + αi + βj are estimable; that is, allfunctions of the form ΣiΣjdij(µ + αi + βj).

(i) Setting d12 = 1 and all other dij = 0 gives the required function, so it is estimable.(ii) Setting d11 = d12 = 0.5 and all other dij = 0 gives the required function, so it is estimable.(iii) There is no way to choose the dij 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..] =13r

E[Yi11 + . . . + Yi1r + Yi21 + . . . + Yi2r + Yi31 + . . . + Yi3r]

=13r

[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 randomvariables (otherwsie we have to worry about covariances between terms).

Y i.. + Y .j. − Y ... = [Yi11 + Yi12 + . . . + Yibr]/br

+ [Y1j1 + Y1j2 + . . . + Yajr]/ar

− [Y111 + Y112 + . . . + Yabr]/abr

So , if we collect up the terms,

[Yij1 + Yij2 + . . . + Yijr] has multipliera + b− 1

abr

[Ysj1 + Ysj2 + . . . + Ysjr] has multiplierb− 1abr

for each s 6= i

[Yih1 + Yih2 + . . . + Yihr] has multipliera− 1abr

for each h 6= j

[Ysh1 + Ysh2 + . . . + Yshr] has multiplier−1abr

for each s 6= i andh 6= j

Since V ar[Yijt] = σ2, it follows that

V ar[Y i.. + Y .j. − Y ...]

= σ2r

((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(

1abr

)2

18

Page 60: Solutions

=σ2

a2b2r[(a + b− 1)2 + (a− 1)((b− 1)2

+ (a− 1)2(b− 1) + (a− 1)(b− 1)]

=σ2

a2b2r[(a + b− 1)2 + (a− 1)(b− 1)(a + b− 1)]

=σ2

a2b2r[(a + b− 1)(a + b− 1 + ab− a− b + 1)]

=σ2

a2b2r[(a + b− 1)(ab)] =

(a + b− 1)σ2

abr.

c) From part a),E[Y i..] = µ + αi + β. .

SoE[ΣciY i..] = Σciµ + Σciαi + Σciβ. ,

and since Σci = 0, it follows that E[ΣciY i..] = Σciαi.

19

Page 61: Solutions

Solution to Question 6.21— water boiling experiment

a) Check the assumptions on the two-way main-effects 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), salt2 teaspoons, order=13, y121 = 4. We can see the outlier in the normal prob plot also, which appearsreasonably like a straight line without the outlier. Similiarly there are no problems with independenceapart 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 confidence intervals for pairwise differences between the levels ofsalt, and calculate separately a 99% set of intervals for pairwise differences between the levels of burner.

Dependent Variable: TIMESum of Mean

Source DF Squares Square F Value Pr > FModel 6 117.333333 19.555556 41.47 0.0001Error 41 19.333333 0.471545Corrected Total 47 136.666667

Source DF Type III SS Mean Square F Value Pr > FBURNER 3 110.500000 36.833333 78.11 0.0001SALT 3 6.833333 2.277778 4.83 0.0057

With the outlier, the Tukey intervals at oveall confidence level 99% show all burners except 1 and 3 tobe different. The biggest difference is between burners 2 and 4 with burner 2 boiling the water between3.3208 and 5.179 minutes faster. We are unable to see any differences between the effects of the saltlevels:

20

Page 62: Solutions

The GLM ProcedureTukey’s Studentized Range (HSD) Test for TIME

NOTE: This test controls the type I experimentwise error rate.Alpha 0.01Error Degrees of Freedom 41Error Mean Square 0.471545Critical Value of Studentized Range 4.68765Minimum Significant Difference 0.9292

Comparisons significant at the 0.01 level are indicated by ***.

Difference SimultaneousBURNER Between 99% Confidence

Comparison Means Interval4 - 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.51261 - 2 2.5000 1.5708 3.4292 ***3 - 2 1.9167 0.9874 2.8459 ***

Tukey’s Studentized Range (HSD) Test for TIMENOTE: This test controls the type I experimentwise error rate.

Alpha 0.01Error Degrees of Freedom 41Error Mean Square 0.471545Critical Value of Studentized Range 4.68765Minimum Significant Difference 0.9292

Comparisons significant at the 0.01 level are indicated by ***.

Difference SimultaneousSALT Between 99% Confidence

Comparison Means Interval4 - 0 0.0833 -0.8459 1.01264 - 2 0.7500 -0.1792 1.67924 - 6 0.8333 -0.0959 1.76260 - 2 0.6667 -0.2626 1.59590 - 6 0.7500 -0.1792 1.67922 - 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. Doa similar test for a quadratic trend.

The tests for the hypotheses H0:{ no linear trend due to salt} and H0: {no quadratic trend due tosalt} have p-values 0.0982 and 0.6764 respectively. So the null hypotheses would not be rejected at mostusual choices of significance level.

The GLM ProcedureDependent Variable: TIME

Contrast DF Contrast SS Mean Square F Value Pr > FLIN SALT 1 1.35000000 1.35000000 2.86 0.0982QUAD SALT 1 0.08333333 0.08333333 0.18 0.6764

21

Page 63: Solutions

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

Page 64: Solutions

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 satisfied. here are a lot of ties in the datamaking it difficult to gauge accurately. The normality assumption is questionable, possibly due to theties. The plot of residuals against order of observation shows no patterns.

The analysis of variance given by SAS is:

Dependent Variable: TIMESum of Mean

Source DF Squares Square F Value Pr > FModel 6 118.147033 19.691172 60.78 0.0001Error 40 12.959350 0.323984Corrected Total 46 131.106383

Source DF Type III SS Mean Square F Value Pr > FBURNER 3 112.510347 37.503449 115.76 0.0001SALT 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 effect of burner andno effect of salt would both be rejected.

Least Squares Means for Effect BURNERDifference Simultaneous 99%

Between Confidence Interval fori j Means LSMean(i)-LSMean(j)

1 2 2.727642 1.937580 3.5177051 3 0.810976 0.020913 1.6010381 4 -1.522358 -2.312420 -0.7322952 3 -1.916667 -2.688137 -1.1451972 4 -4.250000 -5.021470 -3.4785303 4 -2.333333 -3.104803 -1.561863

23

Page 65: Solutions

Least Squares Means for Effect SALTDifference Simultaneous 99%

Between Confidence Interval fori j Means LSMean(i)-LSMean(j)1 2 0.439024 -0.351038 1.2290871 3 -0.083333 -0.854803 0.6881371 4 0.750000 -0.021470 1.5214702 3 -0.522358 -1.312420 0.2677052 4 0.310976 -0.479087 1.1010383 4 0.833333 0.061863 1.604803

We can see the Tukey 99% confidence intervals show all burners to be different and, again the largestdifference is between burners 2 and 4 with a similar difference as the analysis in b).

The 99% intervals for salt show small difference in time between salt levels 3 and 4.

The test for the trends in salt requires coefficients to be calculated since the levels no longer have thesame number of observations. The formula for the linear trend coefficients is given on Page 71 as

ci = ri(47xi − 118) where xi are the coded level 1, 2, 3, 4.These coefficients work out to be -852 -264 276 840.We can divide by 12 and use the coefficients -71 -22 23 70.(Notice these are just a little different from the equally spaced level coefficients of -3 -1 1 3.)

The GLM ProcedureDependent Variable: TIMEContrast DF Contrast SS Mean Square F Value Pr > FLIN 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 wouldnow be significant if an individual significance level of over 0.023 had been selected. Otherwise, theresults are surprisingly close. Here the experimenter truely believed the observation was incorrect. Inthis 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

Page 66: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 323 August 2006

Solutions available in this file

c©2006 Angela Dean. All rights reserved. No part of this work may be displayed on the webwithout 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

Page 67: Solutions

Solution to Question 3.2Suppose that you are planning to run an experiment with one treatment factor having three levels

and no blocking factor. It has been determined that r1 = 3, r2 = r3 = 5. Assign at random 13experimental units to the v = 3 treatments so that the first treatment is assigned 3 units and theother 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 and3 each listed 5 times are given below. Alternatively, one can assign the random numbers by handusing 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 ranno1 2 0.173432 3 0.267743 2 0.394784 2 0.434555 3 0.525646 2 0.603827 3 0.729048 1 0.771789 3 0.7947210 2 0.8052111 3 0.9007812 1 0.9135513 1 0.99821

We then assign the experimental units in order to the randomly ordered list of treatments. Sincethis is a random ordering, no two solutions are likely to be identical.

2

Page 68: Solutions

Solution to Question 3.3 — RandomizationSuppose that you are planning to run an experiment with three treatment factors, where the first

factor has two levels and the other factors have three levels each. Write out the coded form of the18 treatment combinations. Assign 36 experimental units at random to the treatment combinationsso 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 133211 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 RANNO1 121 0.002472 113 0.051343 212 0.059634 122 0.080125 222 0.082046 113 0.11382: : :: : :33 231 0.8878434 131 0.9280435 131 0.9663036 223 0.98881

We then assign the experimental units in order to the randomly ordered list of treatments. Sincethis is a random ordering, no two solutions are likely to be identical.

3

Page 69: Solutions

Solution to Question 3.4 — Estimation

For the one-way analysis of variance model (3.3.1), page 36, the solution to the normal equationsused by the SAS software is τi = yi. − yv. (i = 1, . . . , v) and µ = yv..

(a) Is τi estimable? Explain.

τi is not estimable since it cannot be written in the form Σvi=1bi(µ + τi). Any choice of the bi

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 theabove solution. Is τ1 − τ2 estimable? Explain.

The above solution gives least squares estimate of τ1−τ2 as y1.−y2., so the least squares estimatorof τ1 − τ2 is Y 1. − Y 2. and

E[Y i.

]= E

[1ri

ri∑t=1

Yit

]

=1ri

ri∑t=1

(µ + τi)

= µ + τi

So,E

[Y 1. − Y 2.

]= (µ + τ1)− (µ + τ2) = τ1 − τ2 ,

so τ1 − τ2 estimable.

Solution to Question 3.5 — EstimationConsider 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 Σciτi with Σici = 0, since c1 = c2 = 1, c3 = −2and all other ci zero. This is a contrast. All contrasts are estimable (page 37). The least squaresestimator of τ1 + τ2 − 2τ3 is given by Y1. + Y2. − 2Y3..

(b) Yes, µ + τ3 is estimable. It has the form∑

i bi(µ + ti) with b3 = 1 and b1 = b2 = 0. Theleast squares estimator of µ + τ3 is given by Y3..

(c) No, τ1 − τ2 − τ3 is not estimable. it cannot be written as Σbi(µ + τi) for any selection ofconstants bi. In order to have

∑ciτi estimable, we need

∑ci = 0.

(d) Yes, µ+(τ1 + τ2 + τ3)/3 is estimable. It has the form∑

i bi(µ+ ti) with b1 = b2 = b3 = 1/3.The least squares estimator of µ + (τ1 + τ2 + τ3)/3 is given by (Y1. + Y2. + Y3.)/3.

4

Page 70: Solutions

Solution to Question 3.12 —Balloon experiment

a). Plot inflation time versus color and comment on the results.

From the plot, it appears as though balloon inflation time does depend on balloon color. Inparticular, 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 4COLOR

b). Estimate the mean inflation time for each balloon color, and add these estimates to the plotfrom 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 effect oninflation time.

From SAS PROC GLM:

Dependent Variable: TIMESum of Mean

Source DF Squares Square F Value Pr > F

Model 3 126.15125 42.05042 3.85 0.0200Error 28 305.64750 10.91598Corrected Total 31 431.79875

If we select a significance level of α = 0.05, the p-value of 0.02 leads to a rejection of the hypothesisthat that the color of the balloon has no effect on the inflation time and we would conclude thatthe mean inflation times for these 4 colors of balloons are not the same. However, if we select a

5

Page 71: Solutions

significance level of α = 0.01, then we would not have sufficient evidence to reject the null hypothesisof no difference in inflation times of the 4 colors.

d). Plot the data for each color in the order that it was collected. Are you concerned that theassumptions on the model are not satisfied? 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 inflation time tended to decrease the later the balloons were inflated in the experiment. Perhapsthe assistant improved at blowing up the balloons. In the analysis of variance, we are assuming thatthe the eight observations for each treatment are independent and identically distributed. The plotssuggest 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 satisfied, the stated p-valuein 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

Page 72: Solutions

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 27ORDER

7

Page 73: Solutions

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

Page 74: Solutions

Plot of TIME*ORDER. Legend: A = 1 obs, B = 2 obs, etc. COLOR 424 + 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

Page 75: Solutions

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 effect on the fluid flow rate.

Using the one-way analysis of variance model, the analysis of variance table obtained from PROCGLM is as follows:

The GLM Procedure

Dependent Variable: FLOW

Sum ofSource DF Squares Mean Square F Value Pr > F

Model 4 16.12551 4.03138 2901.61 <.0001Error 15 0.02084 0.00139Corrected Total 19 16.14635280

Since the p-value is less than most usual choices of significance level, we reject the null hypothesisH0 : {τ1 = τ2 = τ3 = τ4 = τ5}, and conclude there is an effect of the rpm on the fluid flow 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 suggeststhat the variability of the data may increase as the RPM increase. This would violate the assumptionthat the error varibles in the one way analysis of variance models are identically distributed withcommon variance σ2.

If the model assupmptions are violated then the stated significant levels and confidence levelsare not correct (see Chapter 5).

c. Calculate a 90% upper confidence limit for the error variance σ2.

χ215,0.9 = 8.547 so a 90% upper confidence limit for the error variance is ssE/8.547 = .0024.

However, this interval also requires that the assumptions of the model are satisfied.

10

Page 76: Solutions

Solution to Question 3.15 — Trout experiment

(a) Plot the data and comment on the results. There is a good deal of overlap between thedata obtained at each level of sulfamerazine, so it is possible that there is not much difference in thehemoglobin content obtained from the different 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:

Yit = µ + τi + εit (1)εit ∼ N(0, σ2)

εit′s are mutually independent

t = 1, . . . , 10, i = 1, . . . , 4,

where Yit is the hemoglobin content from a sample of blood from the tth trout fed level i of sulfam-erazine, µ is a constant, τi is the effect on the hemoglobin content of level i of sulfamerazine, andεit is a random error variable.

11

Page 77: Solutions

(c)Calculate the least squares estimate of the mean response for each treatment. Show theseestimates 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.018713792 10 9.33000000 1.716618123 10 9.03000000 1.135341364 10 8.69000000 1.00049988

The least squares estimate of µ + τ1 is y1 = 7.2The least squares estimate of µ + τ2 is y2 = 9.33The least squares estimate of µ + τ3 is y3 = 9.03The least squares estimate of µ + τ4 is y4 = 8.69

The means for sulfamerazine levels 2, 3, and 4 are very close together and each one falls withinthe range of the data for the other two levels. The mean for sulfamerazine level 1 is outside therange of the data from level 3, so it is possible that the effects of these two levels are different.

(d) Test the hypothesis that sulfamerazine has no effect on the hemoglobin content of trout blood.

SAS PRINTOUT from PROC GLM

Dependent Variable: HemSum of

Source DF Squares Mean Square F Value Pr > FModel 3 26.80275 8.9342 5.70 0.0027Error 36 56.47100 1.5686Corrected Total 39 83.27375

Source DF Type III SS Mean Square F Value Pr > FSulf 3 26.80275 8.93425 5.70 0.0027

If we select a significance level of 0.01. Then, since F > F(3,36,0.95) = 2.87, we reject H0 (or,equivalently, since P-value=0.0027 < 0.01, we reject H0). So we conclude (at significance level 0.05)that the level of sulfamerazine does affect the average hemoglobin content in the blood of browntrout.

(e) Calculate a 95% upper confidence limit for σ2.

σ2 ≤ ssE

χ36,0.95=

56.47122.47

= 2.51

12

Page 78: Solutions

Solution to Question 3.16 — Trout experiment, continued

(a) For calculating the number of observations needed on each treatment, what would you use asa guess for σ2? I would use the 95% confidence bound found in problem 3.15(e),

(b) Calculate the sample size needed for an analysis of variance test with α = 0.05 to have power0.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 Action1000 2.33 46.846 Round up to r = 47

47 184 2.20 41.764 Round up to r = 4242 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 Action1000 2.33 105.408 Round up to r = 106

106 420 2.20 93.97 Round up to r = 9494 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 Action1000 2.33 26.35 Round up to r = 27

27 104 2.20 23.49 Round up to r = 2424 92 2.20 23.49 Round up to r = 24

Take 24 observations on each treatment.

13

Page 79: Solutions

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 similarin terms of their effect on performance. We require

α = 0.05 ∆ = 4.5 seconds σ ≤ 3 seconds Π(∆) = 0.9

Now

r =2vσ2φ2

∆2=

(2)(5)(32)φ2

4.52= 4.444φ2 .

We also have degrees of freedom ν1 = 4 and ν2 = v(r − 1) = 5(r − 1). Using the top table on page715, we have

r ν2 = 5(r − 1) φ r = 4.444φ2 Action1000 approx 1.8 14.4 round up to 15

15 70 approx 1.85 15.2 round up to 1616 75 1.85

The table on page 715 has very few values, so we are unable to get an accurate answer. Howeverit looks as though 16 observations per treatment (80 in total) should be enough to achieve therequired power.

14

Page 80: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 431 January 2003

Solutions available in this file

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

Page 81: Solutions

Design and Analysis of ExperimentsDean 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 thealternative hypothesis that it is less than zero. [Note: If you did not download the corrections from thewebsite, 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

(y1. + y2. + y3.)/3− y0 = −0.0148095 .

and the corresponding standard error is√(1

10× 9+

110× 9

+1

5× 9+

17

)msE = 0.04524.

So, the test statistic for the one sided test is

least squares estimatestandard error

=−0.0148095

0.04524= − 0.32735

Since the value of the test statistic is not less than −t28,0.05/2 = −2.048 (or, for any other reasonablechoice of α, we have no evidence to suggest that pushing the pedestrian light button shortens the waitingtime at this particular light!

b) Using SAS, we can obtain a set of simulataneous 95% confidence intervals for the treatment versuscontrol contrasts using Dunnett’s method. We cannot use Dunnett’s method from the tables at the backof the book since we do not have equal sample sizes. The SAS output is as follows:

The GLM ProcedureDunnett’s t Tests for TIME

NOTE: This test controls the Type I experimentwise error forcomparisons

of all treatments against a control.

Alpha 0.05Error Degrees of Freedom 28Error Mean Square 0.010927Critical Value of Dunnett’s t 2.47622

Comparisons significant at the 0.05 level are indicated by ***.

DifferenceNPUSH Between Simultaneous 95%

Comparison Means Confidence Limits3 - 0 0.00486 -0.14671 0.156422 - 0 -0.01314 -0.14070 0.114421 - 0 -0.03614 -0.16370 0.09142

Conclusion: Each of these intervals includes zero, so again there is no evidence to suggest that eitherone, two or three pushes is better than no pushes for this pedestrian light.

2

Page 82: Solutions

If you do not have access to SAS and decide to use Tukey’s method instead, the intervals will beslightly wider, and will still include zero.

The GLM Procedure

Tukey’s Studentized Range (HSD) Test for TIMENOTE: This test controls the Type I experimentwise error rate.

Alpha 0.05Error Degrees of Freedom 28Error Mean Square 0.010927Critical Value of Studentized Range 3.86125

Comparisons significant at the 0.05 level are indicated by ***.

DifferenceNPUSH Between Simultaneous 95%

Comparison Means Confidence Limits3 - 0 0.00486 -0.16226 0.171972 - 0 -0.01314 -0.15379 0.127511 - 0 -0.03614 -0.17679 0.10451

Solution to Question 4.4 – Reaction time experimentSolution to Question 4.4 – Reaction Time Experiment

a) Identify a set of contrasts that you would find 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 secondsContrasts of interest 1) c1= 1/3, c2 = 1/3, c3= 1/3, c4= -1/3, c5= -1/3, c6= -1/3 Test for differences

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 differences 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 differences 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 timethat the subjects took to respond.

c) Test the hypothesis that the treatments do not have different effects on the reaction time againstthe alternative hypothesis that they do have different effects.

Ho: (1 = (2 = (3 = (4 = (5 = (6 H1: at least two of the treatments means differ We find 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 thatat least two of the means differ. (The mean response time differs for at least two of the treatments).

One-way ANOVA: time versus treatmentAnalysis 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.029021d) Calculate a set of simultaneous 90simultaneous 90(ci ( tn-(, (/2m tn-(, (/2 = t18-6, .01/2*3 = t12, .00167 = 3.6381treatment means: =.185 =.179 =.212 =.268 =.259 =.265= = .0080Confidence interval:1. (ci= .573/3 - .792/3 = -.073 (-.073 ( .0291) (-.102, -.044) We conclude at the 902. (ci= .185/2 - .179/4 - .212/4 + .268/2 - .259/4 - .265/4 = -.002

3

Page 83: Solutions

(-.002 ( 3.6381*sqrt(.000289*.25)) (-.002 ( 3.6381*.0085) (-.002 ( .0309) (-.0329, .0289) Since the valuezero is contained in the 90we conclude at the 90between the response time after an elapsed time of 5seconds 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 90differ-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 Hsu’s method of multiple comparisons with thebest to determine the best/worst treatment or treatments. Define the “best” to be the treatment thatproduces the quickest response (that is, the smallest value of the response variable).

One-way ANOVA: time versus treatmentAnalysis 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

Hsu’s MCB (Multiple Comparisons with the Best)Family error rate = 0.0500Critical value = 2.50Intervals for level mean minus largest of other level meansLevel 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.003330.03142 (——*——) —–+———+———+———+– -0.100 -0.050 -0.000 0.050

Hsu’s MCB (Multiple Comparisons with the Best)Family error rate = 0.0500Critical value = 2.50Intervals for level mean minus smallest of other level meansLevel 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 first and second treatments (auditory,5 and 10 seconds) yield the lowest sample means. This implies that these are the best because they havethe 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 Tukey’s method of pairwise comparisons and a 99% overallconfidence level.

SAS PRINTOUT

The GLM ProcedureTukey’s Studentized Range (HSD) Test for Hem

NOTE: This test controls the Type I experimentwise error rate.Alpha 0.01

4

Page 84: Solutions

Error Degrees of Freedom 36Error Mean Square 1.568639Critical Value of Studentized Range 4.72945Minimum Significant Difference 1.8731

Comparisons significant at the 0.01 level are indicated by ***.

DifferenceSulf Between Simultaneous 99%

Comparison Means Confidence Limits2 - 3 0.3000 -1.5731 2.17312 - 4 0.6400 -1.2331 2.51312 - 1 2.1300 0.2569 4.0031 ***3 - 2 -0.3000 -2.1731 1.57313 - 4 0.3400 -1.5331 2.21313 - 1 1.8300 -0.0431 3.70314 - 2 -0.6400 -2.5131 1.23314 - 3 -0.3400 -2.2131 1.53314 - 1 1.4900 -0.3831 3.36311 - 2 -2.1300 -4.0031 -0.2569 ***1 - 3 -1.8300 -3.7031 0.04311 - 4 -1.4900 -3.3631 0.3831

The only pair of treatment means that are significantly different at α = 0.01 are treatments 1 and2. Therefore, deifference between adding 5 grams of Sulfamerazine and not adding any Sulfamerazineproduces an average difference of between 2.1300 and 4.0031 gm of Hemoglobin per 100ml of brown troutblood. However, adding 10 or 15 grams of Sulfamerazine does not lead to a difference in Hemoglobinlevels.

(b) Our new confidence interval must have confidence level of 99% if the overall confidence level isto 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 effect of treatment 1 minus the average effect of the other 3treatments. Our least squares estimate for τ1 − (τ2 + τ3 + τ4)/3 is

y1. − 1/3(y2. + y3. + y4.) = 7.2− (9.33 + 9.03 + 8.69) = −1.817.

The standard deviation is given by√

msE∑4

i=1c2

i

riand there are 36 degrees of freedom for error.

From SAS, we know msE =1.568639, and

4∑i=1

c2i

ri=

110

4∑i=1

c2i =

110

(12 + (−13)2 + (−1

3)2 + (−1

3)2) = 0.133.

Thus our standard error is √√√√msE4∑

i=1

c2i

ri = 0.457.

Also, t36,( 0.012 ) = 2.719. Thus our 99% Confidence 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 effect of no sulfermerazine is significantlydifferent form the average effect of the other 3 levels of sulfermerazine at the α = 0.01 level, producingbetween 0.573 and 3.06 gm less hemoglobin per 100 ml of brown trout blood.

Alternative Method:

5

Page 85: Solutions

SAS PRINTOUT

The GLM ProcedureDependent Variable: Hem

StandardParameter 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 Tukey’s method gives shorter confidence intervals than would either of the Bonferroni orScheffe 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τi − τs, i 6= s, are of interest. We can compare the critical coefficients for these methods,

Bonferroni: wB = t12, .0256

= 3.15,

Scheffe: wS =√

3F3,12,.05 = 3.24,

Tukey: wT = 1√2q4,12,.05 = 2.97.

Since wT is less than wB , which is less than wS , the Tukey intervals will be shorter than either of theBonferroni or Scheffe intervals.

6

Page 86: Solutions

Solution to Question 4.7– Soap experiment, continued

a) Suppose that the experimenter had been interested only in the contrast τ1− 12 (τ2+τ3), which compares

the weight loss for the regular soap with the average weight loss for the other two soaps. Calculate aconfidence interval for this single contrast.

The SAS ESTIMATE statement gives

Contrast DF Contrast SS F Value Pr > FT1-(T2+T3)/2 1 15.12093750 195.93 0.0001

T for H0: Pr > |T| Std Error ofParameter Estimate Parameter=0 EstimateT1-(T2+T3)/2 -2.38125000 -14.00 0.0001 0.17011944

Since t9,0.025 = 2.262, a 95% confidence interval for the contrast τ1 − 12 (τ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 theother two soaps. Do this via your confidence interval in part (a) and also via (4.3.13) and (4.3.15).

Since the 95% confidence interval does not include 0, we would reject, at level 0.05, the null hypothesisthe 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 t9 distribution of less than.0001. By (4.3.15), ssc/msE = 195.93 corresponds to a p-value from the F1,9 distribution of less than.0001 also. Hence we would reject the null hypothesis for any reasonable choice of significance level α.

c. In Example 4.4.5 (page 89), Dunnett’s method was used for simultaneous 99% confidence intervalsfor two preplanned treatment-versus-control contrasts. Would either or both of the Bonferroni and Tukeymethods have given shorter intervals?

The critical coefficient for Bonferroni method for two preplanned treatment versus control intervals iswB = t9,(0.01)/4 = 3.69 and the critical coefficient for Tukey’s method is wT = q3,9,.01/

√2 = 5.43/

√2 =

3.84, as compared with Dunnett’s two-sided critical coefficient of wD2 = 3.63. Since the standard errordoes not depend on the method used, the confidence intervals for the treatment versus control contrastssre shorter using Dunnett’s method.

d. Which method would be the best if all pairwise differences are required? Calculate a set ofsimultaneous 99% confidence intervals for all of the pairwise differences. Why are the intervals longerthan those in part (c)?

There are three pairwise comparisons. The critical coefficient for Bonferroni’s method is t(9, .01/(2 ∗3)) = 3.95422 compared with Tukey’s method which has critical coefficient wT = 3.84 as in part (c).Consequently, Tukey’s method gives shorter intervals than Bonferroni’s method. Dunnett’s method is notconsidered since it is not valid for all pairwise comparisons. The Bonferroni intervals are longer than thosein part (c) since the critical value takes account of the number of intervals and t9,.01/(2∗3) > t9,.01/(2∗2).

7

Page 87: Solutions

Solution to Question 4.8 – Trout experiment, continued

SAS Command:data one;input Hem Sulf;lines;1 6.71 7.81 5.5: :: :4 7.2proc 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 andquadratic trends in hemoglobin content of trout blood due to the amount of sulfamerazine added to thediet is negligible. State the overall significance level of your tests.

There are two tests to be done. If we do each test at significance level of α = 0.025, the overall levelwill be at most 0.05.Linear Trend: The contrast coefficients for the test

H0 : Linear Trend is negligible vs HA: 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-valueof 0.0241, so that we would reject the null hypothesis at the α = 0.025 level. Therefore, we conclude thatthere 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

[ 910 + 1

10 + 110 + 9

10 ]=

[4.17]2

2.0= 8.6944

SAS PRINTOUT

Dependent Variable: HemContrast DF Contrast SS Mean Square F Value Pr > Flinear 1 8.69445000 8.69445000 5.54 0.0241quadratic 1 15.25225000 15.25225000 9.72 0.0036

Quadratic Trent: The contrast coefficients for the test

H0 : Quadratic Trend is negligible vs HA: 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.0036and we reject H0 at the α = 0.025 level. Therefore, we conclude that there is a quadratic trend inhemoglobin levels due to invcreasing sulfamerazine.

8

Page 88: Solutions

(b) Regarding the absence of sulfamerazine in the diet as the control treatment, calculate simultaneous99% confidence intervals for the three treatment-versus-control comparisons. Which method did you useand why?

Using Dunnett’s method, since it is specifically designed for treatments vs control experiments andtherefore gives the smallest confidence intervals, using SAS, we get

SAS PRINTOUT

Dunnett’s t Tests for HemNOTE: This test controls the Type I experimentwise error for

comparisons of all treatments against a control.Alpha 0.01Error Degrees of Freedom 36Error Mean Square 1.568639Critical Value of Dunnett’s t 3.11170Minimum Significant Difference 1.7429Comparisons significant at the 0.01 level are indicated by ***.

DifferenceSul Between Simultaneous 99%

Comparison Means Confidence Limits2 - 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 confidence level of the intervals in part (b) together with those in Exercise 5?Is there a better strategy than using three different procedure for the three sets of intervals? Explain.

The overall confidence level for the intervals in 5(a) was 99%, the interval in 5(b) had confidence level99%, and the intervals in 8(b) had overall confidence level 0.99. Thus the combined overall confidencelevel 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 confidenceintervals. For instance, Dunnett’s method gives the narrowest confidence intervals for treatment vs controlexperiments. Using a different method in each case would widen the confidence intervals unnecessarily.However, one might want to compare the Scheffe’s method since that method allows you to make aninfinite number of statements with a specified overall confidence level, and the overall α would not needto be split into three parts.

9

Page 89: Solutions

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 experimentinvolved four treatments, and the error standard deviation is estimated from that experiment to be about48.66 minutes per dollar (minutes/dollar). Calculate a 90% upper confidence limit for the error varianceσ2.

Since msE = 48.662, then ssE=(16− 4)× 48.662 = 28, 413.5. So, a 90% upper confidence bound forσ2 is

σ2 ≤ ssE

χ212,0.9

=28, 413.55

6.304= 4507.23 .

(b). How large should the sample sizes be in the new experiment if Tukey’s method of pairwisecomparisons is to be used and it is desired to obtain a set of 95% simultaneous confidence intervals oflength at most 100 minutes per dollar?

We need

wT

√msE

2r

=1√2q4,4r−4,.05

√4507.23

(2r

)≤ 50 .

This uses the upper bound for σ2 obtained in part (a), which is the largest likely value of msE for therepeat experiment. So we need

q24,4r−4,.05 ≤ 502r

4507.23= 0.5547r .

r 4r − 4 q24,4r−4,0.05 0.5546r Action

11 40 3.792 = 14.36 6.10 Increase r29 120 3.682 = 13.54 66.56 Decrease r20 76 3.72 = 13.69 11.09 Increase r24 92 3.72 = 13.69 13.31 Increase r25 96 3.72 = 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 Scheffe’s method is to be used toobtain a set of 95% simultaneous confidence intervals for various contrasts and if the confidence intervalfor the duty contrast is to be of length at most 100 minutes per dollar?

The confidence interval for the duty contrast needs to have at most 100 minutes per dollar, as partof a set of 95% simultaneous Scheffe intervals. The duty contrast (page 71) is

τ1 + τ2

2− τ3 + τ4

2

with least squares estimate 0.5(y1. + y2.− y3.− y4.). The corresponding variance is 0.25(4σ2/r), so usingthe upper bound for σ2 from part (a) as the largest likely value of msE, we require√

3F3,4r−4,.05

√4507.23/r ≤ 50 ;

that is F3,4r−4,.05 ≤ 0.1848r.

r 4r − 4 F3,4r−4,.05 0.1848r Action26 100 2.70 4.80 Decrease r16 60 2.76 2.96 Decrease r15 56 2.77 2.77

About 15 observations per treatment would meet this requirement.

10

Page 90: Solutions

Solution to Question 4.10 Trout experiment, continued

(a) Suppose the experiment were to be repeated. Suggest the largest likely value for the error meansquare MSE.

From section 3.46, a 95% upper confidence limit for σ2 is given by

σ ≤ ssE

χ2df,0.95

.

From problem 3.15, we have ssE = 56.471. And χ236,0.95 = 23.26861. Thus, a good largest value for σ2

is given by σ2 = 56.47123.26861 = 2.427.

(b) How many observations should be taken in each treatment so that the length of each interval in aset of simultaneous 95% confidence 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 beless than 1. For pairwise comparisons, Tukey’s method or Bonferroni’s method will lead to the smallernumbert of observations for given msd.

(i) Using Bonferonni’s Method The radius of a Bonferroni interval for 6 pairwise comparisons and 4

treatment levels is given by tn−4, α12

√MSE( 2

r ) , where r is the number of samples taken at each leveland 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 = tn−4, α12

√4.8538

r ≤ 1.

r Degreeoffreedom t4r−4, 0.0512

msd

10 36 2.7920 1.845220 76 2.7091 1.334630 116 2.6843 1.079735 136 2.6774 0.997134 132 2.6786 1.0121

By using the Bonferroni’s method, we need 35 samples at each level in order to get the desired length.

By using the Scheffe’s method, we need 39 samples at each level in order to get the desired length.

(ii) Using Tukey’s Method We need msd = qµ,n−µ,α

2

√2MSE

r ≤ 1. For this particular problem, we

want msd = q4,4r−4,0.05

√2.4269

r ≤ 1.

r Degreeoffreedom q4,4r−4,0.05 msd30 116 3.69 1.0531 120 3.68 1.0332 124 3.68 1.0133 128 3.68 0.998

By using the Tukey’s method, we need 33 samples at each level in order to get the desired length.

11

Page 91: Solutions

Solution to Question 4.11 – pedestrian light experiment

(a) Suppose that you are planning to repeat the pedestrian light experiment at a pedestrian crossingof your choosing. Select v = 4 levels for the treatment factor ”number of pushes” including the level ”nopushes.” Give reasons for your selection.

Level Number of pushes Reasons1 No pushes For control purposes2 1 push This is how the device

is supposed to work,you push it once and then thesignal changes (in theory)

3 5 pushes 5 seems like a nice round numberthat the average person might push

4 Continuous Continuous pushingpushing until the light changes

(b) Using ”no pushes” as the control treatment, write down the formula for a set 95% simultaneousconfidence intervals for treatment-versus-control contrasts.

Dunnett’s method gives shorter intervals than Tukey’s method and Scheffe’s method for treatmentversus control contrasts. It may or may not give shorter intervals than Bonferroni method for preplannedcomparisons. The formula for a set of simultaneous confidence intervals for the 3 treatment versus controlcontrasts using Dunnett’s method and equal sample sizes is

yi. − y1. ± wD2

√msE(2/r) for i = 2, 3, 4 n

where wD2 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 confidence intervalsare of length less than 0.1 seconds? What value are you going to use for msE and why?

One could use the upper 95% confidence 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 assumingthat all of our variances are equal and the two experiments share levels 1 and 2 and Table 3.12 is all wehave to make any kind of estimate, we will proceed with the upper 95% confidence limit for σ2 basedupon the data in Table 3.12. Using SAS and the data from Table 3.12, we get SSE = 0.3059529. Also,we have χ2

32−4,0.95 ≈ 16.9279. Thus, our confidence upper bound for σ2 is 0.01807. Now, if our intervalsare to have length less than 0.1 seconds then they must have a minimum significant difference less than0.05 seconds. From part (b), we know our msd is given by

msd = wD2

√msE(2/r),

so we require w2D2 ≥ 0.052r/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) w2D2 0.06917r Action

10 36 2.472 = 6.1 0.69 Increase r100 396 2.352 = 5.52 6.92 Decrease r80 316 2.352 = 5.52 5.53 About right

Thus, r = 80 observations per treatment should generate confidence intervals for treatment versuscontrol 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

Page 92: Solutions

Our new msd would be given by

msd = wD2

√msE(2/r),

with α = 0.05 and degrees of freedom equal to ν1 = v − 1 = 5 and ν2 = 6(r − 1), and we still requirew2

D2 ≥ 0.052r/2msE = 0.06917r.

it appears that the value of wD2 increases as v − 1 increases and decreases as n− v increases makingit difficult to judge what will happen. If we calculate the msd with r = 80, we obtain

r 6(r − 1) w2D2 msd

80 474 2.51 0.053

Based upon this, it looks as though would need slightly more observations per treatment to achieve amsd of 0.05 if v = 6.

13

Page 93: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 53 February 2003

Solutions available in this file

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 experiment5.4a – Reaction time experiment5.5 – Catalyst experiment – needs rewriting5.6 – Bicycle experiment5.7 – Dessert experiment5.9 – Spaghetti sauce experiment

1

Page 94: Solutions

Solution to Question 5.3

(a). A plot of the standardized residuals vs. the predicted values indicates unequal variance. This isalso apparent from the standard deviations given in the problem. Before proceeding, a variance-stabilizingtransformation 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 responsesfor the four levels of treatment, we get

2

Page 95: Solutions

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 issuggested. The analysis of the data was then carried out using 1/y as the response. We’ll now check theassumptions 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 orderof the experiment is not given, so independence of error terms cannot be checked with a plot of residualsvs. order. The variances appear similar from the plot, and this is checked by calculating the varianceswith 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 beapproximately satisfied.

3

Page 96: Solutions

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 VARTIME1 1 .0056740 .0000000321032 2 .0041961 .0000000230333 3 .0058376 .0000000212174 4 .0047940 .000000037671

4

Page 97: Solutions

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 t4−(t1+t2+t3)/3,we get −0.00044184± t(0.025,36) × (0.00006165) = (−0.000567,−0.000317) This does not include zero, sowe conclude Ha, at the 0.05 level, that the average melting time of the margarines is less than that ofbutter.

(c). Using Satterthwaite’s approximation for unequal variances,

Here

c1 = c2 = c3 = −1/3, c4 = 1s1, s2, s3, s4 are given in the problem

r1 = r2 = r3 = r4 = 10.df = 12.6 from Eqn. (5.5.4) — (round down to 12 to be conservative)Var = 8.523 from Eqn (5.5.4)

From (5.5.5), and getting the point estimate for the contrast from the SAS ESTIMATE statement, the95% C.I. for the contrast τ4−(τ1+τ2+τ3)/3 is (7.08, 19.79). This does not include zero, so the conclusionis the same as in part (b).

(d). The interpretation of the results using Satterthwaite’s approximation is simpler: the confidenceinterval for the butter-avg(margarine) contrast in part (c), indicates that butter takes longer to meltthan the average of the three margarines (with confidence level 95%) by between 7 and 20 seconds,approximately. The conclusion using the transformed data, also suggests that butter takes longer tomelt, but here the results are measured in seconds−1. Thus, Satterthwaite’s approximation may bepreferred.

SAS Program

options linesize=75;filename marg ’margerine.data’;data marg1;

5

Page 98: Solutions

infile marg;input brand time;proc glm;class brand;model time=brand;estimate ’btr_marg’ brand -1 -1 -1 3 / divisor=3;output out=marg2 predicted=ypred residual=z;

proc standard std=1.0;var z;

proc rank normal=blom;var z;ranks nscore;

proc plot ;plot time*brand z*brand z*ypred z*nscore / vref=0 vpos=20 hpos=50;

data; set marg1;proc sort;by brand;

proc means noprint mean var;var time;by brand;output out=marg3 mean=avgtime var=vartime;

data; set marg3;ln_avg=log(avgtime); ln_var=log(vartime);

proc print;var brand avgtime vartime ln_avg ln_var;

proc plot;plot ln_var*ln_avg/vpos=20 hpos=50;

data marg10; set marg1; invtime=1/time;proc glm;class brand;model invtime=brand;estimate ’btr_marg’ brand -1 -1 -1 3 / divisor=3;output out=marg11 predicted=ypred residual=z;

proc standard std=1.0;var z;

proc rank normal=blom;var z;ranks nscore;

proc plot ;plot invtime*brand z*brand z*ypred z*nscore / vref=0 vpos=20 hpos=50;

data; set marg10;proc sort;by brand;

proc means noprint mean var;var invtime;by brand;output out=marg13 mean=avgtime var=vartime;

proc print;var brand avgtime vartime ;

run;

6

Page 99: Solutions

Solution to Question 5.4 – reaction time experiment

(a) A plot of the standardized residuals from the one-way analysis of variance model against thepredicted values yit show no obvious outliers, since all the standardized residuals are within the ±2bands. However, we may be a little concerned about the equality of variances.

Plot of Z*PDY. Legend: A = 1 obs, B = 2 obs, etc.2 +| A| A| A

Z | A|| A A|| A

0 +----------------------------------------A----A----| A| A| A A| A A A| A||| A

-2 +-+-----------+-----------+-----------+-----------+-0.175 0.200 0.225 0.250 0.275

PDY

Obs TC AVRTM VARRTM LN_AV LN_VAR1 1 0.18500 .000301000 -1.68740 -8.108402 2 0.17867 .000108333 -1.72223 -9.130303 3 0.21200 .000436000 -1.55117 -7.737874 4 0.26833 .000121333 -1.31553 -9.016975 5 0.25933 .000576333 -1.34964 -7.458826 6 0.26500 .000193000 -1.32803 -8.55282

The ratio of the maximum to the minimum variance (treatment combinations 5 to 1) is 5.32 whichis above our “rule of thumb” threshhold. However, the plot of ln(s2) against ln(y) shows that no simpletransformation will equalize the variances. This means that Satterthwaite’s approximations should beused. If the ususal analysis is done, the stated alpha levels will not nexessarily be very close to the actualvalues.

Plot of LN_VAR*LN_AV. Legend: A = 1 obs, B = 2 obs, etc.| A| A|

-8 +| A|

LN_VAR | A||

-9 + A

7

Page 100: Solutions

| A|--+--------+--------+--------+--------+--------+----1.8 -1.7 -1.6 -1.5 -1.4 -1.3

LN_AV

The experimenters were particularly concerned about the fatigue of the subject. this can be checkedby plotting the standardized residuals against the order of collection of the observations:

Plot of Z*ORDER. Legend: A = 1 obs, B = 2 obs, etc.2 +| A| A| A

Z | A|| A A|| A

0 +-----------------------A-------A------------------| A| A| A A| A A A| A||| A

-2 +--+---------+---------+---------+---------+--------0 5 10 15 20

ORDER

There is no obvious pattern in this plot, and so the subject does not appear to have tired significantly(unless a learning effect cancelled out a tiring effect).

A plot of the standardized residuals against normal scores is as follows.

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.2 + || | A| | A| | A

Z | | A| || | A A| || | A

0 +------------------------+-B-----------------------| A|| A || A A || A A A || A || || |

8

Page 101: Solutions

| A |-2 + |

-+-----------+-----------+-----------+-----------+--2 -1 0 1 2

Rank for Variable Z

There are three observations on the low end and one on the high end which might give cause forconcern about the tails of the distribution. However, this effect may also be caused by the unequalvariacnes, which appears to be the greater worry.

9

Page 102: Solutions

Solution to Question 5.5 – catalyst experiment

i.) A residual plot of residuals vs. fitted values will help check the constant variance assumption.Here we see fairly random scatter about 0, suggesting constant variance.

Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.

Z |2.077 + A

|1.384 + A A

|0.692 + B B A B

|0.000 +-----------------------------B---B------

|-0.692 + B B A B

|-1.384 + A A

|-2.077 + A

|--+---+---+---+---+---+---+---+---+---+--5 6 7 8 9 10 11 12 13 14

YPRED

ii.) To check more formally the constant variance assumption, we see the ratio max(s2i )/min(s2

i )=9 > 3, suggesting heteroscedacity. However, note there are only 2 observations per treatment and someof the variances are zero, so it is a little difficult to tell.

OBS TREAT AVY VARY LN_AV LN_VAR1 1 5 2 1.60944 0.693152 2 9 8 2.19722 2.079443 3 7 8 1.94591 2.079444 4 5 2 1.60944 0.693155 5 14 2 2.63906 0.693156 6 8 2 2.07944 0.693157 7 14 2 2.63906 0.693158 8 12 18 2.48491 2.890379 9 13 0 2.56495 .10 10 12 0 2.48491 .11 11 13 2 2.56495 0.6931512 12 8 2 2.07944 0.69315

There are no apparent trends that suggests any transformations, but we will plot log(s2i ) vs. log(yi)

and determine the slope just to see. The scatterplot does not show a linear relationship which suggeststhat no simple transformation exists that will equalize the variances. If there is non-constant variance,we can make make formal inferences by using Satterthwaite’s approximation.

Plot of LN_VAR*LN_AV. Legend: A = 1 obs, B = 2 obs, etc.

LN_VAR |3 + A|||

10

Page 103: Solutions

2 + A A|||

1 +| B B A B||

0 +|-+------------+------------+------------+1.5 2.0 2.5 3.0

LN_AVNOTE: 2 obs had missing values.

iii) To check the independence assumption, we plot the residuals vs. order. The increasing trendclearly indicates the independence assumption is violated.

Plot of Z*ORDER. Legend: A = 1 obs, B = 2 obs, etc.Z |

2.077 + A|

1.384 + A A|

0.692 + A AAA AAA|

0.000 +----A----A-A-A--------------------------|

-0.692 + AAA A A A A|

-1.384 + A A|

-2.077 + A|--+---------+---------+---------+--------0 10 20 30

ORDER

11

Page 104: Solutions

Solution to Queuestion 5.6—- Bicycle experiment(a) Plot the standardized residuals against yit, compare the sample variances, and evaluate equality

of the error variances for the treatments.

Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.2 +|| A| A

Z || A|| A| A B B

0 +--------------------------------------------------|| B| A A||||| A

-2 + A-+-----------+-----------+-----------+-----------+-0 20 40 60 80

YPRED

Notice that the spread of the observations decreases when the predicted values of crank-rate increase. Soit is unlikely that the error variances for the different treatments (speeds)are equal. we can investigatethis using our “rule of thumb”.

The mean (AVRATE) and variance (VARRATE) for each treatmentis as follows

OBS TREAT AVRATE VARRATE LN_AV LN_VAR1 1 18.6667 12.3333 2.92674 2.512312 2 31.0000 13.0000 3.43399 2.564953 3 45.0000 3.0000 3.80666 1.098614 4 60.3333 1.3333 4.09988 0.287685 5 74.3333 1.3333 4.30856 0.28768

Since the ratio of the maximum to the minimum variance is much greater than 3.0, a transformation ofthe data should be sought.

(b) Choose the best transformation of the data of the form (5.6.3), and test the hypotheses thatthe linear and quadratic trends in crank rates due to the different speeds are negligible, using an overallsignificance level of 0.01.

First, we plot log(s2i ) against logyi..

12

Page 105: Solutions

Plot of LN_VAR*LN_AV. Legend: A = 1 obs, B = 2 obs, etc.

3 +||| A A||

2 +||

LN_VAR ||| A

1 +|||| A A|

0 +-+-----------+-----------+-----------+-----------+-2.5 3.0 3.5 4.0 4.5

LN_AV

The relationship is fairly linear, so either the SAS PROC REG procedure can be used to evaluate theslope, or a line can be drawn by hand and slope = rise/run.

The SAS PROC REG output is as follows:

Model: MODEL1Dependent Variable: LN_VAR

Parameter EstimatesParameter Standard T for H0:

Variable DF Estimate Error Parameter=0 Prob > |T|

INTERCEP 1 8.478647 1.64116538 5.166 0.0141LN_AV 1 -1.918730 0.43792761 -4.381 0.0220

Now the slope is q = −1.92, so y1.96 which is approximately y2 should be used for the data transfor-mation.

At this point we need to check that all of the assumptions on the model are fairly well satisfied withthe transformed data.

With the transformed (squared data) we have.

OBS TREAT AVSRATE VARSRATE1 1 356.67 16784.332 2 969.67 47796.333 3 2027.00 24843.004 4 3641.00 19200.005 5 5526.33 29205.33

Max/Min =2.84, so the variances are now much closer, and within our rule of thumb. The plot showsthat the spreads look much closer.

13

Page 106: Solutions

Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.Z |2 +||| A A

1 + A| B| A B|

0 +---A----------------------------------------------||| B

-1 + A| A| A| A

-2 +|--+------------+------------+------------+---------0 2000 4000 6000

YPRED

We should check normailty with the transformed data. We cannot check independence as we do nothave the information about the order of the observations.

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.Z |2 +||| A A

1 + A| B| A B|

0 +----------------------A---------------------------||| B

-1 + A| A| A| A

-2 +|-+-----------+-----------+-----------+-----------+--2 -1 0 1 2

RANK FOR VARIABLE Z

The normal scores do not form a very straight line. Sometimes, a transformation can ruin the normality.If we were to proceed, ignoring worry about the normality, the two contrasts can be tested approximatelyusing the CONTRAST statement with the transformed data:

14

Page 107: Solutions

General Linear Models ProcedureDependent Variable: RATE

Contrast DF Contrast SS Mean Square F Value Pr > FLINEAR 1 50783234.1 50783234.1 1842.26 0.0001QUADRATIC 1 2061057.5 2061057.5 74.77 0.0001

With an overall level of at most 0.01, we can do each test at level 0.005. Since the p-values for boththe LINEAR and QUADRATIC contrasts are less than 0.005, the hypothesis of negligible linear trend isrejected, and so is the hypothesis of negligible quadratic trend. We conclude that the linear and quadratictrends in crank rates due to the different speeds are significantly different from zero. (Remember thatthe normality assumption is questionable. However, our p-values are nowhere near the significance levels,so the decision on whether to reject or not is fairly clear-cut).

(c) Repeat part (b), using the untransformed data and Satterthwaite’s approximation for unequalvariances.

Returning to the untransformed data, as above we have

OBS TREAT AVRATE VARRATE1 1 18.6667 12.33332 2 31.0000 13.00003 3 45.0000 3.00004 4 60.3333 1.33335 5 74.3333 1.3333

The sample sizes are all r = 3.For the linear trend, the contrast coefficient list is (-2 -1 0 1 2) and the least squares estimate is

−2y1. − y2. + y4. + 2y5. = 140.6666 .

Using (5.6.4), we obtain

Var(Σciτi) =∑ c2

i

rs2

i = 23 and df =(Σc2

i s2i /r)2∑ (c2

is2

i/r)2

(r−1) = 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 confidence

interval for the linear trend is given by

l.s.e. ± wB [√

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(Σciτi) =∑ c2

i

rs2

i = 27 and df =(Σc2

i s2i /r)2∑ (c2

is2

i/r)2

(r−1) = 4.72,

—round down to 4.So the 99.5% confidence interval for the quadratic trend is given by

4.6667± 4.604[√

27] = [−19.26, 28.59] .

15

Page 108: Solutions

This does contain 0 and, therefore, the hypothesis of negligible quadratic trend is not rejected.

(d) Discuss the relative merits of the methods applied in parts (b) and (c).

In terms of (untransformed) crank rate, there is no quadratic trend, but in terms of squared (trans-formed) crank rate, there is one. Which result is more appealing to you? The transformed analysis issimpler to do, but we did question the normality assumption. The untransformed analysis is simpler tointerpret and the normality assumption is perhaps not quite so questionable.

It is possible that by squaring the data, we induced a quadratic trend. (For example, the values 1, 2,3, 4 are evenly spaced but the values 1, 4, 9, 16 are not).

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.

2 +|| A| A

Z |

| A|| A| A D

0 +--------------------------------------------------|| B| B||||| A

-2 + A-+-----------+-----------+-----------+-----------+--2 -1 0 1 2

Rank for Variable Z

16

Page 109: Solutions

Solution to Question 5.7 – dessert experiment

a) A plot of melting time vs treatment combination suggests that there are differences in the effectsof the different treatments. for example, it appears cubes with treatment 2 melt more slowly than thosewith treatment 3 and 6.

Plot of PMLT*TC. Legend: A = 1 obs, B = 2 obs, etc.15 +

||| A| A| A

10 + A A A| B A| A A A A

PMLT | A A| A| A

5 +| A||||

0 +--+------+------+------+------+------+---1 2 3 4 5 6

TC

b) From the plot of the standardized residuals versus the predicted values, there are indications ofnon-constant variance as variability of the residuals alternate between “large” and “small”. The ratiomax(s2

i )/min(2i )=18.07 suggests non-constant variance also.

OBS TC _TYPE_ _FREQ_ APMLT VARPMLT1 1 0 3 8.9600 0.364802 2 0 3 10.8800 1.246803 3 0 3 7.1333 6.596134 4 0 3 8.0967 4.390435 5 0 3 10.1500 6.109306 6 0 3 7.5633 0.81923

However, we cannot simply make transformations of the data to cure this type of heteroscedacity. Theplot of log(s2

i ) vs. log(yi) shows no clear linear trend, so a simple transformation does not exist. A possiblesolution for making formal formal statistical inferences on the treatment effects, is to use Satterthwaite’sapproximation. Note there are only 3 observations per treatment, which makes it difficult to tell whetherwe have outliers or non-constant variance.

Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.5 +||

Z | A| A A| A| A A A

17

Page 110: Solutions

0 +----------A---A----A------------A-------| A A A A|| A A| A||

-5 +-+------------+------------+------------+6 8 10 12

YPRED

Plot of LN_VAR*LN_AV. Legend: A = 1 obs, B = 2 obs, etc.2 +| A A|| A||

1 +||

LN_VAR ||| A

0 +| A||||

-1 + A-+------------+------------+------------+1.8 2.0 2.2 2.4

LN_AV

A plot of residuals vs position shows a possible “V” pattern indicating independence assumptionsmay be violated.

Plot of Z*POS. Legend: A = 1 obs, B = 2 obs, etc.5 +||

Z | A| A A| A| A A A

0 +-----A--A---A--A------------------------| A A A A|| A A| A||

-5 +

18

Page 111: Solutions

--+---------+---------+------------------0 10 20

POS

c) A comparison of tc2 to tc6 (that with the largest mean and that with the smallest) has standarderror

S. E. =√

1.247/3 + .819/3 = .829,

and Satterthwaite’s method give approximate degrees of freedom

df =.8292

(1.247/3)2 + (.819/3)2= 3.835 .

If we round down to 3 degrees of freedom, we have q6,3,0.05 = 8.04 and y2 − y6 = 3.32.Since msd=(8.04/

√2) ∗ .829 = 4.713 > 3.32, treatments 2 and 6 are statistically insignificant if we

consider the 15 possible pairs with 95% simultaneous confidence level, i.e. the confidence interval is(-1.393, 8.033).

Similar calculations for treatments 2 and 3 gives msd=9.19 and y2 − y3 = 3.747.d.)Based only on the above two comparisons, it seem there is no statistically significant difference between

the treatments. Based on the sample statistics however, perhaps mixes with 1/2 cup sugar (treatments2 and 5) will stay frozen longest.

Another possible factor to consider is the proportion of orange juice to water. We might also beconcerned in the analysis to have small variance as well as large mean.

19

Page 112: Solutions

Solution to Question 5.9 – spaghetti sauce experimenta)

Plot of Z*YPRED. Legend: A = 1 obs, B = 2 obs, etc.Z |4 +||| A

2 +| A| A A A| A

0 +--------B--A----------------------------| AA B| AA A A| A

-2 +|--+--------+--------+--------+--------+--0 20 40 60 80

YPRED

The residual plot shows larger spread for some treatment combinations than others indicating possiblyunequal variance. The ratio max(vari)/min(vari)=49/2.33=21 supports this conclusion.

Plot of Z*ORDER. Legend: A = 1 obs, B = 2 obs, etc.4 +||||| A

2 +|| A

Z | AA| A| A A

0 +----------A---A-------------------------| A A A| A| A AAA| A|

-2 +--+---------+---------+------------------0 10 20

ORDER

This plot of residuals vs. order is hard to interpret. Though there may be a slight increasing patternfor observations 6-14 and then a decreasing pattern for observations 15-18, without access to the originalexperimenters’ reports it is hard to know whetehr there is a reason. We proceed with the analysis asthough thiese trends occured by pure chance, but if they didn’t our analysis will not be correct.

20

Page 113: Solutions

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.Z |4 +||||| A

2 +|| A| A A| A| A A

0 +--------------------AA------------------| B A| A| A A B| A|

-2 +-+------------------+------------------+--2 0 2

Rank for Variable Z

The normal prob. plot shows a slight departure from linearity at the bottom end. So we shouldinterpret our confidence levels and significance levels with a little caution in case normality of the errortems is not quite satisfied.

b)

The GLM ProcedureDependent Variable: WT

Sum ofSource DF Squares Mean Square F Value Pr > FTC 5 7976.444444 1595.288889 98.68 <.0001Error 12 194.000000 16.166667Corrected Total 17 8170.444444

Obs TRTMT _TYPE_ _FREQ_ MNWT VARWT1 1 0 3 58.0000 49.00002 2 0 3 65.6667 8.33333 3 0 3 17.0000 19.00004 4 0 3 23.0000 9.00005 5 0 3 15.3333 9.33336 6 0 3 15.6667 2.3333

We will calculate Bonferroni Intervals. As an example the CI for (τ1 − τ2) is calculated as follows:sd(contrast)=sqrt(49/3+8.3/3)=4.370355 df=(3 − 1) ∗ (49 + 8.3)2/(492 + 8.32) = 2.658653 2 and

w=t(2,.03/6)=t(2,.005)=9.925So 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

Page 114: Solutions

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 offer any clear suggestions of what type of transformationto use. A plot of log(VARi) vs. log(aveWT) and corresponding regression also does not indicate any ofthe 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 fitting straight line has q=0.72 which indicates that1/√

y would be a reasonable transformation. However, we already know that this won’t be very successful.

Parameter StandardVariable DF Estimate Error t Value Pr > |t|Intercept 1 0.00241 2.21152 0.00 0.9992LN_AV 1 0.72201 0.66239 1.09 0.3370

22

Page 115: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 7March 1st 2003

Solutions available in this file

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

Page 116: Solutions

Solution to Question 7.6 Weathering experiment, continued

First, we need to recreate the anlaysis of variance table. The sums of squares for the treatmentfactors can be calculated by hand using the rules in Chapter 7. Alternatively, the averages can be enteredinto a computer p[ackage, such as SAS PROC GLM and the resulting sums of squares and mean squaresmultiplied by r. In this experiment, r = 2. The error mean square can only be obtained from the rawdata. According to the information in the paper, msE = 6.598, with 36 degrees of freedom. In theanalysis of variance table shown below, the mean squares are those obtained from the computer programusing the averages. The F-value is calculated from the corrected mean square (multiplied by r = 2) anddivided by the error mean square.

The GLM ProcedureDependent Variable: Y

Source DF Type III SS Mean Square F valueE 1 260.82250 260.82250 79.061A 2 519.57389 259.78694 78.747D 1 1.03361 1.03361 0.313F 2 51423.42389 25711.71194 7793.790E*A 2 13.56167 6.78083 2.055E*D 1 1.03361 1.03361 0.313E*F 2 40.68500 20.34250 6.166A*D 2 6.06056 3.03028 0.918A*F 4 198.21778 49.55444 15.021D*F 2 240.67722 120.33861 36.477E*A*D 2 8.67722 4.33861 1.315E*A*F 4 26.90333 6.72583 2.039E*D*F 2 149.92722 74.96361 22.723A*D*F 4 43.53111 10.88278 3.299E*A*D*F 4 6.73444 1.68361 0.510

If we test each hypothesis of negligible main effect or interaction at individual level α∗ = 0.001, theoverall level will be at most α = 0.015.

From the F -tables we have

F1,36,0.001 = 12.9 F2,36,0.001 = 8.47 F4,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 arenon-negligible. Averaged over these interactions, there is a significant difference in the levels of E,A andF . In order to be able to draw conclusions about the factors, it would be necessary to examine interactionplots.

b). To test the null hypothesis that the interaction FA is negligible, against the alternative hypothesisthat it is not negligible, we obtain the formula from rules 1-8 of Section 7.3. First, write the factors inalphabetical 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 = edra∑

i=1

f∑l=1

(yi..l. − yi.... − y...l. + y.....)2 .

Using the cell means model or the equivalent four-way complete model, the error sum of squares is

ssE = (yijklt − yijkl.)2 .

We reject the null hypothesis of no AF interaction if

ssFA/4ssE/36

> F4,36,α .

2

Page 117: Solutions

c) In order to answer this question, we need to examone the interaction plots. We see that thereis a clear difference in the fabrics and the interaction, in comparison, is relatively small (– see also theanalysis of variance table). Consequently, it may well be of interest to calculate confidence intervals forthe differences in the fabrics averaged over the various weather conditions to which the fabric may beexposed.

A formula for such confidence intervals using Bonferroni method of mutiple comparisons is

y...1. − y...2. ± t36,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

Page 118: Solutions

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 D∗F interaction plot, that averaging over the exposure fabrics 2 and 3 reacteddifferently to direction of the pull. One had larger breaking strength in direction 1 while the oterh hadthe larger strength in direction 2. From the ED*F interaction plot, we can see this difference was moremarked at exposure 1 than exposure 2. these differences are significantly larger than the experimentalerror. Therefore, it makes no sense to say that direction has no effect on the breaking strength – althoughone can argue that the effect is small as compared with the fabric differences.

4

Page 119: Solutions

Solution to Question 7.8 — Paper towel strength experiment

a) The assumed model is

Yijkt = µ + α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 notinvolved 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 effects contrastsα∗1 − α∗2 and β∗1 − β∗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 interestedin pairwise differences in the combinations of the different 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 andthe 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 SystemObs AMOUNT LIQUID avy vary1 1 1 3302.33 465084.232 1 2 2903.68 139966.033 2 1 3035.00 361395.284 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

Page 120: Solutions

Obs BRAND LIQUID avy vary1 1 1 3635.45 277207.812 1 2 3161.20 8906.133 2 1 2701.88 69223.944 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 suggestssome possible non-independence, but this is prmarily caused by the two large residuals in the center of theplot. 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 tothe low level of liquid and Brand 1. There may be a transformation that would help to equalize thevariances. The normality appears to be well-satisfied.

The SAS SystemPlot 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

Page 121: Solutions

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

Page 122: Solutions

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.332 112 3200.57 4035.103 121 2786.87 88571.604 122 2606.80 81460.845 211 3453.10 316243.636 212 3121.83 13581.027 221 2616.90 62821.758 222 2232.37 13740.25

Without any transformation, we cannot rely on the stated p-values, significance levels and confidencelevels. The analysis of variance table gives

8

Page 123: Solutions

The GLM ProcedureDependent Variable: Y

Sum ofSource DF Squares Mean Square F Value Pr> FAMOUNT 1 365930.510 365930.510 3.73 0.0684BRAND 1 4209358.800 4209358.800 42.93 <.0001LIQUID 1 858551.854 858551.854 8.76 0.0081AMOUNT*BRAND 1 3822.850 3822.850 0.04 0.8456Error 19 1862905.935 98047.681Corrected Total 23 7300569.950

Thus, even if the p-values are considerably inaccurate, it is clear that there is no substantial ABinteraction and that there is a substantial main effect of “Brand”. If an overall significance level of≥ α = 0.04 is selected, so that each test is done at level 0.01, the two levels of liquid type appear to givesignificantly different strengths, but the amounts do not. However, if the p-values are corrected for thedifferent variances, a different 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 different:

Obs AMOUNT AVY VARY1 1 3103.01 318365.162 2 2856.05 312056.60

Obs BRAND AVY VARY1 1 3398.33 191391.722 2 2560.73 89627.48

Obs LIQUID AVY VARY1 1 3168.67 395163.542 2 2790.39 190474.47

Consequently, any adjustment that we make using Satterthwaite’s approximation for main effect com-parisons will make little difference. If a transformation was to be tried, the most sensible transformationwould be 1/

√y and this would be somewhat difficult to interpret.

f) We suggested a maximum of 10 contrasts of interest in part b). If we select an overall confidencelevel of at least 90%, then we can use Bonferroni’s method and calulate each interval at an individual99% confidence level. It turns out that there is no substantial AB interaction, and only the three maineffect contrasts would be of interest.

StandardParameter Estimate Error t Value Pr> |t|AMOUNT DIFF -246.958333 127.833017 -1.93 0.0684BRAND DIFF -837.591667 127.833017 -6.55 <.0001LIQUID DIFF -378.275000 127.833017 -2.96 0.0081

Since t19,0.005 = 2.861, we have

t19,0.005 ∗ std. err. = 2.861 ∗ 127.833 = 365.73

and

α∗1 − α∗2 ∈ (−246.96± 365.73) = (−612.69, 118.77)

β∗1 − β∗2 ∈ (−837.59± 365.73) = (−1203.32,−471.86)

γ1 − γ2 ∈ (−378.28± 365.73) = (−744.01,−12.55) .

Thus, at an overall 90% confidence level, the brands differ in strength by between 472 and 1203units with brand 2 being the stronger. The amount of liquid absorbed seemed not to affect the strengthsubstantially, and the type of liquid had a marginal effect with the towels being able to withstand waterbetter than beer!

9

Page 124: Solutions

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 willingto assume that the 3-factor and 4-factor interactions were negligible, a suitable model would be

Yijkl = µ + α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 effects (positive or negative) on the response of factors A, B, C, D at levelsi, j, k, l, respectively, (αβ)ij , (αγ)ik, (αδ)il, (βγ)jk, (βδ)jl, (γδ)kl are the additional effects of the pairsof factors together at the specified levels.

b) How would you check the assumptions on your model?

Plot the standardized residuals against (i) the fitted values yijkl and against the levels of each of thefour factors to look for equal variance and outliers, (ii) the order of collection to look for independence ofthe error variables (–this is not possible in this experiment since we do not have the order), (iii) normalscores to check for normality of the error variables.

c) Calculate an analysis of variance table and test any relevant hypotheses, stating your choice of theoverall level of significance and your conclusions.

There are 10 hypotheses to be tested. Suppose that we select an overall significance level of at most0.1 so that we test the significance of each effect at level 0.01. We test the interactions first. If theinteractions containing a given factor are zero, we will then test whether the corresponding main effectis zero. The ANOVA table is below.

General Linear Models Procedure

Dependent Variable: YSum of Mean

Source DF Squares Square F Value Pr > FModel 18 673.212725 37.400707 50.39 0.0001Error 13 9.648825 0.742217Corrected Total 31 682.861550

Source DF Type III SS Mean Square F Value Pr > FA 1 0.021012 0.021012 0.03 0.8690B 1 0.405000 0.405000 0.55 0.4732C 1 0.610513 0.610513 0.82 0.3809D 3 665.516025 221.838675 298.89 0.0001A*B 1 0.556512 0.556512 0.75 0.4022A*C 1 0.011250 0.011250 0.02 0.9039A*D 3 1.064613 0.354871 0.48 0.7030B*C 1 0.427813 0.427813 0.58 0.4613B*D 3 1.435825 0.478608 0.64 0.5999C*D 3 3.164163 1.054721 1.42 0.2814

Only the main effect of D appears significantly different from zero at overall significance level 0.1.

10

Page 125: Solutions

d) Levels 0 and 1 of factor D represent temperatures −75◦F and 170◦F, respectively at sea level. Level2 of D represents −75◦F at 35,000 feet. Suppose the experimenters had been interested in two preplannedcontrasts. The first compares the effects of levels 0 and 1 of D, and the second compares the effects thelevels 0 and 2 of D. Using an overall level of at least 98%, give a set of simultaneous confidence intervalsfor these two contrasts.

Assume that we are intersted in just these two pre-planned contrasts. For an overall confidence levelof at least 98%, we calculate individual 99% confidence intervals for the two contrasts. Now, t13,0.005 =3.012, and using the SAS output below, the two confidence intervals are:

δ1 − δ0 : − 10.18± 3.012(0.431) = (−11.48,−8.88)

δ2 − δ0 : − 0.99± 3.012(0.431) = (−2.29, 0.31)

At an overall confidence level of 98%, the duration of thrust is between 8.8 and 11.4 seconds longerwhen level 0 of D is used than when level 1 is used. There does not appear to be a significant differencebetween the effects of levels 0 and 2.

T for H0: Pr > |T| Std Error ofParameter Estimate Parameter=0 Estimate

d1-d0 -10.1762500 -23.62 0.0001 0.43076017d2-d0 -0.9900000 -2.30 0.0388 0.43076017

e) Test the hypotheses that each contrast identified in part (d) is negligible. Be explicit about whichmethod you are using and your choice of the overall level of significance.

Using Bonferroni method at overall level at most 0.02 for the two tests, we reject H0 if

|lse/√

standard error| > t13,0.02/4 = 3.012 .

The least squares estimate and standard error are given on the SAS output in the solution to part(d). For H0 : {δ1 − δ0 = 0}, the value of the test statistic is 23.62 and we reject H0 at overall level≤ 0.02 and conclude that there is a significant difference in thrust duration between levels 0 and 1 oftemperature/altitude. For H0 : {δ2 − δ0 = 0}, the value of the test statistic is 2.30, so there is notsufficient evidence to conclude a difference between levels 0 and 2 of temperature/altitude.

Alternatively, we can draw the same conclusions by observing that 0 is not in the first confidenceinterval in part (d), but is in the second interval.

f) If the contrasts in part (d) had not been preplanned, would your answer to (d) have been different? Ifso, give the new calculations.

If these contrasts had not been pre-planned, we would need to use Scheffe confidence intervals. If onlycontrasts for main effects and interactions in the model are to be examined, then the numerator degreesof freedom would be the model degrees of freedom, 18.

Now v − 1=18, so√

(v − 1)F0.02,v−1,13 =√

18(3.15) = 7.53, so the confidence intervals are

δ1 − δ0 : − 10.18± 7.53(0.431) = (−13.43,−6.93)

δ2 − δ0 : − 0.99± 7.53(0.431) = (−4.24, 2.26)

The confidence 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 14seconds longer).

11

Page 126: Solutions

g) Although it may not be of great interest in this particular experiment, draw an interaction plot for theCD 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 showsthat 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 theyhave decided upon the important main effects and interactions?

If these interactions are included in the model, there are no degrees of freedom to estimate the errorvariance. A normal probability plot of the normalized contrasts or Voss-Wang method could be used toidentify important effects. Those effects lying off the straight line are likely to be significantly differentfrom zero. Note that factor D has 3 degrees of freedom, so the plot should include estimates for threeorthogonal contrasts in the levels of D. (Trend contrasts would not make sense here, since D does nothave 4 equally spaced levels). Similarly, each interaction involving D has three degrees of freedom.

12

Page 127: Solutions

Solution to Question 7.12— washing power experiment

a) The contrast coefficients are given by the following columns:

Trtmt lA qA lC qC lAlC lAqC qAlC qAqC

111 -1 1 -1 1 1 -1 -1 1112 -1 1 0 -2 0 2 0 -2113 -1 1 1 1 -1 -1 1 1121 -1 1 -1 1 1 -1 -1 1122 -1 1 0 -2 0 2 0 -2123 -1 1 1 1 -1 -1 1 1131 -1 1 -1 1 1 -1 -1 1132 -1 1 0 -2 0 2 0 -2133 -1 1 1 1 -1 -1 1 1211 0 -2 -1 1 0 0 2 -2212 0 -2 0 -2 0 0 0 4213 0 -2 1 1 0 0 -2 -2221 0 -2 -1 1 0 0 2 -2222 0 -2 0 -2 0 0 0 4223 0 -2 1 1 0 0 -2 -2231 0 -2 -1 1 0 0 2 -2232 0 -2 0 -2 0 0 0 4233 0 -2 1 1 0 0 -2 -2311 1 1 -1 1 -1 1 -1 1312 1 1 0 -2 0 -2 0 -2313 1 1 1 1 1 1 1 1321 1 1 -1 1 -1 1 -1 1322 1 1 0 -2 0 -2 0 -2323 1 1 1 1 1 1 1 1331 1 1 -1 1 -1 1 -1 1332 1 1 0 -2 0 -2 0 -2333 1 1 1 1 1 1 1 1

b) Using the formula for the variance of the contrasts in terms of coefficients for τijk (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 y3.. − y1.. = 104.796.

and LSE for the Quadratic A contrast (without divisors) is [y1.. + y3..]− 2y2.. = −78.2.

So the LSEs of the normalized contrasts are

LSE(lA) = 104.796/(√

18) = 24.70065

andLSE(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 shouldbe interpreted as: the contrast which compares the effect of the .2% detergent with that of the .05%detergent; and the contrast which compares the effect of the .1% detergent with the average effectsof 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

Page 128: Solutions

d) The least squares estimates of the normalized contrasts are listed under CONS. The contrast estimateswith divisor 27 are listed under EST1. NORM lists 27/

√18 etc., so that CONS = EST1*NORM.

Obs _NAME_ EST1 NORM CONS NSCORE

1 lA 3.88148 6.36396 24.7016 1.538982 lB 4.60370 6.36396 29.2978 1.980753 lC 2.15926 6.36396 13.7414 1.281554 qA -2.89630 3.67423 -10.6417 -1.980755 qB -2.35185 3.67423 -8.6413 -1.538986 qC -1.61852 3.67423 -5.9468 -1.08892

. . .

Plot of CONS*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.

30 + A||| A||

20 +||

CONS || A|

10 +||||| AA A A

0 + AAAAA A| A AAAAA| AA| A| A A| A

-10 +A-+-----------+-----------+-----------+-----------+--2 -1 0 1 2

Rank for Variable CONS

The plot indicates there are several effects that are are non-neglible, in particular, the three maineffects and quadratic for A.

14

Page 129: Solutions

e)

ss msq estimate msd .95 lb .95ublB 858.36055556 0.9194231 29.29779097 9.396882 19.900909 38.6946730lA 610.16888889 0.9194231 24.70159689 9.396882 15.304715 34.0984789lC 188.82722222 0.9194231 13.74144178 9.396882 4.344560 23.1383238qA 113.24518519 0.9194231 -10.64167210 9.396882 -20.038554 -1.2447901qB 74.67129630 0.9194231 -8.64125548 9.396882 -18.038138 0.7556266

lAqB 38.23361111 0.9194231 -6.18333333 9.396882 -15.580215 3.2135487qC 35.36462963 0.9194231 -5.94681676 9.396882 -15.343699 3.4500653

lAlB 26.70083333 0.9194231 -5.16728491 9.396882 -14.564167 4.2295971lAqC 9.81777778 0.9194231 -3.13333333 9.396882 -12.530215 6.2635487

lAlCqB 7.04166667 0.9194231 -2.65361389 9.396882 -12.050496 6.7432682qAqB 5.92675926 0.9194231 2.43449364 9.396882 -6.962388 11.8313757qAqC 3.92925926 0.9194231 -1.98223592 9.396882 -11.379118 7.4146461

lBqAqC 2.96055556 0.9194231 -1.72062650 9.396882 -11.117509 7.6762556lAlC 2.61333333 0.9461325 1.61658075 9.532395 -7.915815 11.1489762lBqA 2.50694444 0.9543162 -1.58333333 9.573533 -11.156866 7.9901995lCqA 1.86777778 1.0034829 1.36666667 9.817051 -8.450385 11.1837181

lAqBqC 1.50222222 1.0316026 -1.22565175 9.953648 -11.17930 8.727996qAqBqC 1.09796296 1.0626994 1.04783728 10.102557 -9.054719 11.1503940lAlBqC 0.80666667 1.0851068 -0.89814624 10.208509 -11.106655 9.3103630lBlC 0.80083333 1.0855556 -0.89489292 10.210620 -11.105513 9.3157268

lCqAqB 0.37555556 1.1182692 0.61282588 10.363328 -9.750503 10.9761543lBlCqA 0.16666667 1.1343376 0.40824829 10.437518 -10.029270 10.8457664lBqC 0.14694444 1.1358547 -0.38333333 10.444495 -10.827829 10.0611621lCqB 0.04694444 1.1435470 0.21666667 10.479802 -10.263136 10.6964689qBqC 0.01564815 1.1459544 0.12509256 10.490828 -10.365735 10.6159201

lAlBlC 0.00500000 1.1467735 -0.07071068 10.494576 -10.565287 10.4238654

The Voss-Wang method provides results that are consistent with the Normal prob. plot. The CIsfor effects B,A, C and Quadratic A don’t cover 0 and are therefore simultaneously statisticallysignficant.

15

Page 130: Solutions

Solution to Question 7.14 — Popcorn-robust experiment

a) Analyze the experiment as a mixed array, using a three-way complete model. Draw an ABTinteraction plot, similar to that of Figure 7.8, page 220. If the goal of the experiment is to find brand–oilcombinations that give a high percentage of edible kernels and that are not too sensitive to the poppingtime, what recommendations would you make?

Using a three-way complete model, the analysis of variance table is

The GLM ProcedureDependent Variable: PCPOP

Sum ofSource DF Squares Mean Square F Value Pr> FBRAND 2 562.666667 281.333333 4.57 0.0248OIL 1 79.506944 79.506944 1.29 0.2707TIME 2 708.791667 354.395833 5.76 0.0117BRAND*OIL 2 694.055556 347.027778 5.64 0.0126BRAND*TIME 4 1796.291667 449.072917 7.29 0.0011OIL*TIME 2 95.263889 47.631944 0.77 0.4760BRAND*OIL*TIME 4 187.986111 46.996528 0.76 0.5627Error 18 1108.125000 61.562500Corrected Total 35 5232.687500

There are seven hypotheses to be tested. If we select an overall probability of α ≤ 0.07 of at leastone Type I error, then we would use level 0.01 for each test. We would fail to reject the hypothesesof no BRAND*OIL*TIME interaction and no OIL*TIME interaction. We would reject the hypothesis of noBRAND*TIME interaction and we would want to examine this interaction. The p-value for testing noBRAND*OIL interaction is close to 0.01 so, although we cannot reject this hypothesis, it would be sensibleto examine this interaction also. However, the question asks us to examine the BRAND*OIL*TIME plotfirst. This is given below:

Obs TC TIME AVPC VARPC1 11 1 51.25 66.1252 11 2 78.50 50.0003 11 3 71.25 153.1254 12 1 55.50 24.5005 12 2 80.25 36.1256 12 3 84.50 4.5007 21 1 64.50 264.5008 21 2 61.50 18.0009 21 3 54.25 21.12510 22 1 80.00 72.00011 22 2 73.25 28.12512 22 3 61.75 1.12513 31 1 75.50 128.00014 31 2 84.75 1.12515 31 3 80.00 4.50016 32 1 60.00 162.00017 32 2 71.25 45.12518 32 3 81.75 28.125

16

Page 131: Solutions

AVPC |90 +

||| 31 12|| 32

80 +22 12 31| 11||31| 22| 32 11

70 +|||21|| 21 22

60 +32|||12 21||11

50 +-+-----------------------+-----------------------+-1 2 3

TIME

The plot shows quite a difference in the brand-oil lines across the times, However, the error variance inthis experiment is sufficiently large that these differences are not significant. The combination 31 (brand3, oil 1) looks to be a good combination with high average popping rate across all three times and fairlysmall variability across the times.

b) Does the store brand of popcorn differ substantially in terms of percentage of edible kernels fromthe average of the name brands? Do the different types of oil differ? State your overall confidence levelsor significance levels.

The contrasts to be estimated are α∗1 − 0.5(α∗2 + α∗3) and β∗1 − β∗2 , where α∗i is the effect of Brand iaveraged over the (almost) significant brand×time and brand×oil interactions; and where β∗j is the effectof oil j averaged over the brand×oil interaction.

From SAS, the contrast estimates are as follows. Suppose that we continue to test at level 0.01 foreach hypothesis.

StandardParameter 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 sufficient evidence to reject thenull hypothesis of no difference between the store brand and the average of the other two (averagedover oil and time). Similarly, we do not have sufficient evidence to reject the null hypothesis of nodifference between the oil types (averaged over brand and time). However, there is an indication of abrand×oil interaction, so the brand-oil combinations (averaged over time) should perhaps be compared(in particular, the difference between combination 31 and the others).

17

Page 132: Solutions

c) Analyze the experiment as a product array, and calculate the sample average and the log samplevariance percentage of popped kernels for each brand–oil combination. Draw AB interaction plots similarto those of Figure 7.9, page 223. If the goal of the experiment is still to find brand–oil combinationsthat give a high percentage of edible kernels and that are not too sensitive to the popping time, whatrecommendations would you make? How do your recommendations compare with those that you made inpart (a)?

Analysed as a product array, we calculate the average o the six observations at each combination ofbrand and oil, and also calculate the log sample variance. This gives

Obs BRAND OIL AVPC LNVAR1 1 1 67.0000 5.362232 1 2 73.4167 5.343493 2 1 60.0833 4.418144 2 2 71.6667 4.481495 3 1 80.0833 3.780586 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 combination31 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 +-+-----------------------+-----------------------+-BRAND1 2 3

18

Page 133: Solutions

Plot of AVPC*BRAND. Symbol is value of OIL.80 + 1

|||

AVPC |||2| 2| 2

70 +|||1|||||

60 + 1-+-----------------------+-----------------------+-BRAND1 2 3

19

Page 134: Solutions

Solution to Question 7.15 —Steel bar experiment

We will analyze the data with the outlier removed (observation y2234 = 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

Page 135: Solutions

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 assumptionThe order of observation is not given, so we cannot check the independence assumption.

21

Page 136: Solutions

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 ProcedureDependent Variable: Y

Source DF Sum of Squares F Value Pr > FModel 23 626.58333333 4.89 0.0001Error 71 395.41666667Corrected Total 94 1022.00000000

R-Square C.V. Y Mean0.613095 58.99814 4.00000000

Source DF Type III SS F Value Pr > FA 1 82.60388128 14.83 0.0003B 3 421.46444444 25.23 0.0001C 2 22.24253941 2.00 0.1433A*B 3 1.94444444 0.12 0.9502A*C 2 0.83375563 0.07 0.9280B*C 6 84.01749466 2.51 0.0290A*B*C 6 21.30916132 0.64 0.6996

For an OVERALL level of .05, we can conclude there is an effect due to heat (A) and machine (B)but no effects due to time (C) nor any (statistically significant) effect due to interaction. However, wenote the fairly small p-value for interaction of B and C.

22

Page 137: Solutions

d.)

10 +||

AV_Y | 3| 2|| 1

5 + 3 2 1|| 1||| 2| 1

0 +---+---------------+---------------+---------------+--

1 2 3 4Machine

NOTE: 3 obs hidden.

It appears machine 3 is most robust as the average lengths at each time (C) are closer than the averagelengths at each time for the other machines. Assuming the machines are identical in make and model, apossible cause for the difference in robustness could be age of the machine or the operator.

e.)

Least Squares Means

95% 95%Lower Upper

Confidence ConfidenceB Limit Y LSMEAN Limit1 2.456149 3.416667 4.3771852 5.235384 6.222222 7.2090613 -0.085518 0.875000 1.8355184 4.706149 5.666667 6.627185

It appears that machine 4 is closest to specifications.

23

Page 138: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 1020 August 2006

Solutions available in this file

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

Page 139: Solutions

Solution to Question 10.6 — Candle experiment

(a) Explain what block×treatment interaction means in the context of this experiment. Can you think ofany causes that might have led to the presence of interaction in the pilot experiment?

In this experiment, the treatments are the different candle colors and the blocks are the differentexperimenters. So a block×treatment interaction would indicate that the color of the candle affected thespeed of burning differently for each of the different experimenters. For example, the red candles may haveburned fastest for Tsai and Wheeler, the white fastest for Yang, and the yellow fastest for Schultz. Thepresence of the interaction could possibly have been caused by bias on the part of an experimenter. Forexample, one experimenter might have let the red candle burn past the designated mark, while blowingout 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) differences, as thedata for color 3 (blue) are mostly below the data for the other colors for all blocks, and the data for color1 (red) are mostly above the data for the other colors for all blocks. There probably does not exist acolor×experimenter (treatment×block) interaction, since the relative position of the data for each blockis 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

Page 140: Solutions

(c) Complete an analysis of variance table for the data using the block–treatment interaction model (??)for a general complete block design.

The block-treatment interaction model is as follows:

Yhit = µ + θ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 ProcedureDependent Variable: time

Sum ofSource DF Squares Mean Square F Value Pr > FModel 15 227824.7500 15188.3167 8.89 <.0001Error 48 82025.0000 1708.8542Corrected Total 63 309849.7500

Source DF Type I SS Mean Square F Value Pr > FSource DF Type III SS Mean Square F Value Pr > Fblock 3 151659.1250 50553.0417 29.58 <.0001color 3 60345.0000 20115.0000 11.77 <.0001block*color 9 15820.6250 1757.8472 1.03 0.4315

(d) Test the null hypotheses of negligible block×treatment interaction and, if appropriate, test the nullhypothesis of equality of treatment effects.

Using an overall significance level of at most 0.02, we test the effect on the response of the block×colorinteraction at individual level 0.01 and, if relevant, the effect of color at level 0.01. For the interaction,we test the hypothesis:

HθT0 : {(θτ)hi − (θτ)h. − (θτ).i + (θτ).. = 0 for all h, i}

against HθT1 :{ 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θT0 and there is not sufficent eveidence

to conclude a significant block×color interaction.Since there is not a signifcant block×color interaction, we can now test for differences in average

burning times between the colors; that is HT0 : {τ1 = τ2 = τ3 = τ4} against HT

1 : {at least two coloreffects differ}. The value of the test statistic msT/msE = 11.77 with a p-value of p < 0.0001 < 0.01.Therefore, we reject HT

0 and conclude that a statistically significant color (treatment) effect exists; thatis, we conclude that at least one of the colors burns at a different speed from the others.

(e) Use an appropriate multiple comparisons procedure to evaluate which color of candle is best. Interpretthe results.

These intervals were probably pre-planned, so we can use Bonferonni or Tukey methods to examinethe m = 6 pairwise comparisons. To determine which type of multiple comparisons to compute, we firstexamine the critical coefficients for each type of interval. The critical coefficients for confidence level level99% are:

wB = tn−vb,α/2m = t48,0.00083 = 3.3332

andwT = qv,n−vb,α/

√2 = q4,48,0.01/

√2 = 4.644/

√2 = 3.283.

3

Page 141: Solutions

We see that wT and wB are comparable, with wT just slightly smaller. Therefore, we compute all pairwisemultiple comparisons using Tukey’s method at an overall level of 99%.

The following output is produced by SAS:

The GLM ProcedureTukey’s Studentized Range (HSD) Test for TIME

NOTE: This test controls the Type I experimentwise error rate.Alpha 0.01Error Degrees of Freedom 48Error Mean Square 1708.854Critical Value of Studentized Range 4.64437Minimum Significant Difference 47.998

Comparisons significant at the 0.01 level are indicated by ***.

Difference SimultaneousCOLOR Between 99% Confidence

Comparison Means Limits1 - 4 14.25 -33.75 62.251 - 2 25.25 -22.75 73.251 - 3 81.00 33.00 129.00 ***4 - 2 11.00 -37.00 59.004 - 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 othercolors, but there is not a significant difference between the red (color 1), white (color 2) or yellow (color4) 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

Page 142: Solutions

Question 10.7— Salt water experimenta) Plot the data and interpret the results.

The following plot of average temperature for each salt level for each block indicates a linear trend inboiling point as the salt level increases. There may be some interaction between block and salt contraryto 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 effects.

With no block*salt interaction in the model, we have

The GLM ProcedureDependent Variable: TEMP

Sum ofSource DF Squares Mean Square F Value Pr > FModel 6 15.72088889 2.62014815 30.03 <.0001Error 38 3.31555556 0.08725146Corrected Total 44 19.03644444

Source DF Type III SS Mean Square F Value Pr > FBLOCK 2 0.14444444 0.07222222 0.83 0.4448SALT 4 15.57644444 3.89411111 44.63 <.0001

5

Page 143: Solutions

The hypothesis of equality of treatment (salt) means would be rejected for any reasonable choice ofsignificance level α.

c) Evaluate whether blocking was worthwhile and whether the assumption of no treatment–block in-teraction looks reasonable.

The mean square for Blocks (msθ) is less than msE, indicating blocking was not very beneficial.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 differences was not greatly reduced.

Although the interaction plot does indicate some interaction, we note (i) the size of the differencesbetween the blocks at each salt level is rather small and (ii) for each block, the same “story” is beingtold about the relationship between salt and temperature. We may conclude that the model with notreatment-block interaction is reasonable. The lack of the interaction term in the model may possiblyaccount for msE being larger than msθ.

d) Compute sums of squares for orthogonal trend contrasts, and test the trends for significance, usinga simultaneous error rate of 5%. Explain your results in terms of the effect of salt on the boiling point ofwater.

The contrast coefficients 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 QuarticSSC 12.996 1.786 0.784 0.0107

and msE ∗ t38,.005 = 0.2362694. Using Table A.2, the 95% simultaneous Bonferroni intervals are

Lower bound Upper boundLinear 2.956860 4.643140Quadratic 197.269050 199.264284Cubic -1.776474 -0.090193Quartic -1.941851 2.519628

So the Linear,Quadratic and Cubic trends are simultaneously significantly diferent from zero.

Alternatively, from SAS we obtain

Contrast DF Contrast SS Mean Square F Value Pr > FLINEAR 1 12.99600000 12.99600000 150.24 <.0001QUAD 1 1.78571429 1.78571429 20.64 <.0001CUBIC 1 0.78400000 0.78400000 9.06 0.0045QUARTIC 1 0.01073016 0.01073016 0.12 0.7265

Selecting individual significance level 0.05/4 = 0.0125, and comparing this with the p-values, we rejectthe hypotheses that the linear, quadratic and cubic trends are each negligible, but fail the reject thehypothesis that the quartic trend is negligible.

e) Calculate the number of observations needed per treatment if a test of equal ity of treatment effectsusing α = 0.05 is to have power 0.95 in detecting a difference of 1◦C when σ = 0.5◦C.

TO BE ADDED AT A LATER DATE

6

Page 144: Solutions

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 effects, since treatments 4, 5, and6 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 thecircumstances in which you would expect the assumptions to be valid.

A possible model for this experiment is the block-treatment model

Yhijk = µ + θh + τijk + εhijk (1)εhijk ∼ N(0, σ2)

εhijk′s are mutually independent

h = 1, . . . , 4; i = 1, . . . , 2; j = 1, . . . , 2; k = 1, . . . , 2 ,

where µ is a constant, θh is the effect of the hth lab, τijk is the effect of the treatment combination ijk,Yhijk is the random variable representing the measurement on treatment combination ijk observed inblock h, and εhijk is the associated random error.

The assumptions made are that the error variables are independent and normally distributed withmean zero and common variance σ2, and also that there is no interaction between treatments and labs. Ifthe labs are carefully controlled and use the same experimental procedures, there is no particular reasonwhy any one lab should favor any one treatment combination over another. So the assumption of notreatment×lab interaction is probably reasonable. (There are not sufficient degrees of freedom to be ableto measure a full interaction based on 32 degrees of freedom). If the experiment is conducted carefullyand the order of the treatment combinations randomized, the the error variables should be measuringonly random error, in which case the error assumptions should also be valid.

7

Page 145: Solutions

c) Check the assumptions on your model.

The error assumptions are checked through residual plots (shown below). There do not appear to beany serious outliers. The variability of the residuals appear to differ a little at the different levels of thetreatment factors and blocks but not drastically so. One can calcvulate the s2

i to check the discrepancy.The normality assumption seems fairly well satisfied. The assumption of no block-treatment interactionis checked via the plot in part a) and seems to be fairly well satisfied.

Plot of Z*TRT. Legend: A = 1 obs, B = 2 obs, etc.2 +| A| A| B A

Z | A| A A| A|A A A|B B A

0 +---------------------A---------------------------A| A|| A|A A A A A| A A A| A| A A|

-2 +-+------+------+------+------+------+------+------+1 2 3 4 5 6 7 8

TRT

Plot of Z*BLOCK. Legend: A = 1 obs, B = 2 obs, etc.2 +| A| A| A A A

Z | A| A A| A| A A A| B B A

0 +--------------B-----------------------------------| A|| A| A C A| A B| A| A A|

-2 +--+------------+------------+------------+---------1 2 3 4

BLOCK

8

Page 146: Solutions

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.

2 + || | A| | A| | AAA

Z | | A| | AA| | A| | AB| BBA

0 +-----------------------B+-------------------------| A || || A || ABB || AB || A || A A || |

-2 + |-+-----------+-----------+-----------+-----------+--4 -2 0 2 4

RANK FOR VARIABLE Z

d) Analyze the data and state your conclusions.

The analysis of variance table is shown below:

General Linear Models ProcedureDependent Variable: Y

Sum of MeanSource DF Squares Square F Value Pr > FModel 10 639.277500 63.927750 135.84 0.0001Error 21 9.882500 0.470595Corrected Total 31 649.160000

Source DF Type III SS Mean Square F Value Pr > FBLOCK 3 182.017500 60.672500 128.93 0.0001A 1 115.520000 115.520000 245.48 0.0001B 1 0.911250 0.911250 1.94 0.1786C 1 55.125000 55.125000 117.14 0.0001A*B 1 284.411250 284.411250 604.36 0.0001A*C 1 0.080000 0.080000 0.17 0.6843B*C 1 1.201250 1.201250 2.55 0.1251A*B*C 1 0.011250 0.011250 0.02 0.8786

There appears to be a large lab difference since the block mean square is 60.6725 compared withan error mean square of only 0.470595. Thus, it was good to use blocks in our model. If we test eachtreatment hypothesis at level α∗ = 0.01 (for an overall level of α = 0.07), we reject the null hypothesesof negligible AB interaction and negligible A and C main effects.

Let us suppose that the pre-plan was to calculate a 99% set of pairwise comparisons between thetreatment combinations using Tukey’s method, to calculate 99.5% intervals for the comparisons between

9

Page 147: Solutions

the levels of A, B and C if these were not involved in interactions and a set of 99% intervals using Scheffemethod for any other contrasts that look interesting. The overall confidence level would then be at least96.5%.

The results of the 99% Tukey intervals for pairwise comparisons of the treatment combinations areshown below:

The GLM ProcedureTukey’s Studentized Range (HSD) Test for Y

NOTE: This test controls the Type I experimentwise error rate.

Alpha 0.01Error Degrees of Freedom 21Error Mean Square 0.470595Critical Value of Studentized Range 5.79426Minimum Significant Difference 1.9874

Comparisons significant at the 0.01 level are indicated by ***.

DifferenceTRT Between Simultaneous 99%

Comparison Means Confidence Limits6 - 5 2.1750 0.1876 4.1624 ***6 - 4 2.9750 0.9876 4.9624 ***6 - 8 5.2750 3.2876 7.2624 ***6 - 3 6.1250 4.1376 8.1124 ***6 - 7 8.1500 6.1626 10.1374 ***6 - 2 9.7000 7.7126 11.6874 ***6 - 1 12.0000 10.0126 13.9874 ***5 - 4 0.8000 -1.1874 2.78745 - 8 3.1000 1.1126 5.0874 ***5 - 3 3.9500 1.9626 5.9374 ***5 - 7 5.9750 3.9876 7.9624 ***5 - 2 7.5250 5.5376 9.5124 ***5 - 1 9.8250 7.8376 11.8124 ***4 - 8 2.3000 0.3126 4.2874 ***4 - 3 3.1500 1.1626 5.1374 ***4 - 7 5.1750 3.1876 7.1624 ***4 - 2 6.7250 4.7376 8.7124 ***4 - 1 9.0250 7.0376 11.0124 ***8 - 3 0.8500 -1.1374 2.83748 - 7 2.8750 0.8876 4.8624 ***8 - 2 4.4250 2.4376 6.4124 ***8 - 1 6.7250 4.7376 8.7124 ***3 - 7 2.0250 0.0376 4.0124 ***3 - 2 3.5750 1.5876 5.5624 ***3 - 1 5.8750 3.8876 7.8624 ***7 - 2 1.5500 -0.4374 3.53747 - 1 3.8500 1.8626 5.8374 ***2 - 1 2.3000 0.3126 4.2874 ***

The objective of the experiment was to find the combination that gives the highest yield. From theresults of the Tukey confidence intervals, this would appear to be treatment 6, which corresponds totreatment combination 212.

Factor C is not involved in any significant interactions. The estimate for the main effect of factor C(high−low) is positive which suggests that the higher level of C gives the higher yield averaged over A

10

Page 148: Solutions

and B.

StandardParameter Estimate Error t Value Pr > |t|c2-c1 2.62500000 0.24253743 10.82 <.0001

A 99.5% confidence interval for the difference between the two levels of C is

2.625± t21,.0025 × 0.2425 = 2.625± 3.135× 0.2425 = 2.625± 0.760 = (1.865, 3.385) .

Factors A and B are involved in the AB interaction. An interaction plot shows that the highest yieldis obtained on average when A is at the high level and B at the low level. This agrees with the findingthat combination 212 should give the highest yield.

Plot of AVY*A. Symbol is value of B.20 +

| 1|||| 2

15 +| 2|

AVY |||

10 + 1|||||

5 +--+--------------------------------+---------------1 2

A

11

Page 149: Solutions

Question 10.10 — Length perception experiment

a) Fit a block–treatment model to the data using subjects as blocks and with six treatments representingthe shape–area combinations. Check the error assumptions on your model.

The model for the experiment is the block-treatment model for the randomized block design is

Yhi = µ + θh + τi + εhi , (2)εhi ∼ N(0, σ2) ,

εhi′s are mutually independent ,

h = 1, . . . , 14; i = 1, . . . , 6 ,

where µ is a constant, θh is the effect of the hth subject (block), τi is the effect of the ith treatment, Yhi

is the random variable representing the measurement on treatment i observed in block h, and εhi is theassociated random error.

The six treatment combinations 11, 12, 21, 22, 31, 32 are labelled 1, 2, 3, 4, 5, 6 in the plots shownbelow. From the plot of standardized residuals z against the predicted values y, we see little evidence ofvariance changing with the mean, outliers or other problems, although the plot of standardized residualsversus subjects indicates a possible unequal variances from subject to subject. The ratio of maximumto minimum sample variance of the data for the subjects is 0.49069/0.03436 = 11.9. We do not haveinformation on the variability within each subject treatment/cell, but we should treat our analysis withsome caution since the equal variance assumption may not be exactly satisfied.

However, the variability of the data is very similar for all treatments averaged over subjects, soSatterthwaite’s approximation will not have much effect on the treatment comparisons and we continueusing the traditional analysis.

Level of Level of --------------Y--------------SHAPE AREA N Mean Std Dev1 1 14 0.31071429 0.701421241 2 14 -0.30714286 0.475093982 1 14 0.17500000 0.692195502 2 14 -0.06785714 0.854986993 1 14 0.09285714 0.715449603 2 14 -0.13928571 0.84425173

12

Page 150: Solutions

Plot of Z*PRY. Legend: A = 1 obs, B = 2 obs, etc.|| A|

2 + A A| A A| A A A A A

Z | AA A A A| AA BA ABB BA| B A AA A A A A A

0 + A A AA A A| A A AC AAB AA A A| A A AB B A| A AA A A AA| A A AA A A| A

-2 + A A A A||-+-----------+-----------+-----------+-----------+--2 -1 0 1 2

PRY

Plot of Z*SUBJECT. Symbol is value of TRT.Z ||| 4

2 + 6 1 1| 3 1 3 4 4| 3 6 2 4 2 3| 5 1 2 5 2 6 5 2 4 3 3 5

0 +-2--5-----2--5--5--2--2-----------2--6--2---------| 1 1 1 1 1 1 1 5 2 1| 3 1 6 4 2 3 3 1 4 6| 4 2 5 5

-2+ 4 4 3 6||--+--+--+--+--+--+--+--+--+--+--+--+--+--+---------1 2 3 4 5 6 7 8 9 10 11 12 13 14

SUBJECTNOTE: 19 obs hidden.

13

Page 151: Solutions

Plot of Z*TRT. Legend: A = 1 obs, B = 2 obs, etc.Z ||| A

2 + B A| A B B A| B C A A| A C B C E D

0 +----------F--------A-----------------C--------C---| H A B C A| B A E B C| A A B

-2 + A B A||--+--------+--------+--------+--------+--------+---1 2 3 4 5 6

TRT

The normality assumption seems to be reasonable. We cannot check independence since the orderinformation is not available.

Plot of Z*NSCORE. Legend: A = 1 obs, B = 2 obs, etc.4 + || || || || | A| |

2 + | AA| | B| | ACA

Z | | CB| | EDD| |DF

0 +------------------------EA------------------------| BFEA| ADC || ACC || ACB || A |

-2 + A AAA || |-+-----------+-----------+-----------+-----------+--4 -2 0 2 4

Rank for Variable Z

b) Draw at least one graph and examine the data.

One possible plot is a plot of the data against subject with the points labelled by treatment number.Although the plot gives no indication of error variability, it does indicate that there may be some subjectsby treatment interaction. Note that there are a lot of hidden observations in this plot. We would need tomake the plot larger to see all the data. This experiment is not sufficiently large to incorporate a subjectby treatment interaction in the model, but it should be borne in mind that the block-treatment modelmay not be exactly correct and the error mean square may be inflated.

14

Page 152: Solutions

Plot of Y*SUBJECT. Symbol is value of TRT.2 +| 3| 1|| 5 1 4|

1 + 4| 3 1 1| 1 4 4

Y | 1 4 3 3| 5 2 2 6 5| 1 2 1 6 1 5 3

0 + 6 3 2 1 3| 2 2 2 1 2 1| 3 3 3 2 6| 4 4 3| 1 2 2 2| 2 1

-1 + 6 6| 6| 4 2| 4||

-2 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+---------1 2 3 4 5 6 7 8 9 10 11 12 13 14

SUBJECTNOTE: 25 obs hidden.

c) Write down contrasts in the six treatment combinations representing the following comparisons:(i) differences in the effects of area for each shape separately, (ii) average difference in the effects ofarea, (iii) average difference in the effects of shape.

In terms of the six treatment effects, the contrasts of interest are:

(i) Area difference for each shapeSquare: τ1 − τ2

Circle: τ3 − τ4

Triangle: τ5 − τ6

(ii) Area difference on average (τ1 + τ3 + τ5 − τ2 − τ4 − τ6)/3

(iii) Shape differences on averageSquare–circle : (τ1 + τ2 − τ3 − τ4)/2Square–triangle : (τ1 + τ2 − τ5 − τ6)/2Circle–triangle: (τ3 + τ4 − τ5 − τ6)/2

15

Page 153: Solutions

d) Give a set of 99% simultaneous confidence 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 preplannedand use Bonferonni’s method. From SAS:

The GLM ProcedureDependent Variable: YParameter Estimate Error t Value Pr > |t|SHP1 AREA 2-1 0.61785714 0.16044891 3.85 0.0003SHP2 AREA 2-1 0.24285714 0.16044891 1.51 0.1350SHP3 AREA 2-1 0.23214286 0.16044891 1.45 0.1527

Each confidence interval should be of the form

estimate± t65,0.01/6 ∗ Standard error

The error degrees of freedom are n− b− v + 1 = 6 ∗ 14− 14− 6 + 1 = 65. The critical coefficient ist65,0.01/6 = 3.0477, so the three confidence 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 difference in the effects of the area for circle ortriangle, but that for the square the small square causes the line to be drawn between 0.129 cm and 1.107cm larger than the large square.

e) Under what conditions would the contrasts in c(ii) and c(iii) be of interest? Do these conditions holdfor this experiment?

The contrasts in c(ii) and c(iii) would be of interest if the shape by area interaction is not significantlydifferent from zero. From the following analysis of variance table, we see that we would fail to reject thenull hypothesis of no interaction at any significance level smaller than .16 and so these contrasts wouldbe of interest.

The GLM ProcedureDependent Variable: Y

Sum ofSource DF Squares Mean Square F Value Pr > FModel 18 32.81690476 1.82316138 10.12 <.0001Error 65 11.71345238 0.18020696Corrected Total 83 44.53035714

Source DF Type III SS Mean Square F Value Pr > FSUBJECT 13 29.26869048 2.25143773 12.49 <.0001SHAPE 2 0.08589286 0.04294643 0.24 0.7886AREA 1 2.78678571 2.78678571 15.46 0.0002SHAPE*AREA 2 0.67553571 0.33776786 1.87 0.1617

16

Page 154: Solutions

Question 10.12 — Biscuit experiment

a) State a suitable model for this experiment and check that the assumptions on your model hold forthese data.

The block-treatment model is

Yhijt = µ + bh + τij + εhijt;h = 1, .., 4; i = 1, 2, 3; j = 1, 2, 3; t = 1, 2

εhijt ∼ N(0, σ2)

where bh is the effect due to block h and τij is the effect due to treatment combination ij (height, kneadingtime).

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

Page 155: Solutions

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 satisfied.

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 isbest.

The Tukey pairwise comparisons at level 95% show that treatment combinations 11, 12, and 13 are allsignificantly different from the other treatment combinations (averaged over blocks). Since the differencesare positive, we can conclude that a smaller initial height leads to a higher percentage increase in heightand hence fluffier biscuits. For height 1 we see no significant differences in the effect of different kneadingtimes. However, each contrast of treatment combination 13 versus each other treatment combination ispositive and large. Thus, it looks as though a longer kneading time may be beneficial and this shouldperhaps be studied further in a follow-up experiment.

18

Page 156: Solutions

General Linear Models ProcedureTukey’s 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.550Minimum Significant Difference= 38.337

Comparisons significant at the 0.05 level are indicated by ’***’.

Simultaneous SimultaneousLower Difference Upper

TC Confidence Between ConfidenceComparison Limit Means Limit13 - 12 -23.65 14.69 53.0213 - 11 -17.44 20.90 59.2413 - 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.5512 - 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.0921 - 22 -14.90 23.44 61.7721 - 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.0223 - 33 -3.41 34.93 73.2623 - 32 -1.86 36.48 74.8123 - 31 5.93 44.26 82.60 ***22 - 33 -8.10 30.24 68.5722 - 32 -6.55 31.79 70.1222 - 31 1.24 39.57 77.91 ***33 - 32 -36.79 1.55 39.8933 - 31 -29.00 9.34 47.6732 - 31 -30.55 7.79 46.12

19

Page 157: Solutions

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 showson average, biscuits in Block 1 were not as fluffy. Blocking was probably worthwhile.

General Linear Models ProcedureDependent Variable: YSource DF Sum of Squares F Value Pr > FModel 11 317818.006250 50.88 0.0001Error 60 34070.516944Corrected Total 71 351888.523194

Source DF Type I SS F Value Pr > FBLOCK 3 4254.129306 2.50 0.0682TC 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 4BLOCK

20

Page 158: Solutions

Question 10.16 – Exam paper experimenta) Plot the data for each treatment combination in each block. Can you conclude anything from looking

at the data plots?

In block=1Plot 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

tcIn 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

Page 159: Solutions

As seen in the above plots, the data in blocks 2 and 3 are mostly between 50 and 100 with a fewlow scores. In block 1, the data a re perhaps more evenly spread. it is not clear that the equal varianceassumption is approximately satisfied.

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

Yhit = µ + θ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 ProcedureDependent Variable: score

Sum ofSource DF Squares Mean Square F Value Pr > FModel 4 1159.54816 289.88704 0.85 0.4934Error 125 42402.02876 339.21623Corrected Total 129 43561.57692

Source DF Type III SS Mean Square F Value Pr > Fblock 2 259.3146437 129.6573219 0.38 0.6831color 1 27.5663936 27.5663936 0.08 0.7761version 1 818.7570356 818.7570356 2.41 0.1228

Individual tests for the effects of color and version are each insignificant since there p-values ore verylarge. Thus, we conclude that both color and version have negligible effect on the test scores. Blockingby teaching assistants did not increase the power of the tests for this experiment since msθ < msE..

22

Page 160: Solutions

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

Page 161: Solutions

The plot of the standardized residuals versus the predicted values shows no particular pattern. Thereis 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

Page 162: Solutions

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 tobe 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 verifies that the independence assumption has notbeen violated.

25

Page 163: Solutions

d) If the same teaching assistant had been assigned to all three classes, should the experiment stillhave been designed as a block design? Discuss.

Yes, the experiment should still be a block design. Even though the same teaching assistant wouldhave proctored all three exams, there may still be an order effect. Suppose one exam was given at9:00AM and another was given later in the afternoon, we must account for the possibility that studentsfrom the earlier sections spoke with the students in the later sections, or that students may be tired laterin the day.. Furthermore, we must account for environmental differences between the three classrooms;for example, one classroom may be excessively hot or cold.

26

Page 164: Solutions

Design and Analysis of ExperimentsAngela Dean and Daniel Voss

Solutions to Chapter 1212 February 2003

Solutions available in this file

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

Page 165: Solutions

Solution to Question 12.6 - Video Game Experiment

(a) Model: Yhqi = µ + θh + φq + τi + εhqi

εhqi ∼ N(0, σ2)εhqi’s mutually independenth = 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 standardizedresiduals again the days (column block), and a plot of the standardized residuals again the order (rowblock). Each plot is randomly distributed about zero, thus indicating that there does not exist a problemof lack of fit. This model appears to be appropriate for this data.

The SAS System 616: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

Page 166: Solutions

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

Page 167: Solutions

Below is a plot of the standardized residuals vs. the predicted values. Again, the residuals appearto be randomly distributed about zero. There do not appear to be any strong increasing or decreasingtrends 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

Page 168: Solutions

(b) A plot of the adjusted data vs the treatment levels is presented below. Based on this plot, itappears that Professor Wardrop’s scores are lower for treatment 1 than for the other four treatmend;Professor Wardrop’s scores are approximately equal for treatments 2,3,4, and 5, after adjusting for thetwo 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 ProcedureDependent Variable: Y

Sum ofSource DF Squares Mean Square F Value Pr>FModel 12 4094.720000 341.226667 2.34 0.0774Error 12 1748.720000 145.726667Corrected Total 24 5843.440000

R-Square Coeff Var Root MSE Y Mean0.700738 12.93584 12.07173 93.32000

Source DF Type III SS Mean Square F Value Pr>Forder 4 514.240000 128.560000 0.88 0.5033day 4 1711.440000 427.860000 2.94 0.0661trt 4 1869.040000 467.260000 3.21 0.0523

(d) To evaluate whether or not blocking was effective, we must compare the mean square for eachblocking factor to the msE. For the blocking factor of day, msφ/msE = 427.86/145.726667 = 2.9360which is relatively large. So we would conclude that the day block was effective. Similarly, for theblocking factor of order, msθ/msE = 128.56/145.72667 < 1. Since the ratio is less than 1, we wouldconclude that the use of order for blocking was not effective.

5

Page 169: Solutions

(e) Using Scheffe’s Method, simultaneous 95% confidence intervals for all pairwise comparisons as wellas the ”music vs. no music” and ”game sounds vs. no game sounds” contrasts are

∑i

diτi ∈∑

i

diτi ± w

√V ar(

∑i

diτi)

where w =√

(v − 1)Fv−1,bc−b−c−v+2,α and, for these data, w =√

4 ∗ F4,12,.05 =√

4 ∗ 3.2592 = 3.6106 .

From SAS, the 95% simultaneous confidence intervals for all pairwise differences are:

τ1 − τ2 ∈ (−49.366574, 5.766574)τ1 − τ3 ∈ (−45.366574, 9.766574)τ1 − τ4 ∈ (−43.566574, 11.566574)τ1 − τ5 ∈ (−52.566574, 2.566574)τ2 − τ3 ∈ (−23.566574, 31.566574)τ2 − τ4 ∈ (−21.766574, 33.366574)τ2 − τ5 ∈ (−30.766574, 24.366574)τ3 − τ4 ∈ (−25.766574, 29.366574)τ3 − τ5 ∈ (−34.766574, 20.366574)τ4 − τ5 ∈ (−36.566574, 18.566574)

Since each of the confidence intervals contains zero, we conclude that there does not exist a statisticallysignificant difference between any of the treatments, at an overall level of 95%

The confidence interval for the ”music vs. no music” contrast 13 (τ1 + τ2 + τ3)− 1

2 (τ4 + τ5) is:

∑i

diτi ∈ {∑

i

diτi ± w

√V ar(

∑i

diτI)}

= − 7.30± 3.6106 ∗ 4.92826316 = (−25.0942, 10.4942) .

Since this confidence interval contains zero, we conclude that there does not exist a statisticallysignificant difference between the music and no music treatment conditions.

And the confidence interval for the ”games sound vs. no game sound” contrast 14 (τ1 +τ2 +τ3 +τ4)−τ5

is:

∑i

diτi ∈ {∑

i

diτi ± w

√V ar(

∑i

diτI)}

= − 11.1± 3.6106 ∗ 6.03586503 = (−32.8934, 10.6934) .

Since this confidence interval contains zero, we conclude that there does not exist a statisticallysignificant difference between the games sounds and no game sounds treatment conditions.

The GLM ProcedureLeast Squares Means

Adjustment for Multiple Comparisons: Scheffe

LSMEANtrt Y LSMEAN Number1 77.200000 12 99.000000 23 95.000000 34 93.200000 45 102.200000 5

6

Page 170: Solutions

Least Squares Means for effect trtPr > |t| for H0: LSMean(i)=LSMean(j)

Dependent Variable: Yi/j 1 2 3 4 5

1 0.1528 0.3051 0.4014 0.08312 0.1528 0.9903 0.9621 0.99583 0.3051 0.9903 0.9996 0.92084 0.4014 0.9621 0.9996 0.84095 0.0831 0.9958 0.9208 0.8409

trt Y LSMEAN 95% Confidence Limits1 77.200000 65.437370 88.9626302 99.000000 87.237370 110.7626303 95.000000 83.237370 106.7626304 93.200000 81.437370 104.9626305 102.200000 90.437370 113.962630

Least Squares Means for Effect trtDifference Simultaneous 95%

Between Confidence Limits fori j Means LSMean(i)-LSMean(j)1 2 -21.800000 -49.366574 5.7665741 3 -17.800000 -45.366574 9.7665741 4 -16.000000 -43.566574 11.5665741 5 -25.000000 -52.566574 2.5665742 3 4.000000 -23.566574 31.5665742 4 5.800000 -21.766574 33.3665742 5 -3.200000 -30.766574 24.3665743 4 1.800000 -25.766574 29.3665743 5 -7.200000 -34.766574 20.3665744 5 -9.000000 -36.566574 18.566574

The GLM ProcedureDependent Variable: Y

StandardParameter Estimate Error t Value Pr > |t|music -7.3000000 4.92826316 -1.48 0.1643game 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 significant difference between any of the treatment conditions, and thus no treatment conditionproduces better scores than any other treatment condition. Thus, it does not matter which sound modeProfessor Wardrop uses.

7

Page 171: Solutions

*Chapter 12;*Exercise 6 - Video Game Experiment;

options linesize=72;

data video;input order day trt Y;cards;1 1 1 941 2 3 1001 3 4 981 4 2 1011 5 5 1122 1 3 1032 2 2 1112 3 1 512 4 5 1102 5 4 903 1 4 1143 2 1 753 3 5 943 4 3 853 5 2 1074 1 5 1004 2 4 744 3 2 704 4 1 934 5 3 1065 1 2 1065 2 5 955 3 3 815 4 4 905 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

Page 172: Solutions

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

Page 173: Solutions

Solution to Question 12.10, Quantity Perception Experiment

a) The subjects in this study may possibly be representative of the students from The Ohio StateUniversity. However, we should be cautious about this conclusion since only those students who frequentthe Ohio Union had the opportunity to take part in the study. There may be slection bias on the part ofthe 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 allowedto view the experiment in progress with a previous subject, they did not have the chance to rememberthe true number of candies in advance.

The conclusions of the study may not be relevant to people in general since the students who are fromthe Ohio Union hallway are likely to be different from the general population in the country because ofthe difference 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 (subjects3 and 14) whose standardized residuals are around 4.

The SAS System3

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

Page 174: Solutions

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

Page 175: Solutions

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

Page 176: Solutions

c) The model for the experiment is the row-column-treatment model for the 2-replicate Latin squaredesign:

Yhqi = µ + θ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 effect of the hth row block (sublect), φq is the effect of the qth columnblock (time order), τi is the effect of the ith treatment, (φτ)qi is the effect of the interaction of theqth time order and ith treatment, Yhqi is the random variable representing the (true number - guessednumber)/(true number) for treatment i observed for subject h and time order q, and εhqi is the associatedrandom error.

The analysis of variance table obtained from SAS (after omitting the two outliers) is

The GLM ProcedureDependent Variable: Y

Source DF Type III SS Mean Square F Value Pr > FSUBJ 17 2.02359502 0.11903500 6.88 <.0001ORDER 8 0.31489067 0.03936133 2.28 0.0330TRTMT 8 1.09980189 0.13747524 7.95 <.0001ORDER*TRTMT 63 1.38403721 0.02196884 1.27 0.1724Error 63 1.08946693 0.01729313Corrected Total 159 9.09581904

We choose overall significant level α = 0.04, and split it into divide it between four hypotheses tests.i) Hintera

0 : no interaction between time order and treatment. We

reject Hintera0 if msOT/msE > F64,64,.01 = 1.8004.

Since msOT/msE = 0.0220/0.0173 = 1.27 < 1.8004, we fail to reject H0 at significant level α = 0.01and there is not sufficient eveidence to conclude an interaction between column block factor (order) andtreatment.

ii) HT0 : all 9 treatments have the same efffect on the response.

Reject HT0 if msT/msE > F8,64,.01 = 2.8027.

From the SAS output above, msT/msE = 0.1375/0.0173 =7.95 > 2.8027, we reject H0 at significancelevel α = 0.01 and conclude that the combination of true number of candies and color do not all havethe same effect on the abilities of subjects to count them.

iii) We would now like to test H0: Quadratic trend of number equals zero and we wouldReject H0 if ssC/msE > F1,64,.01 = 7.0483.

Similarly, we would like to test H0: Linear trend of color equals zero and we wouldReject H0 if ssC/msE > F1,64,.01 = 7.0483. S

When the two outliers are removed, the usual coeffcients in the Appendix are no longer the correctcooefficents due to the unequal number of observations per treatment. We would need to calculate thecoefficients specially for this situation. If we make all tests including the two outliers, we find the sameconclusions as above and the linear trend due to number is significantly different from zero at level 0.01.

13

Page 177: Solutions

Source DF Type III SS Mean Square F Value Pr > FSUBJ 17 1.97988929 0.11646408 4.73 <.0001ORDER 8 0.32674684 0.04084336 1.66 0.1261TRTMT 8 1.09932801 0.13741600 5.58 <.0001ORDER*TRTMT 64 1.54244613 0.02410072 0.98 0.5342Error 64 1.57607923 0.02462624Corrected Total 161 9.61972136

Contrast DF Contrast SS Mean Square F Value Pr > FNUMBER LINEAR 1 0.90715809 0.90715809 36.84 <.0001NUMBER QUADRATIC 1 0.06966527 0.06966527 2.83 0.0975

Although we are not testing whether the block effects equal zero or not, by comparing the meansquare of ORDER and SUBJECT with mean square error, we conclude that it was worthwhile to create thetwo 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 significance level of 0.06(0.01 for each test), we conclude that there is no significant interaction effect of ORDER by NUMBERby COLOR. There is no NUMBER by COLOR interaction effect. The interaction effects of ORDER byNUMBER and ORDER by COLOR are not significant at individual levels 0.01. The different numbersof candies do affect the subjects abilities to count them (consistent with the linear trend found above),whereas the different colors have no effect.

The GLM ProcedureDependent Variable: Y

Source DF Type III SS Mean Square F Value Pr > FSUBJ 17 2.02359502 0.11903500 6.88 <.0001ORDER 8 0.31712431 0.03964054 2.29 0.0319NUMBER 2 0.94356973 0.47178487 27.28 <.0001COLOR 2 0.03389871 0.01694935 0.98 0.3809NUMBER*COLOR 4 0.08376415 0.02094104 1.21 0.3151ORDER*NUMBER 16 0.45154695 0.02822168 1.63 0.0863ORDER*COLOR 16 0.47166600 0.02947912 1.70 0.0689ORDER*NUMBER*COLOR 31 0.46256507 0.01492145 0.86 0.6676Error 63 1.08946693 0.01729313Corrected 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 different effects on the response, from

the standardized residual plot in part b), it seems that response from treatment 2, 5 and 8 seems havelarger variance than the others in general. Thus one possible followup experiment we might want tostudy is that does ’Orange’ color especially influence the guessed number of candies.

Checklist

i) Define the objective of the experiment.The experiment is to study the effects 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

Page 178: Solutions

study, so we will select a location at the other end of the campus, but still frequented by many differenttypes 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 previoussubjects 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 effect of different colors, we stillhave the two treatment factors as NUMBER and COLOR. But we will have only 2 levels of NUMBER13 and 37, and 4 levels of COLOR as: yellow, brown, orange and green. Thus there are total 8 treatmentcombinations.

Block factors. As before, we still have two block factors: subject and order. Since we have 8 treatmentcombinations 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 thetreatment combination as before.

15