








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
1 / 14
This page cannot be seen from the preview
Don't miss anything!









combinations of the levels of the two factors of interest.
balanced two-factor factorial design.
of factor B, and n independent replications taken at each of the a × b treatment combinations. The
design size is N = abn.
the level of the factor. This is usually called a main effect.
other factor, then we say there is an interaction between the factors.
TYPE TOTALS MEANS (if nij = n)
Cell(i, j) yij· =
∑nij
k=1 yijk^ yij·^ =^ yij·/nij^ =^ yij·/n
ith^ level of A yi·· =
∑b
j=
∑n ij k=
yijk yi·· = yi··/
∑b
j=
nij = yi··/bn
j
th level of B y·j· =
∑a
i=
∑nij
k=1 yijk^ y·j·^ =^ y·j·/^
∑a
i=1 nij^ =^ y·j·/an
Overall y··· =
a i=
b j=
∑n ij k=1 yijk^ y···^ =^ y···/^
a i=
b j=1 nij^ =^ y···/abn
where nij is the number of observations in cell (i, j).
EXAMPLE (A 2 × 2 balanced design): A virologist is interested in studying the effects of a = 2 different
culture media (M ) and b = 2 different times (T ) on the growth of a particular virus. She performs a
balanced design with n = 6 replicates for each of the 4 M ∗ T treatment combinations. The N = 24
measurements were taken in a completely randomized order. The results:
Medium 1 Medium 2
12 21 23 20 25 24 29
T hours 22 28 26 26 25 27
18 37 38 35 31 29 30
hours 39 38 36 34 33 35
T = 12 y 11 · = 140 y 12 · = 156 y 1 ·· = 296
T = 18 y 21 · = 223 y 22 · = 192 y 2 ·· = 415
y· 1 · = 363 y· 2 · = 348 y··· = 711
i = Level of T j = Level of M
k = Observation number
yijk = k
th observation from the i
th
level of T and jth^ level of M
T = 12 y 11 · = 23. 3 y 12 · = 26 y 1 ·· = 24. 6
T = 18 y 21 · = 37. 16 y 22 · = 32 y 2 ·· = 34. 583
y· 1 · = 30. 25 y· 2 · = 29. 00 y··· = 29. 625
significant interaction between factors M and T. For the 2 × 2 design example:
interaction.
Or,
interaction.
factor B, then an interaction exists between factors A and B.
B, is called the interaction of A and B.
interactions between two factors. To make an interaction plot,
For smal values of the M SE , even small interaction effects (less nonparallelism) may be significant.
meaning. Knowledge of the A ∗ B interaction is often more useful than knowledge of the main effect.
That is, the experimenter must examine the levels of one factor, say A, at fixed levels of the other
factor to draw conclusions about the main effect of A.
factors are not significant. This would happen when the interaction plot shows interactions in different
directions that balance out over one or both factors (such as an X pattern). This type of interaction,
however, is uncommon.
Example: Consider a completely randomized 2 × 3 factorial design with n = 2 replications for each of the
six combinations of the two factors (A and B). The following table summarizes the results:
Factor A Factor B Levels
Levels 1 2 3
1 1 , 2 4 , 6 5 , 6
2 3 , 5 5 , 7 4 , 6
2 )
i=1 αi^ = 0^ (ii)^
j=1 βj^ = 0
(iii)
j=1(αβ)ij^ = 0 for^ i^ = 1,^2 (iv)^
i=1(αβ)ij^ = 0 for^ j^ = 1,^2 ,^3
αβ 12 = αβ 22 = αβ 13 = αβ 23 =
μ α 1 β 1 β 2 αβ 11 αβ 12
y =
′ X =
′ y =
′ X)
′ X)
− 1 X
′ y =
μ
̂ α 1
β̂ 1
β̂ 2
αβ̂ 11
αβ̂ 12
Thus, α̂ 2 = −α̂ 1 = 0. 5 β̂ 3 = −β̂ 1 − β̂ 2 = 0. 75 αβ̂ 21 = −αβ̂ 11 = 0. 75
αβ̂ 22 =^ − αβ̂ 12 = 0 αβ̂ 13 =^ − αβ̂ 11 − αβ̂ 12 = 0.^75 αβ̂ 23 = αβ̂ 11 + αβ̂ 12 =^ −^0.^75
a ∑
i=
(yi·· − y···)
2 = the sum of squares for factor A (df = a − 1)
M SA = SSA/(a − 1) = the mean square for factor A
b ∑
j=
(y·j· − y···)
2 = the sum of squares for factor B (df = b − 1)
M SB = SSB /(b − 1) = the mean square for factor B
∑^ a
i=
∑^ b
j=
[(yij· − y···) − (yi·· − y···) − (y·j· − y···)]
2 = n
∑^ a
i=
∑^ b
j=
(yij· − yi·· − y·j· + y···)
2
= the A ∗ B interaction sum of squares (df = (a − 1)(b − 1))
M SAB = SSAB /(a − 1)(b − 1)= the mean square for the A ∗ B interaction
∑a
i=
∑b
j=
∑n
k=
yijk − yij·
= the error sum of squares (df = ab(n − 1))
M SE = SSE /ab(n − 1)= the mean square error
∑^ a
i=
∑^ b
j=
∑^ n
k=
(yijk − y···)
2 = the total sum of squares (df = abn − 1)
a ∑
i=
b ∑
j=
n ∑
k=
(yijk − y···)
2 = nb
a ∑
i=
(yi·· − y···)
2
b ∑
j=
(y·j· − y···)
2
a ∑
i=
b ∑
j=
(yij· − yi·· − y·j· + y···)
2
r ∑
i=
ni ∑
j=
(yij − yi·)
2
∑^ a
i=
∑^ b
j=
∑^ n
k=
y
2 ijk −^
y
2 ···
abn
∑^ a
i=
y
2 i··
bn
y
2 ···
abn
∑^ b
j=
y
2 ·j·
an
y
2 ···
abn
a ∑
i=
b ∑
j=
y
2 ij·
n
y
2 ···
abn
∑^ a
i=
∑^ b
j=
nij ∑
k=
y
2 ijk −^
y
2 ···
N
∑^ a
i=
y
2 i··
ni·
y
2 ···
N
∑^ b
j=
y
2 ·j·
n·j
y
2 ···
N
a ∑
i=
b ∑
j=
y
2 ij·
nij
y
2 ···
N
where N =
∑a
i=
∑b
j=1 nij^ ,^ ni·^ =^
∑b
j=1 nij^ ,^ n·j^ =^
∑a
i=1 nij^.
Balanced Two-Factor Factorial ANOVA Table
Source of Sum of Mean F
Variation Squares d.f. Square Ratio
A SSA a − 1 M SA = SSA/(a − 1) FA = M SA/M SE
B SSB b − 1 M SB = SSB /(b − 1) FB = M SB /M SE
A ∗ B SSAB (a − 1)(b − 1) M SAB = SSAB /(a − 1)(b − 1) FA∗B = M SAB /M SE
Error SSE ab(n − 1) M SE = SSE /(ab(n − 1)) ——
Total SStotal abn − 1 —— ——
For the unbalanced case, replace ab(n − 1) with N − ab for the d.f. for SSE and replace abn − 1 with N − 1
for the d.f. for SStotal where N =
∑a
i=
∑b
j=1 nij^.
potheses for the two main effects:
H 0 : α 1 = α 2 = · · · = αa vs. H 1 : at least one αi 6 = αi′
H 0 : β 1 = β 2 = · · · = βb vs. H 1 : at least one βj 6 = βj′
main effects hypotheses can be masked. To draw conclusions about a main effect, we will fix
the levels of one factor and vary the levels of the other. Using this approach (combined with
interaction plots) we may be able to provide an interpretation of main effects.
H 0 : (αβ) 11 = (αβ) 12 = · · · = (αβ)ab = 0 vs. H 1 : at least one (αβ)ij 6 = 0
H 0 : α 1 = α 2 = · · · = αa = 0 vs. H 1 : at least one αi 6 = 0
H 0 : β 1 = β 2 = · · · = βb = 0 vs. H 1 : at least one βj 6 = 0
Adj R-Square 0.
R-Square 0.
MSE 5.
Error DF 20
Parameters 4
Observations 24
Proportion Less
0.0 0.4 0.
Residual
0.0 0.4 0.
Fit–Mean
0
5
-7 -5 -3 -1 1 3 5 7
Residual
0
10
20
30
40
Percent
0 5 10 15 20 25
Observation
Cook's D
20 25 30 35 40
Predicted Value
20
25
30
35
40
growth
-2 -1 0 1 2
Quantile
0
2
4
Residual
0.20 0.25 0.
Leverage
0
1
2
RStudent
25 30 35
Predicted Value
0
1
2
RStudent
25 30 35
Predicted Value
0
2
4
Residual
ANOVA and Estimation of Effects for a 2x2 Design
The GLM Procedure
ANOVA and Estimation of Effects for a 2x2 Design
The GLM Procedure
20
25
30
35
40
growth
12 18 time
Distribution of growth
growth Level of time N Mean Std Dev 12 12 24.6666667 2. 18 12 34.5833333 3.
ANOVA and Estimation of Effects for a 2x2 Design
The GLM Procedure
20
25
30
35
40
growth
1 2 medium
Distribution of growth
growth Level of medium N Mean Std Dev 1 12 30.2500000 7. 2 12 29.0000000 3.
ANOVA and Estimation of Effects for a 2x2 Design
The GLM Procedure
12 18
time
20
25
30
35
40
growth
medium 1 2
Interaction Plot for growth
ANOVA and Estimation of Effects for a 2x2 Design
The GLM Procedure
20
25
30
35
40
growth
12 1 12 2 18 1 18 2
time*medium
Distribution of growth
growth
Level of time
Level of medium N Mean Std Dev
12 1 6 23.3333333 3.
12 2 6 26.0000000 1.
18 1 6 37.1666667 1.
18 2 6 32.0000000 2.
σ
2
. That is, we assume the random error ∼ N (0, σ
2 ).
the Anderson-Darling Goodness-of-Fit Test can be applied to any distribution F (x).
normal distribution with mean 0 and constant variance.
want to see a large p-value because we do not want to reject the null hypothesis that the errors are
normally distributed.
4.7.1 Kolmogorov-Smirnov Goodness-of-Fit Test
Assumptions: Given a random sample of n independent observations
Hypotheses: For a hypothesized distribution F
∗ (x)
(i) Two-sided: H 0 : F (x) = F
∗ (x) for all x vs. H 1 : F (x) 6 = F
∗ (x) for some x
(ii) One-sided: H 0 : F (x) ≥ F
∗ (x) for all x vs. H 1 : F (x) < F
∗ (x) for some x
(iii) One-sided: H 0 : F (x) ≤ F
∗ (x) for all x vs. H 1 : F (x) > F
∗ (x) for some x
Method: For a given α
Number of observations ≤ x
n
(i) Two-sided test statistic: T = sup x
∗ (x) − Sn(x)|
tribution.
(ii) One-sided test statistic: T
= sup x
∗ (x) − Sn(x))
(iii) One-sided test statistic: T
− = sup x
(Sn(x) − F
∗ (x))
Decision Rule
and T
− are found in nonparametrics textbooks. For larger samples sizes,
an asymptotic critical value can be used.
4.7.2 Cramer-Von Mises Goodness-of-Fit Test
Assumptions: Same as the Kolmogorov-Smirnov test
Hypotheses: For a hypothesized distribution F
∗ (x)
H 0 : F (x) = F
∗ (x) for all x vs. H 1 : F (x) 6 = F
∗ (x) for some x
Method: For a given α
Number of observations ≤ x
n
2 = n
−∞
∗ (x) − Sn(x)]
2 dF
∗ (x).
12 n
∑^ n
i=
∗ (x(i)) −
2 i − 1
2 n
where x(1), x(2),... , x(n) represents the ordered sample in ascending order.
Decision Rule
2 when H 0 is true. Computers generate
critical values for the asymptotic (n → ∞) distribution of W
2 .
2 becomes too large (or p-value < α), then we will Reject H 0.
4.7.3 Anderson-Darling Goodness-of-Fit Test
Assumptions: Same as the Kolmogorov-Smirnov and Cramer-von Mises tests
Hypotheses: Same as the Cramer-von Mises test.
Method: For a given α
Number of observations ≤ x
n
2 is defined to be
−∞
F ∗(x)(1 − F ∗(x))
∗ (x) − Sn(x)]
2 dx.
2 = −
n
(2i − 1)
lnF
∗ (x(i)) + ln(1 − F
∗ (x(n+1−i))
− n where
x(1), x(2),... , x(n) represents the ordered sample in ascending order.
Decision Rule
2 .
2 becomes too large (or p-value < α), then we will Reject H 0.