Chapter 4: Randomized blocks Petter Mostad
[email protected]
Blocking and randomization • Last time: Comparing the expectations of several populations. • Earlier: The idea of blocking: Controlling a parameter in such a way that its influence on the estimation of the effect of another factor is minimized. • The use of randomization.
Example • The yield in a process for manufacturing penicillin is investigated. • Yield is influenced by treatment A, B, C, D (columns) This effect is of interest. • Yield is also influenced by blend 1,2,..,5 (rows) This effect is not of interest. • (Example from Box, Hunter, Hunter: Statistics for Experimenters)
89 88 97 94
Example, cont.
84 77 92 79 81 87 87 85 87 92 89 84
Original data
79 81 80 88 + 3 + 2 11 + 8 −2 −5 +1 −7
−9 +1 +6 −5
+6 +1 +3 −6
Data minus grand mean
+6 +6 +6 +6
−7 −3 −1 = −1 −2 +2 +2 −4
−3 −1 +2 −4
−3 −1 +2 −4
Row means minus grand mean
− 2 −1 3 0
−3 −2 −1 + − 2 +2 −2 −4 −2
−1 −1 −1 −1
3 3 3 3
−1 − 3 + 2 + 2
0 +3 0 + −2 0 +1 0 −1
Column means minus grand mean
−5 +3 +5 0
+6 −2 −2 −5
−4 0 −4 +6
Residuals
Sums of squares • The sums of squares for treatments, for blocks, the total sum of squares and the error sum of squares are defined similarly to before. • They add up, as before.
Degrees of freedom • The degrees of freedom for each sum of squares is defined similarly to before • They add up, as before!
Example, cont. +3 −2 −5 +1
+2 −9 +1 +6
11 +6 +1 +3
+8 +6 −7 −3 −1 = −1 −2 +2
−7 −5 −6 + 2
+6 −3 −1 +2
+6 −3 −1 +2
+6 −2 −3 −2 −1 + − 2 +2 −2
−4 −4 −4 −4
−1 −1 −1 −1
3 3 3 3
0 −1 0 +3 0 + −2 0 +1
− 2 −1 3 0
−3 −5 +3 +5
−1 0
+2 +6 −2 −2
−5 +6
Sums of squares: 560
=
264
+
70
+
226
Degrees of freedom: 19
=
4
+
3
+
+2 −4 0 −4
12
Mean squares, and test statistic • As before, the mean squares are the sums of squares divided by their respective degrees of freedom • The test statistic is as before the mean square for the treatments divided by the mean square for the errors.
ANOVA table
The hypothesis test • Assumptions: We have independent random samples from normal distributions with the same variance, and each expectation is a sum of a group mean and a block mean. • Null hypothesis: The group means are the same. Alternative hypothesis: At least two are different. • Test statistic as abovehas; it has, under the null hypothesis, an F distribution with degrees of freedom found in the ANOVA table • Reject for large values of the test statistic.
Checking the assumptions • Check that it is reasonable to assume that the data are independent random samples • Check the RESIDUALS to see if the group variances seem to be similar, if the data seem to be normally distributed, and check for independence of experimental runs.
Table 4.3 (p. 125)
Randomized Complete Block Design for the Vascular Graft Experiment
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Table 4.4 (p. 125)
Analysis of Variance for the Hardness Testing Experiment
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Figure 4.4 (p. 129)
Normal probability plot of residuals for Example 4-1.
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Figure 4.5 (p. 129)
Plot of residuals versus yij for Example 4-1.
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Figure 4.6 (p. 129)
Plot of residuals by extrusion pressure (treatment) and by batches of resin (block) for Example 4-1.
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
How to conclude – handling multiple testing • If the p-value is small, it is customary to reject the null hypothesis and declare that there is a difference between some of the group effects. • To find which ones, you may need to do pairwise testing, which can lead to problems with multiple testing. • Ways to handle this exist: See textbook.
Additivity • The null hypothesis means that the effects of the blocks and of the treatments are additive! • Whether there is an effect from the treatments is checked under this assumption • If there is an interaction between the treatment and block effects, use factorial designs!
Missing data • The computational formulas above reqire that there is exactly one observation for each combination of block and treatment. • In practice, there may be missing data. • Possible to interpolate, however, it is unnecessary: Use instead a formulation of a linear model, and computer computations!
Linear models • In general, we can ”explain” our data as a linear combination of unknown parameters, plus an ”error term” that is normally distributed, with a fixed unknown variance. • Such models are examples of linear models. • General mathematical solutions make it possible to test values and equalities of parameters. • The methods we discuss above and below are special cases, where the math is simpler. • When there is missing data, it is still possible to use the general framework of linear models.
Controlling for more than one factor • Above, we investigated one factor, and controlled for another. • One may also control for two or more factors. • The trick is to construct an experiment where each controlled factor has a neutral influence on the estimation of the effect of interest.
Latin squares • They are squares that indicate how to set various factors when performing an experiment. • They are usually written with latin letters, whence the name. • They can fairly easily be constructed for different sizes.
Example • Car pollution of a certain type depend on several factors: Car type, driver, and additives in the fuel. Assume we have 4 different cars, 4 different drivers, and 4 different additives. • How can we test if there is an effect from the additives, while neutralizing the (additive) effects from the cars and drivers?
A B D C
Example
D C A B
B
D C
A
C
A
D
B
Experimental plan
−1 4 3 6 −1 3 4 − 1 10 −1 = −5 −6 −5 −4 −1 −1 − 2 −1 − 4 −1
0 0 0 0
Sums of squares: 312 = 24 Degrees of freedom: 15 = 3
−1 −1 −1 −1
Data
19 24 23 26 23 24 19 30 15 14 15 16 19 18 19 16
2 3 3 3 3 − 2 2 −1 1 −1 −1 2 0 2 4 4 4 4 −1 1 − 2 2 1 −1 − 2 2 + + + −5 −5 −5 −5 −1 0 2 2 −1 1 − 2 0 1 −2 −2 −2 −2 2 1 − 2 2 −1 1 2 0 −3
+
216
+
40
+
32
+
3
+
3
+
6
Table 4.8 (p. 136)
Latin Square Design for the Rocket Propellant Problem
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Table 4.9 (p. 137)
Analysis of Variance for the Latin Square Design
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery
Table 4.11 (p. 139)
Analysis of Variance for the Rocket Propellant Experiment
Design and Analysis of Experiments, 6/E by Douglas C. Montgomery