Mathematics and Statistics –
Design and Analysis of Experiments
Week 7 – Factorial Designs
Copyright By PowCoder代写 加微信 powcoder
Design of Engineering Experiments – Introduction to Factorials
• Text reference, Chapter 5
• General principles of factorial experiments
• The two-factor factorial with fixed effects
• The ANOVA for factorials
• Extensions to more than two factors
• Quantitative and qualitative factors – response curves and surfaces
Some Basic Definitions
Definition of a factor effect: The change in the mean response when the factor is changed from low to high
A=yA+ −yA− =40+52−20+30=21 22
B=yB+ −yB− =30+52−20+40=11 22
AB = 52 + 20 − 30 + 40 = −1 22
The Case of Interaction:
A=yA+ −yA− =50+12−20+40=1 22
B=yB+ −yB− =40+12−20+50=−9 22
AB = 12 + 20 − 40 + 50 = −29 22
Regression Model & The Associated Response Surface
y= +x + x + xx + 0 11 22 1212
The least squares fit is
y=35.5+10.5x +5.5x +0.5xx 35.5+10.5x +5.5x
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 +8xx
Interaction is actually a form of curvature
Example 5.1 The Battery Life Experiment Text reference pg. 187
A = Material type; B = Temperature (A quantitative variable)
1. What effects do material type & temperature have on life?
2. Is there a choice of material that would give long life regardless of temperature (a robust product)?
The General Two-Factor Factorial Experiment
a levels of factor A; b levels of factor B; n replicates This is a completely randomized design
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
i=1 j=1 k=1
Extension of the ANOVA to Factorials (Fixed Effects Case) – pg. 189
abnab (y−y)2=bn (y−y)2+an (y−y)2
+n(y −y −y +y )2 +
i=1 j=1 k=1
(y −y )2 ijk ij.
ij. i.. . j. …
SST =SSA +SSB +SSAB +SSE
df breakdown:
a b n − 1 = a − 1 + b − 1 + ( a − 1) ( b − 1) + a b ( n − 1)
ANOVA Table – Fixed Effects Case
JMP and Design-Expert will perform the computations
Text gives details of manual computing (ugh!) – see pp. 192
Design-Expert Output – Example 5.1
JMP output – Example 5.1
Residual Analysis – Example 5.1
Residual Analysis – Example 5.1
DESIGN-EXPERT Plot Life
X = B: Temperature Y = A: Material
Interaction Graph
Interaction Plot
A: Material
B: Tem perature
Quantitative and Qualitative Factors
• The basic ANOVA procedure treats every factor as if it were qualitative
• Sometimes an experiment will involve both quantitative and qualitative factors, such as in Example 5.1
• This can be accounted for in the analysis to produce regression models for the quantitative factors at each level (or combination of levels) of the qualitative factors
• These response curves and/or response surfaces are often a considerable aid in practical interpretation of the results
Quantitative and Qualitative Factors
Candidate model terms from Design- Expert:
A = Material type
B = Linear effect of Temperature
B2 = Quadratic effect of Temperature AB = Material type – TempLinear
AB2 = Material type – TempQuad
B3 = Cubic effect of Temperature (Aliased)
Quantitative and Qualitative Factors
Regression Model Summary of Results
Regression Model Summary of Results
Factorials with More Than Two Factors
• Basicprocedureissimilartothetwo-factorcase;all abc…kn treatment combinations are run in random order
• ANOVA identity is also similar:
SST =SSA +SSB + +SSAB +SSAC +
+SSABC + +SSAB K +SSE
• Complete three-factor example in text, Example 5.5
Factorial Designs
In most of experimental studies, through the brain storming and cause-effect diagram, we often find there are more than one factor that may have significant impact to the response variables.
For example, in our concrete strength study, three factors may be of equal importance for the compressive strength:
(1) Type of sand (2) the amount of water and (3) the amount of cement
Our purpose is to determine the combination of sand size, amount of water and the amount of cement that will result the strongest compressive strength, as well as to determine the uncertainty due to each factor and uncertainty due to interaction of two or more factors.
In many engineering literatures, it is suggested to fix two factors and change the level of one factor. This approach is not very efficient nor is able to show the interaction effect between two factors.
Experimental design techniques will help us to identify the main effect of each factor, the interaction effects, and provide information to study the uncertainty due to individual factor as well as due the combined interaction effects.
Factorial Experiments with Two Factors
We first consider the two-factor factorial design study. Consider the concrete compressive strength study:
Purpose of the Study:
To determine the effects of sand type and the cement/sand ratio (weight ratio) and their combined interaction effect. A concrete specimen is a standard 50 mm cube specimen.
Treatment Design:
Two factors to be studies are : Sand type and amount of cement in terms of the cement/sand ratio in weight. Two commonly used sand types are: Small and Large grain. Three different sand/cement ratios in weight are 2.50, 2.75 and 3.00.
Experimental Design:
A two-factor full factorial design is planned for the experiment. A total of 2×3 treatment combinations. For each treatment, six specimens, 50mm cube each, will be formed. The standard mixture of water will be applied. The compressive strength will be tested 28 days after the specimen are formed.
Statistical Models for the Two-Factor Factorial Design – Fixed Effect Model
An appropriate statistical model to describe this design
A two-factor axb full factorial Design cab be described as a cell-mean model:
y=+e ijk ij ijk
ij is the mean of each treatment combination. It is estimated by yij.
When ij is futher decomposed into main and interaction effects, the effects model is
y = + + + + e , i = 1,2,…a; j =1,2,.., b; k =1,2,..,r ijk i j ij ijk
is the overall strength mean.
i ‘s are the effect of the ith level of Treatment A.
j is the effect of the jth level of Treatment B.
ij is the interaction effect of ith level of A and jth level of B.
eijk is the random error with eijk ~ N (0, )
Relationship between cell mean model and effect model:
The cell-mean model: y ijk
The effect model: y ijk
= + e ij ijk
= + + + + e
i j ij ijk
They are related in the foloowing way:
ij =+(i. −)+(.j −)+(ij −(i. −)−(.j −)−)
=+(i. −)+(.j −)+(ij −i. −.j +) =+i +j + ij
What is an effect? Simple effect? main effect? Interaction effect?
The effect of a factor is a change in the response caused by a change in the level of that factor. An effect can be expressed as a contrast. Three effects of interest are:
Simple Effect of a factor: is a contrast between levels of one factor at a level of another factor. In this example, 20 – 40 = 11 – 12 is a simple effect of factor B between levels B1 and B2 at Level A1 of factor A.
Can you find the other three simple effects for the above example?
Main effect of a factor: is a contrast between levels of one factor averaged over all levels of another factor.
The main effect of Factor A : 1.− 2. = (20+40)/2 – (50+14)/2 = -2 The main effect of factor B :
The Interaction effect between two factors: is the difference between simple effects of one factor at different levels of the other factor.
Consider Level B1: The change of A from Level A1 to Level A2 at Factor B = B1 is: 50-20 = 30, call is C1, which is the simple effect of factor A at B1 of factor B.
Consider Level B2: The change of A from Level A1 to Level A2 for Factor B = B2 is: 14-40 = -26, call it C2, which is the simple effect of factor A at B2 of factor B.
The interaction effect is the difference between C2 and C1 = -26-30 = -56
The changes for Factor from A1 to A2 are different between two levels of Factor B. This says that A and B are interacted. For this example, When B = B1, there is a huge increase in A from A1 to A2 of 30. However, when B = B2, there is a huge decrease in A from A1 to A2 of –26.
In real world applications, this happens often. When fertilizer A is given to a field, the production increases from low dosage to high dosage. Similar situation for B. However, when A and B both are applied at the same time, the production may be decreased. This is the interaction effect of fertilizer A and B.
When individual A and B work independently, each one has his/her progress. When both work as a team, the accomplishment can be much more than the sum of two independent workers, or possibly much less. This is interaction effect. The following figures demonstrates a several possible patterns of interaction between A and A factors, when both have two levels.
The following figures demonstrate some possible patterns of interaction between A and B for a 2×2 factorial design (a=2, b=2)
The relationship between observed data and the model
Cell Mean Model Term
y111,y112,..,y11r
+1 +1 +11
y121,y1y22,..,y12r 12.
+1 +2 +12
y1b1,y1b2,..,y1br
+1 +b +1b
ya11,ya12,..,ya1r
ya21,ya22,..,ya2r
yab1,yab2,..,yabr
Mean Model Term
The main effect of ith level of factor A: i is estimated by yi.. − y… The main effect of jth level of factor B: i is estimated by y.j. − y…
The interaction effect of ith level of factor A and jth level of B: : ij is estimated by
(yij.-y…)-(yi..- −y…)−(y.j. −y…)=yij.-yi..- −y.j. +y… (Consider a two level case for deomnstration)
Analysis of Two-factors
When response, yijk’s are observed, we need a method to estimate treatment effects:
What is the main effect of factor A, factor B?
What is the interaction effect?
Is any if these effects significant?
If a effect is significant, where are the differences from?
If there is a control, is any other level of the factor significantly different from the control level?
Do the responses show any interesting patterns in relation to the levels of a factor?
And so on?
We asked similar questions for one-factor analysis before. Many of the techniques applied there will be applied here as well.
Case Study: A lab testing of life time of a battery is planned. Three life time is thought affected by two factors:Plate Material for the battery and and Environmental temperature.
Treatment Design: A plate material used for the battery, and the temperature of the environment. There are three types of plate materials common for battery. Three temperature levels that are common in real environment are chosen for the experiment.
Experimental Design: A two-factor full factorial experiment is planned for the study. Nine treatment combinations will be tested. For each treatment combination, six batteries will be tested.
This is a two-factor 3×3 full factorial design. The factors are fixed effects, since the levels of plate material and temperature are about the only choices for the study, although one can argue that temperature may not be fixed. Our interest is to compare the life time of the treatment, not about the variation of life time among different temperatures.
The life time data are (Data source: Montgomery, 1991):
Row Matype Temp Life 1 1 15 74 2 1 15 130 3 1 15 155 4 1 15 180 5 2 15 126 6 2 15 150 7 2 15 159 8 2 15 188 9 3 15 110
10 3 15 138 11 3 15 160 12 3 15 168
17 2 70 106
18 2 70 115
19 2 70 122 20 2 70 126 21 3 70 120 22 3 70 139 23 3 70 150 24 3 70 174 25 1 125 20 26 1 125 58 27 1 125 70 28 1 125 82 29 2 125 25 30 2 125 45 31 2 125 58 32 2 125 70 33 3 125 60 34 3 125 82 35 3 125 96 36 3 125 104
Yijk is the lefe time. Factor A is Plate of Material (three levels) and Factor B is Temperature Three levels).
Each response can be decomposed in terms of treatment effects that estimate the corresponding terms of the effect model. And Sum of Squares of all responses can then be partitioned accordingly:
yijk =yij. +(yijk −yij.)
=y… +(yi.. −y…)+(y.j. −y…)+[yij. −[y… +(yi.. −y…)+(y.j. −y…)]]+(yijk −yij.)
= y… +(yi.. − y…)+(y.j. − y…)+(yij. − yi.. − y.j. + y…)+(yijk − yij.)
= ˆ + ˆ i + j + ( ) i j + eˆ i j k
The overall deviation can be partitioned in terms of factor effects: Overall deviation = Treatment effect + Experimental error
(yijk −y…) = (yij. −y…) + (yijk −yij.)
= (yi.. − y…) + (y.j. − y…) +(yij. − yi.. − y.j. + y…)+ (yijk − yij.)
=Factor A Effect + Factor B effect + Interaction Effect + Experimental error
The overall Sum of Squares can be partitioned according to the effects of factors in the model: (y −y)2
= br (y − y )2 + ar (y − y )2
+r(y −y −y +y )2 +(y −y )2
ij. i.. . j. …
SSTO = SSA + SSB + SSAB + SSE
The corresponding degrees of freedoom are: (abr-1) = (a-1) + (b-1) + (a-1)(b-1) + ab(r-1)
This is the basis of the ANOVA table for two-factor models when replications are equal. Each sum of square component can be further decomposed based on the research interest. This is accomplished by setting up proper contrasts. The techniques we discussed for one-factor analysis can be extended here.
1. Conduct descriptive summary using both graphical and numerical techniques for detecting unusual observations and for demonstrating some interesting patterns that will be useful during the analysis.
2. Conduct the preliminary ANOVA analysis based on the raw data and residual analysis to check for the adequacy of assumptions, especially the constant variance and normality. Graphical methods are particularly useful here.
3. If transformation is needed, perform transformation, and conduct ANOVA analysis along with effect plots. If the result using the transformed data is very similar to that using raw data, use the raw data for the analysis.
4. Determine if further analysis is needed:
1. If interaction is significant (also closely examine the interaction plot to learn the interaction pattern), an analysis of simple effects of factor A (or B) at each level of factor B (or A) is recommended.
2. If main effect of a factor is significant, one should decide what further comparisons should be useful: Pairwise comparison, contrasts, trend analysis, comparison with control , and so on. (consult the one-way analysis for more details).
A typical procedure to conduct analysis for two-factor experiment
In the following, we will discuss the analysis of the Battery Life Time Testing Data (Data Source: Montgomery, 1991).
We start with descriptive and graphical summaries. Recall the Case Study:
Case Study: A lab testing of life time of a battery is planned. Three life time is thought affected by two factors:Plate Material for the battery and and Environmental temperature.
Treatment Design: A plate material used for the battery, and the temperature of the environment. There are three types of plate materials common for battery. Three temperature levels that are common in real environment are chosen for the experiment.
Experimental Design: A two-factor full factorial experiment is planned for the study. Nine treatment combinations will be tested. For each treatment combination, six batteries will be tested.
A total of 3x3x6 life time data are recorded.
Descriptive Statistics
Variable: Life Matype: 1
Anderson- Test
A-Squared: 0.524 P-Value: 0.144
Mean 83.1667
StDev 48.5889
Variance 2360.88
Skewness 0.865847
Kurtosis 6.70E-02
Minimum 20.000 1st Quartile 44.500 Median 74.500 3rd Quartile 118.000 Maximum 180.000
95% Confidence Interval for Mu 52.295 114.039
95% Confidence Interval for Sigma 34.420 82.498
95% Confidence Interval for Median 44.736 117.370
Variable: Life Matype: 3
Anderson- Test
Descriptive Statistics
60 100 140
95% Confidence Interval for Mu
Variable: Life Matype: 2
Anderson- Test
A-Squared: 0.261 P-Value: 0.641
Mean 107.500 StDev 49.046 Variance 2405.55 Skewness -2.1E-01 Kurtosis -7.1E-01 N12
Minimum 25.000 1st Quartile 61.000 Median 118.500 3rd Quartile 144.000 Maximum 188.000
95% Confidence Interval for Mu 76.337 138.663
95% Confidence Interval for Sigma 34.744 83.275
95% Confidence Interval for Median 61.157 143.685
40 50 60 70 80 90 100 110 120
95% Confidence Interval for Median
60 100 140 180
95% Confidence Interval for Mu
60 70 80 90 100 110 120 130 140 150
95% Confidence Interval for Median
Descriptive Statistics
Dotplots of Life by Material Type
100 140 180
A-Squared: P-Value:
Minimum 60.000
0.178 0.896
125.083 35.766 1279.17 -3.2E-01 -8.2E-01
130 140 150 160
95% Confidence Interval for Mu 102.359 147.808
95% Confidence Interval for Sigma 25.336 60.726
95% Confidence Interval for Median 98.105 157.369
95% Confidence Interval for Mu
1st Quartile Median
3rd Quartile Maximum
98.000 129.000 157.500 174.000
95% Confidence Interval for Median
60 100 140
95% Confidence Interval for Mu
140 150 160
95% Confidence Interval for Median
100 140 180
Descriptive Statistics
Descriptive Statistics
Variable: Life Temp: 15
Anderson- Test
Variable: Life Temp: 70
Anderson- Test
A-Squared: P-Value:
0.267 0.620
A-Squared: P-V alue:
V ari anc e
-3.9E-01 N12
Minimum 34.000 1st Quartile 76.250 Median 117.500 3rd Quartile 135.750 Maximum 174.000
95% Confidence Interval for Mu 79.826 133.674
95% Confidence Interval for Sigma 30.018 71.948
95% Confidence Interval for Median 76.316 135.579
Minimum 74.000 1st Quartile 127.000 Median 152.500 3rd Quartile 166.000 Maximum 188.000
95% Confidence Interval for Mu 124.696 164.971
95% Confidence Interval for Sigma 22.452 53.813 72
95% Confidence Interval for Mu
144.833 31.694 1004.52 -9.0E-01 0.997705
106.750 42.375 1795. 66 -4.3E-01
0.295 0.536
122 132 142
95% Confidence Interval for Median 127.052 165.895
Variable: Life Temp: 125
Anderson- Test
95% Confidence Interval for Median
60 100 140 180
95% Confidence Interval for Mu
Descriptive Statistics
Dotplots of Life by Temperature
A-Squared: P-Value:
Minimum 1st Quartile Median
3rd Quartile Maximum
20.000 48.250 65.000 82.000
0.224 0.772
64.1667 25.6722 659.061 -3.0E-01 -3.9E-01
104.000 95% Confidence Interval for Mu 47.855 80.478
45 55 65 75 85
95% Confidence Interval for Median
95% Confidence Interval for Sigma 18.186 43.588
95% Confidence Interval for Median 48.421 82.000
Variable Material
Life 1
Variable Material
N Mean
12 83.2
12 107.5
12 125.1
Median TrMean StDev 74.5 79.8 48.6 118.5 107.7 49.0 129.0 126.7 35.8
Maximum Q1 Q3 180.0 44.5 118.0 188.0 61.0 144.0 174.0 98.0 157.5
SE Mean Life 1 14.0 2 14.2 3 10.3
Variable Temperature N Life 15 12 70 12 125 12 Variable Temperature SE Mean
Median 152.50 117.5 65.00 Maximum 188.00 174.0 104.00
TrMean 147.60 107.3 64.60
76.3 48.25
StDev 31.69 42.4 25.67
135.8 82.00
34.0 20.00
Mean 144.83 106.8 64.17 Minimum 9.15
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com