Chapter 5: Factorial designs Petter Mostad mostad@chalmers.se Experiments Actively making changes and observing the result, to find causal relationships. Many types of experimental plans Measuring response over a range of values Searching for factors influencing a result Make sure experiment is likely to answer your questions. Adapt the experiment to the question you want to ask! 1
Factorial designs A number of factors are selected: They can be set by the experimenter, and they are suspected to influence the measured outcome Two or more levels are selected for each factor. The experiment is performed using all combinations of all factor levels The experiment may be replicated n times for each combination of factor levels. All other factors, including time should be randomized! Why use factorial designs? Efficient way to estimate the effect of Efficient way to estimate the effect of varying the factors Effect is estimated averaged over other factors Interaction effects may be detected Computations are simple (with equal number of replications for each setting) 2
Some Basic Definitions Definition of a factor effect: The change in the mean response when the factor is changed from low to high A y y 40 + 52 20 + 30 = + = = 21 A A 2 2 B y y 30 + 52 20 + 40 = + = = B B 11 2 2 52 + 20 30 + 40 AB = = 1 2 2 5 The Case of Interaction: A y y 50 + 12 20 + 40 = + = = A A 1 2 2 B y y 40 + 12 20 + 50 = + = = 9 B B 2 2 12 + 20 40 + 50 AB = = 29 2 2 6 3
Regression Model & The Associated Response Surface y = β + β x + β x + β x x + ε 0 1 1 2 2 12 1 2 The least squares fit is yˆ = 35.5 + 10.5x + 5.5x + 0.5x x 35.5 + 10.5x + 5.5x 1 2 1 2 1 2 7 The Effect of Interaction on the Response Surface Suppose that we add an interaction term to the model: yˆ = 35.5 + 10.5x + 5.5x + 8x x 1 2 1 2 Interaction is actually a form of curvature 8 4
Some types of factorial designs 2 2, as above Two factors with several levels: rest of this lecture 2 k : Next lecture The notation indicates the number of factors and the number of levels for each factor, NOT the number of replications Differences with randomized block design Interaction between factors allowed (not an Interaction between factors allowed (not an additive model) How experiment is performed: Randomization for both factors, not just blocking. 5
Statistical (effects) model: i = 1, 2,..., a yijk = µ + τ i + β j + ( τβ ) ij + εijk j = 1,2,..., b k = 1,2,..., n Other models (means model, regression models) can be useful 11 Notation and computation Dots are used to sum over indices, as before Over-bars are used to indicate averages, as before Sums of squares Degrees of freedom Mean squares Computational formulas for sums of squares 6
Extension of the ANOVA to Factorials (Fixed Effects Case) pg. 177 a b n a b 2 2 2 ( yijk y... ) = bn ( yi.. y... ) + an ( y. j. y... ) i= 1 j= 1 k = 1 i= 1 j= 1 a b a b n 2 2 ( ij. i... j....) ( ijk ij. ) i= 1 j= 1 i= 1 j= 1 k = 1 + n y y y + y + y y SST = SS A + SSB + SS AB + SSE df breakdown: abn 1 = a 1+ b 1 + ( a 1)( b 1) + ab( n 1) 13 ANOVA Table Fixed Effects Case 14 7
Hypothesis testing Normality assumptions about the observations in each group Three different null hypotheses: No interaction, no row effect, no column effect. The distribution of the test statistic under the null hypothesis. Checking assumptions Compute the residuals! Compute the residuals! Plot the residuals in various ways Check also the random sample assumption 8
Example 5-1 The Battery Life Experiment Text reference pg. 165 17 Table 5.5 (p. 170) Analysis of Variance for Battery Life Data Design and Analysis of Experiments, 6/E by Douglas C. 9
Figure 5.9 (p. 171) Material type-temperature plot for Example 5-1. Design and Analysis of Experiments, 6/E by Douglas C. Table 5.6 (p. 174) Residuals for Example 5.1 Design and Analysis of Experiments, 6/E by Douglas C. 10
Residual Analysis Example 5-1 21 Residual Analysis Example 5-1 22 11
DESIGN-EXPERT Plot Life X = B: T em perature Y = A: M aterial Interaction Plot 188 Interaction Graph A: Material A1 A1 A2 A2 A3 A3 146 Life 104 2 62 2 2 20 15 70 125 B: Tem perature 23 For two-level factors: Confidence intervals for effects For a two-level factor, we can compare the two levels using the same thinking as in a t-test. The test statistic becomes a fraction: The difference in means divided by the square root of our best estimate for the variance of the difference in means. The test statistic has a t-distribution under the null hypothesis. We can get confidence intervals for the effect investigated The conclusions are the same as for the t-test: The square of the t-statistic is the F statistic! 12
What to test, and conclusions Test first whether there is an interaction If there is an interaction, the effects of rows and columns may be difficult to interpret by themselves If you get a high p-value when testing for interaction, it may be a good idea to use a model without interaction (as in the randomized blocks computations) NOTE: Results from a model without interaction can be seen directly from the ANOVA table! One observation per cell With only one observation per cell, it is impossible to test whether there is interaction or not: Too few degrees of freedom! One approach: Fit a model without interaction, and study the residuals to determine if you believe there is interaction or not. 13
Making concludions, multiple testing, and Tukey s procedure Once you have your model (interaction or not) you will want to find which effects are significantly different, and which are not. You can make pairwise tests, or compute confidence intervals for differences, as above. Multiple testing is an issue: One way to deal with this is Tukey s procedure. Overview Given data from factorial experiment: How to Given data from factorial experiment: How to analyze? Plot data If only one observation per cell, compute the interaction, or assume no interaction and look at the residuals Otherwise, test for an interaction term Otherwise, test for an interaction term Estimate the effects in the chosen model Study residuals! Check the model Find conf. intervals, possibly with Tukey s method 14