Professional Documents
Culture Documents
Solution For Assignment # 2 Sta 5206, 5126 & 4202
Solution For Assignment # 2 Sta 5206, 5126 & 4202
Solution For Assignment # 2 Sta 5206, 5126 & 4202
The means between the group are approximately close to each other, therefore the effect
of the alcohol among the groups should be the same.
b) α=0.01 LOS
H0: 𝜏1 = 𝜏2 = 𝜏3 = 𝜏4 = 0
H1: At least one 𝜏𝑖 ≠ 0
The test shows F=3.246 with df1=3, df2=8, leading to a p-value=0.0813. Since p-value >
α=0.01, we fail to reject Ho.
1|Page
There is insufficient evidence that the mean percentage of Methyl Alcohol differs
among (for different) the chemists at 0.01 LOS.
c)
To check whether constant variance assumption has been met, we look at the Residuals
vs Fitted graph. From this graph, there seems to be a slight bow shape pattern, but it is
not too significant. Therefore, the constant variance assumption is valid. The following
Bartlett test also supported the graph. QQ plot also indicates that the normality
assumption is valid.
d)
Ho:
The variances are constant
Ha: At least one of the variances is different
From the Bartlett test, the p-value =0.5298 > α=0.01, which suggests that the equal
variance assumption has been met.
The results agree with part c.
𝑆𝑆𝑡𝑚𝑡 1.0446
e) R2=𝑆𝑆𝑡𝑜𝑡𝑎𝑙= 1.9028 =0.549
About 55% of the total variability in response(Alcohol) has been explained by the
treatment (chemist).
2|Page
Solution for Problem 2
𝑦2 3762
a) CF= 𝑁 .. = =5655.04; SStotal=∑5𝑖=1 ∑5𝑗=1 𝑦 2 𝑖𝑗 - CF = 6292-5655.04= 636.96;
25
2 492 +772 +882 +1082 +54 2
5 𝑦𝑖.
SSTRT= ∑𝑖=1 – CF = –CF =475.76; SSE= SStotal - SSTRT =161.2
𝑛𝑖 5
CF=correction factor
𝑆𝑆 𝑀𝑆𝑡𝑚𝑡
MS=𝑑𝑓; Fo= 𝑀𝑆𝐸
Ho: The cotton weight percent does not affect the mean tensile strength
Ha: The cotton weight percent affects the mean tensile strength
H0: 𝜏1 = 𝜏2 = 𝜏3 = 𝜏4 = 𝜏5 = 0
H1: At least one 𝜏𝑖 ≠ 0
The test shows F=14.757 with df1=4, df2=20, leading to a p-value=0.000. Since the P-
value < α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that the mean tensile strength differs for different cotton
weight percent groups at α=0.05 LOS.
3|Page
MSE=8.06; ni=n=5; t α /2=2.086
𝑀𝑆𝐸∗2
LSD=t α /2*√ = 3.74552
𝑛
If |ӯi.- ӯj.|> LSD, the means are significantly different.
Level 1:
Level 2:
Level 3:
15% cotton is different than 20%, 25% and 30%. 20% cotton is different than 30% and
35% cotton. 25% cotton is different than 30% and 35% cotton. 30% cotton is different
than 35%.
c)
4|Page
The normality (the points are on the line) and constant variance assumptions (the
observations bounce “randomly” around the zero line) are valid.
> shapiro.test(lm.1$res)
data: lm.1$res
a) Ho: The coating type does not affect the mean conductivity
Ha: The coating type does affects the mean conductivity
5|Page
The test shows F=14.3 with df1=3, df2=12, leading to a p-value=0.000. Since the P-value
< α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that the mean conductivity differs among coating type
groups at α=0.05 LOS.
u=2207/16=137.9375
i 1 2 3 4
ui 145 145.25 132.25 129.25
ti 7.0625 7.3125 -5.6875 -8.6875
𝑀𝑆𝐸 19.69
c) 95% CI for the µ4 : ӯ4. ±t α/2 ,12 ∗ √ -> 129.25 ±2.1788 ∗ √
n 4
124.416≤ µ4 ≤ 134.084
We are 95% confident that the mean of coating type 4 is between 124.4 and 134.1.
2∗𝑀𝑆𝐸
99% CI for the µ1 - µ4 : (ӯ1.- ӯ4.) ±t α/2,12 ∗ √ -> (145- 129.25) ±3.05454 ∗
n
2∗19.69
√ . That means, the 99% CI is, 6.1658 ≤ µ1 - µ4 ≤ 25.3342
4
We are 99% confident that the mean difference between coating types 1 and 4 is
between 6.2 and 25.3.
6|Page
d)
The means of Coating Type 2 and Coating Type 1 are not significantly different. The
means of Coating Type 3 and Coating Type 4 are not significantly different. Pairs that
are significantly different are: (µ1,µ3 ), (µ1,µ4 ), (µ2,µ3 ) and (µ2,µ4 ).
e)
Coating types 1 and 2 produce the highest conductivity. But coating type 1 has low
variability compare to coating 2.
7|Page
a) Ho: The circuit types have the same response time on average
H1: The circuit types do not have the same response time on average
The test shows F=16.08 with df1=2, df2=12, leading to a p-value=0.000. Since the P-
value < α=0.01, we reject Ho at α=0.01 LOS.
There is sufficient evidence that the mean response time differs among circuit type at
α=0.01 LOS.
b)
8|Page
Overall, the boxplots reveal the same information as Tukey’s test: only
circuit type 2 appears to have a drastically different mean. Boxplots
provide a better visual of differences in treatment means, but the multiple
comparisons test is necessary to ensure that any differences you see
actually exist. It is the similar conclusion form part b.
c1=1; c2=-2; c3=1; ӯ1. =10.8; ӯ2. =22.2; ӯ3. =8.4; ∑3𝑖=1 𝑐𝑖 2 =6; MSE=16.9; df=12; n=5
∑3𝑖=1 𝑐𝑖∗ӯi. −25.2
TS: to= = 4.5033= -5.595
𝑀𝑆𝐸∗∑ 𝑐𝑖2
√
𝑛
The test shows t=-5.595 with df=12 leading to a p-value=0.000. Since the P-value <
α=0.01, we reject Ho at α=0.01 LOS.
There is sufficient evidence that the response time of circuit type 2 is different from the
other two at α=0.01 LOS (Circuit type 2 differs from the average of circuit type 1 and
circuit type 3).
𝑆𝑆𝑡𝑚𝑡 543.6
e) R2=𝑆𝑆𝑡𝑜𝑡𝑎𝑙= 746.4 =0.7283
About 73% of the total variability in response (Response Time) has been explained by
the treatment (Circuit Type).
9|Page
f) If the design engineer wished to minimize the response time, he/she should
select either type 1 or type 3 as they are not different from each other and have
the lowest response time.
The normality assumption may not be valid, but there are outliers. The constant
variance assumption is valid.
> shapiro.test(Resid)
The Shapiro test for Normality confirms what we can see in the QQ-plot – a deviation from Normality on
one tail of the residual’s distribution. The assumption of Normality has been violated. However, ANOVA
is relatively robust against deviations from Normality.
:
The test shows F=8.29 with df1=3, df2=8 leading to a p-value=0.008. Since the P-value <
α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that there is significant difference between wafer positions
at α=0.05 LOS.
10 | P a g e
𝑀𝑆𝑡𝑚𝑡−𝑀𝑆𝐸 5.407−0.652
b) 𝜎̂𝜏 2 = = = 1.585
𝑛 3
c) 𝜎̂2 =MSE = 0.652
d)
From the QQ plot, it appears that the data is normally distributed. The constant
variance assumption seems to be not valid from the residuals vs fitted graph, but
according to Bartlett test of homogeneity of variances the constant variance is valid
(Bartlett's K-squared = 5.2198, df = 3, p-value = 0.1564).
11 | P a g e
𝑖 = 1,2,3,4
a) Model: yij=µ+ 𝜏I + 𝜀𝑖𝑗 , {
𝑗 = 1,2, … , 𝑛𝑖
b) Ho: The four catalyst have the same effect on the concentration
H1: The four catalyst does not have the same effect on the concentration
Source DF SS MS F
Treat a-1=4-1= 3 MS*DF= 28.56 MSTreat/MSE =
28.56*3 = 85.68 28.56/2.88 =
9.917
Error N-a=16-4= 12 34.56 SS/DF=
34.56/12 = 2.88
Total N-1=16-1 = 15 SSTreat + SSError =
85.68+34.56 =
120.24
MStmt
TS: Fo= MSerror= 9.9167 with df1=dftmt=3 and df2=dferror=12
There is sufficient evidence that the mean concentration differs for different
catalyst group at α=0.05 LOS.
12 | P a g e
Solution for Problem 7
Exercise 3.35: Consider the single-factor random effects model discussed in this
chapter. Develop a procedure for finding a 100(1 − α)% confidence interval on the
σ2
ratio (σ2 +𝜎2 ). Assume that the experiment is balanced.
𝜏
𝑀𝑆𝑇𝑟𝑒𝑎𝑡 σ2
1 − α = P[𝐹1−𝛼 (𝑎 − 1, 𝑁 − 𝑎) ≤ ≤ 𝐹𝛼 (𝑎 − 1, 𝑁 − 𝑎)]
2 𝑀𝑆𝐸 𝑛 σ2 + 𝜎𝜏2 2
Exercise 3.37: Show that the variance of the linear combination ∑𝑎𝑖=1 𝑐𝑖 𝑥𝑖 = 𝜎 2 ∑𝑎𝑖=1 𝑛𝑖 𝑐𝑖2
𝑎 𝑎 𝑎 𝑎 𝑛𝑖 𝑎 𝑛𝑖
Exercise 3.38: In a fixed effects experiment, suppose that there are n observations for
each of the four treatments. Let 𝑄12 , 𝑄22 , 𝑄32 be single-degree-of-freedom components for
the orthogonal contrasts. Prove that 𝑆𝑆𝑇𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 = 𝑄12 + 𝑄22 + 𝑄32.
13 | P a g e
∑4𝑖=1 𝐶1𝑖 𝐶2𝑖 𝐶3𝑖 = 3 ∗ 0 ∗ 0 + (−1) ∗ 2 ∗ 0 + (−1) ∗ (−1) ∗ 1 + (−1) ∗ (−1) ∗ (−1) = 0 +
0 + 1 + (−1) = 0.
Letting 𝑆𝑆1 = 𝑄12 , 𝑆𝑆2 = 𝑄22 , 𝑆𝑆3 = 𝑄32 , it is sufficient to prove that 𝑆𝑆𝑇𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 = 𝑄12 +
𝑄22 + 𝑄32 by giving a mathematical expression for SSTreatment:
3
𝑛[(3𝜇̂ 1 − 𝜇̂ 2 − 𝜇̂ 3 − 𝜇̂ 4 )2 + 2(2𝜇̂ 2 − 𝜇̂ 3 − 𝜇̂ 4 )2 + 6(𝜇̂ 3 − 𝜇̂ 4 )2 ]
∑ 𝑄𝑘2 =
12
𝑘=1
14 | P a g e
3
𝑛[9 ∑4𝑖=1 𝜇̂ 𝑖 − 6 ∑ | ∑𝑖<𝑗(𝜇̂ 𝑖 𝜇̂ 𝑗 )] 𝑛[3 ∑4𝑖=1 𝜇̂ 𝑖 − 2 ∑ | ∑𝑖<𝑗(𝜇̂ 𝑖 𝜇̂ 𝑗 )]
𝑆𝑆𝑇𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 = ∑ 𝑄𝑘2 = =
12 4
𝑘=1
Source DF SS MS F P
Treatment 4 1010.56 1010.56/4 = 252.64 29.84 1-pf(29.84,4,20) = 0.0000
Block 29-20-4 = 5 64.765*5 = 323.825 64.765 MSblock/MSe = 7.65 1-pf(7.65,5,20) = 0.0003
Error 20 169.33 169.33/20 = 8.4665
a) Ho: the effect of four chemical agents on the strength of cloth are same.
H1: the effect of four chemical agents on the strength of cloth are not the same.
(same as below)
H0: τ1 = τ2 = τ3 = τ4 = 0
HA: τi ≠ 0 for at least one i (where i=1,2,3,4)
The test shows F=2.3761 with df1=3, df2=12, leading to a p-value=0.1211. Since the P-
value > α=0.05, we fail to reject Ho at α=0.05 LOS.
There is insufficient evidence that the mean strength of cloth differs among chemical
agents at α=0.05 LOS.
15 | P a g e
b)
Bolt
Chemical 1 2 3 4 5
1 73 68 74 71 67 353
2 73 67 x 72 70 282
3 75 68 78 73 68 362
4 73 71 75 75 69 363
Block totals 294 274 227 291 274 y'..=1360
𝑎𝑦 ′ 𝑖. + 𝑏𝑦 ′ .𝑗 − 𝑦′..
𝑥=
(𝑎 − 1)(𝑏 − 1)
4(282) + 5(227) − 1360
𝑥 = 𝑦23 = = 75.25
(3)(4)
The original value of chemical type 2 and bolt 3 is 75 and the estimation of this value
using the exact analysis is 75.25.
They are very close. The exact analysis is doing its job.
Thus, y2. =357.25, y.3=302.25, and y.. =1435.25
Applying ANOVA test on the new information:
The test shows F=2.154 with df1=3, df2=11, leading to a p-value=0.1466. Since the P-
value > α=0.05, we fail to reject Ho at α=0.05 LOS.
There is insufficient evidence that the mean strength of cloth differs among chemical
agents at α=0.05 LOS.
The test shows F=21.6055 with df1=4, df2=12, leading to a p-value=0.000. Since the P-
value < α=0.05, we reject Ho at α=0.05 LOS.
16 | P a g e
There is sufficient evidence that the block effects are statistically significant at α=0.05
LOS.
d)
17 | P a g e
Estimation of Variance Component:
𝜎̂2=MSE = 1.817
𝑀𝑆𝑡𝑚𝑡−𝑀𝑆𝑒 4.317−1.817
𝜎𝜏 2= = = 0.5
𝑏 5
𝜎̂2=MSE = 1.817
𝑀𝑆𝑡𝑚𝑡−𝑀𝑆𝑒 4.317−1.817
𝜎𝜏 2= = = 0.5
𝑏 5
𝑀𝑆𝑏𝑙𝑜𝑐𝑘−𝑀𝑆𝑒 39.250−1.817
𝜎β 2= = = 9.358
𝑎 4
Treatment
Ho: 𝜏1= 𝜏2= 𝜏3= 0
H1: 𝜏i ≠0 for at least one i, i=1,2,3
The test shows F=50.152 with df1=2, df2=6, leading to a p-value=0.000. Since the P-
value < α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that the treatment effects are statistically significant at
α=0.05 LOS.
Blocks
Ho: β1= β2= β3= β4= 0
H1: βj ≠0 for at least one j, j=1,2,3,4
18 | P a g e
The test shows F=18.065 with df1=3, df2=6, leading to a p-value=0.002. Since the P-
value < α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that the block effects are statistically significant at α=0.05
LOS.
19 | P a g e
b) Using p.adj=”none”
c) Residual
The assumption of normality is valid. There seems to be 4 outliers in the data. The
variance is not quite constant based on the residual plots. The variance of the residuals
increases as we move from Design 1 to 3.
d) If this experiment was run without the region, then it will be One-Way ANOVA
(CRD).
20 | P a g e
Ho: 𝜏1= 𝜏2= 𝜏3= 0
H1: 𝜏i ≠0 for at least one i, i=1,2,3
The test shows F=7.4984 with df1=2, df2=9, leading to a p-value=0.012. Since the P-
value < α=0.05, we reject Ho at α=0.05 LOS.
There is sufficient evidence that the treatment effects are statistically significant at
α=0.05 LOS.
In both cases we have rejected the Ho. But in the ANOVA the Residual Error has
increased because the “Blocking Error was added to it”.
I would use part a, because I want my noise to be small and my power to be high.
21 | P a g e
The normality assumption is valid.
c) Log
22 | P a g e
Solution for Problem 13
𝑖 = 1,2, . . . , 𝑝
a) Model: yijk=µ+αi + 𝜏j + βk + 𝜀𝑖𝑗𝑘 , { 𝑗 = 1,2, … , 𝑝
𝑘 = 1,2, … , 𝑝
yijk is the observation in the ith row, and kth column for the jth treatment, μ is the
overall mean, αi is the ith row effect, τj is the jth treatment effect, βk is the kth column
effect and εijk is a random error.
Assumptions: 𝜀𝑖𝑗 ~ NID(0, 𝜎 2 )
b)
Treatment
There is sufficient evidence that there is a significant difference in the mean assembly
time generate by the different assembly methods at α=0.05 LOS.
There is insufficient evidence that there is any difference between assembly order at
α=0.05 LOS.
Column (Operators)
23 | P a g e
H1: βk ≠0 for at least one k, k=1,2,3,4
There is sufficient evidence that the difference in the mean assembly time was
generated by different operators at α=0.05 LOS.
c)
About 93% of the total variation in response has been explained by the
treatments, columns and rows.
Conclusion: There is significant evidence to reject the claim that the treatment
effects of the three designs for mail responses are the same.
24 | P a g e
Conclusion: There is significant evidence to reject the claim that the block effects of
the four regions for mail responses are the same.
R-OUTPUT:
> X=c(14,12,13,11,17,14,11,12,14,13,11,10,13,13,12,12,12,10,9,8)
> Treatment=c(2,3,4,5,1,2,4,5,1,3,4,5,1,2,3,4,1,2,3,5)
> Treatment=as.factor(Treatment)
> Block=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5)
> Block=as.factor(Block)
$ANOVA.table
Response: X
Residuals 10.02 11
2(3−1) 4
With a=4, and b=6, N=24=4*3=6*2 with k=3 and r=2; hence 𝜆 = = 3 ~1. This is an
4−1
example table of data where each x is some data point.
25 | P a g e
Treatment Block 1 Block 2 Block 3 Block 4 Block 5 Block 6
1 x x x
2 x x x
3 x x x
4 x x x
Letting a=b=c=p for each letter going from 1 to p, the least squares estimates, SSE, for
the model is:
𝑝 𝑝 𝑝
𝐿 = ∑ | ∑ | ∑(𝑥𝑖𝑗𝑘 − 𝜇 − 𝛼𝑖 − 𝜏𝑗 − 𝛽𝑘 )2
𝑖=1 𝑗=1 𝑘=1
𝜕𝑆𝑆𝐸
After differentiating ( = 0 and so on) each term in this sum with respect to the
𝜕𝜇
model parameters at zero, we arrive at the following model restrictions:
After more reductions of the zero terms in L, and refashioning of symbols, we arrive at
the following model parameter estimates:
𝑥… 𝑥𝑖.. 𝑥.𝑗. 𝑥
𝜇̂ = = 𝑥̅… , 𝛼̂𝑖 = − 𝑥̅… = 𝑥̅𝑖.. − 𝑥̅… , 𝜏̂𝑗 = − 𝑥̅… = 𝑥̅.𝑗. − 𝑥̅… , 𝛽̂𝑘 = 𝑝..𝑘 − 𝑥̅… = 𝑥̅..𝑘 − 𝑥̅...
𝑝2 𝑝 𝑝
Exercise 4.31: Derive the missing value formula (Equation 4.27) for the Latin square
design.
Letting 𝑥𝑖𝑗𝑘 be the missing value in this case, we calculate the sum of squares for error
where 𝑥′𝑖.. , 𝑥′.𝑗. , 𝑥′..𝑘 , 𝑥′… are total measurements in lieu of 𝑥𝑖𝑗𝑘 .
26 | P a g e
2 2 2
2
(𝑥 ′ 𝑖.. + 𝑥𝑖𝑗𝑘 ) (𝑥 ′ .𝑗. + 𝑥𝑖𝑗𝑘 ) (𝑥 ′ ..𝑘 + 𝑥𝑖𝑗𝑘 ) 2(𝑥 ′ … + 𝑥𝑖𝑗𝑘 )
𝑆𝑆𝐸 = 𝑥𝑖𝑗𝑘 − − − + +𝑋
𝑝 𝑝 𝑝 𝑝
Where X are the rest of the terms for SSE that do not involve 𝑥𝑖𝑗𝑘 . Similar to looking for
𝜕𝑆𝑆𝐸
the model parameters in Exercise 4.30, we differentiate 𝜕𝑥 = 0 and follow some
𝑖𝑗𝑘
arithmetical steps, so
27 | P a g e