ST 516
Experimental Statistics for Engineers II
The 23 Design
Notations for factor combinations (each combination is a treatment):
+/- Coding
1 / 17
Treatment
Binary Coding
Run
A
B
C
Labels
A
B
C
1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
+
+
+
+
(1)
a
b
ab
c
ac
bc
abc
0
1
0
1
0
1
0
1
0
0
1
1
0
0
1
1
0
0
0
0
1
1
1
1
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Main Effects
Recall: (1) is also the total of responses for treatment combination
(1), etc.
Simple effects of A: a/n − (1)/n, ab/n − b/n, ac/n − c/n, and
abc/n − bc/n.
Main effect of A is the average of these 4 simple effects:
A=
2 / 17
[a − (1)] + (ab − b) + (ac − c) + (abc − bc)
.
4n
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Main effect of A is also the difference between
average response with A at its high level, and
average response with A at its low level:
A=
=
3 / 17
a + ab + ac + abc
(1) + b + c + bc
−
4n
4n
(a + ab + ac + abc) − [(1) + b + c + bc]
.
4n
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Interactions
The 4 simple effects of A can be divided into:
2 at the high level of B, abc/n − bc/n and ab/n − b/n;
2 at the low level of B, ac/n − c/n and a/n − (1)/n.
The AB interaction is (one half of) the difference between their
averages:
1 1
1
AB =
[abc − bc + ab − b] − [ac − c + a − (1)]
2 2n
2n
=
4 / 17
abc − bc + ab − b − ac + c − a + (1)
4n
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
The AB interaction may be written as the sum of
terms involving the high level of C ;
terms involving the low level of C :
1
1
AB = [abc − bc − ac + c] + [ab − b − a + (1)]
4n
4n
The ABC interaction is the difference between those parts:
ABC =
=
5 / 17
1
1
[abc − bc − ac + c] − [ab − b − a + (1)]
4n
4n
abc − bc − ac + c − ab + b + a − (1)
.
4n
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Contrast Coefficients
Treatment
Effect
Combination
I
A
B
AB
C
AC
BC
ABC
(1)
a
b
ab
c
ac
bc
abc
+
+
+
+
+
+
+
+
- + - +
+ +
- + - +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Product of any pair of columns equals another column:
A × B = AB, A × AB = B, etc.
6 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Example: Etch Rate Of A Plasma Etching Tool
Response: etch rate in Å/min.
Factors
A
B
C
Factor
Units
Low
High
Gap
C2 F6 flow
Power
cm
SCCM
W
0.8
125
275
1.2
200
325
C2 F6 = Hexafluoroethane; SCCM = Standard Cubic Centimeters per
Minute;
7 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
The data (plasma.txt):
A
+
+
+
+
B
+
+
+
+
C Rep1 Rep2
- 550 604
- 669 650
- 633 601
- 642 635
+ 1037 1052
+ 749 868
+ 1075 1063
+ 729 860
Read and reshape:
plasma <- read.table("data/plasma.txt", header = TRUE)
plasmaLong <- reshape(plasma, varying = c("Rep1", "Rep2"), v.names = "Rate",
direction = "long", timevar = "Rep")
8 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Analysis of Variance
summary(aov(Rate ~ A * B * C, plasmaLong))
Output
Df Sum Sq Mean Sq F value
Pr(>F)
A
1 41311
41311 18.3394 0.0026786 **
B
1
218
218
0.0966 0.7639107
C
1 374850 374850 166.4105 1.233e-06 ***
A:B
1
2475
2475
1.0988 0.3251679
A:C
1 94403
94403 41.9090 0.0001934 ***
B:C
1
18
18
0.0080 0.9308486
A:B:C
1
127
127
0.0562 0.8185861
Residuals
8 18020
2253
--Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1
1
9 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Effects calculated from coded variables
summary(lm(Rate ~ coded(A) * coded(B) * coded(C), plasmaLong))
Output
Call:
lm(formula = Rate ~ coded(A) * coded(B) * coded(C), data = plasmaLong)
Residuals:
Min
1Q
-6.550e+01 -1.113e+01
10 / 17
Median
1.332e-15
3Q
1.112e+01
Max
6.550e+01
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Output, continued
Coefficients:
(Intercept)
coded(A)
coded(B)
coded(C)
coded(A):coded(B)
coded(A):coded(C)
coded(B):coded(C)
coded(A):coded(B):coded(C)
--Signif. codes: 0 *** 0.001
Estimate Std. Error t value Pr(>|t|)
776.062
11.865 65.406 3.32e-12 ***
-50.812
11.865 -4.282 0.002679 **
3.687
11.865
0.311 0.763911
153.062
11.865 12.900 1.23e-06 ***
-12.437
11.865 -1.048 0.325168
-76.813
11.865 -6.474 0.000193 ***
-1.062
11.865 -0.090 0.930849
2.812
11.865
0.237 0.818586
** 0.01 * 0.05 . 0.1
1
Residual standard error: 47.46 on 8 degrees of freedom
Multiple R-Squared: 0.9661,
Adjusted R-squared: 0.9364
F-statistic: 32.56 on 7 and 8 DF, p-value: 2.896e-05
Note
“Estimate” column must be doubled to match conventional effects.
11 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
This example has replicated treatments, so we have an estimate of
σ 2 , and can test significance of estimated effects.
In examples with more factors, or with zero df for error, the
half-normal plot is a useful supplement to the table of estimated
effects:
library(gplots)
qqnorm(aov(Rate ~ A * B * C, plasmaLong), label = TRUE)
The option
label = TRUE
allows labeling points in the plot.
The half-normal plot is based on |effect|; the (full) normal plot is
based on the signed effects; use option full = TRUE.
12 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Under the null hypothesis that no factor affects the response, all
estimated effects are normally distributed with zero mean and the
same variance, and the Q-Q plot is a straight line.
Any non-zero population effect makes the corresponding estimated
effect larger, which then looks like an “outlier”, standing out from
the line of small effects.
You can get more small effects in the plot by including Rep in the
model (in a CRD it cannot have any true effect):
qqnorm(aov(Rate ~ A * B * C * Rep, plasmaLong), label = TRUE)
JMP includes these “null” effects in the half-normal plot.
13 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Reduced model with only A, C , and AC :
Df Sum Sq Mean Sq F value
A
1 41311
41311 23.767
C
1 374850 374850 215.661
A:C
1 94403
94403 54.312
Residuals
12 20858
1738
--Signif. codes: 0 *** 0.001 ** 0.01 *
Pr(>F)
0.0003816 ***
4.951e-09 ***
8.621e-06 ***
0.05 . 0.1
1
Note: R does not break “Residuals” line into “Lack of Fit” and
“Pure Error”.
“Pure Error” is the Residuals line from the full model ANOVA.
14 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Call:
lm(formula = Rate ~ coded(A) * coded(C), data = plasmaLong)
Residuals:
Min
1Q Median
-72.50 -15.44
2.50
3Q
18.69
Max
66.50
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)
776.06
10.42 74.458 < 2e-16
coded(A)
-50.81
10.42 -4.875 0.000382
coded(C)
153.06
10.42 14.685 4.95e-09
coded(A):coded(C)
-76.81
10.42 -7.370 8.62e-06
--Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1
1
***
***
***
***
Residual standard error: 41.69 on 12 degrees of freedom
Multiple R-Squared: 0.9608,
Adjusted R-squared: 0.9509
F-statistic: 97.91 on 3 and 12 DF, p-value: 1.054e-08
15 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Can get “Lack of Fit” by including A : B : C interaction:
> summary(aov(Rate ~ A * C + A : B : C, plasmaLong));
Df Sum Sq Mean Sq F value
Pr(>F)
A
1 41311
41311 18.3394 0.0026786 **
C
1 374850 374850 166.4105 1.233e-06 ***
A:C
1 94403
94403 41.9090 0.0001934 ***
A:C:B
4
2837
709
0.3149 0.8603536
Residuals
8 18021
2253
--Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1
1
Now we interpret the A : B : C line as “Lack of Fit”, and the
Residuals line as “Pure Error”.
16 / 17
The 2k Factorial Design
The 23 Design
ST 516
Experimental Statistics for Engineers II
Interpreting the Interaction
The AC interaction is larger than the main effect of A.
2
1
1
−
2
1
+
−
+
A
17 / 17
1
800 1000
C
600
2
mean of Rate
800 1000
600
mean of Rate
with(plasmaLong, interaction.plot(A, C, Rate, type = "b"))
with(plasmaLong, interaction.plot(C, A, Rate, type = "b"))
2
2
1
−
+
C
The 2k Factorial Design
The 23 Design
A
1
2
−
+
© Copyright 2026 Paperzz