1 Question 2.32

The diameter of a ball bearing was measured by 12 inspectors, each using two different kinds of calipers. The results were:

Inspector Caliper 1 Caliper 2
1 0.265 0.264
2 0.265 0.265
3 0.266 0.264
4 0.267 0.266
5 0.267 0.267
6 0.265 0.268
7 0.267 0.264
8 0.267 0.265
9 0.265 0.265
10 0.268 0.267
11 0.268 0.268
12 0.265 0.269
  1. Is there a significant difference between the means of the population of measurements from which the two samples were selected? Use ( α= 0.05)

  2. Find the P-value for the test in part (a).

  3. Construct a 95 percent confidence interval on the difference in mean diameter measurements for the two types of calipers.

caliper_1 <- c(0.265, 0.265, 0.266, 0.267, 0.267, 0.265, 0.267, 0.267, 0.265, 0.268, 0.268, 0.265)
caliper_2 <- c(0.264, 0.265, 0.264, 0.266, 0.267, 0.268, 0.264, 0.265, 0.265, 0.267, 0.268, 0.269)

Assumption: the inspector used the same caliper for both measurement which makes the data paired

performing T-test

Difference <- caliper_1-caliper_2
qqnorm(Difference,main = "Normal Probability Plot of the Difference", cex =3, bg = "black", lwd = 2, pch = 21)
qqline(Difference, lwd = 3)

#Next evaluate the correllation

#Finding Correlation:
cor(caliper_1,caliper_2)
## [1] 0.1276307

##the normal probability plot

##For Caliper_1

qqnorm(caliper_1, main = "Normal Probability Plot Caliper_1", cex =2, bg = "green", lwd = 3, pch = 21)
qqline(caliper_1, lwd = 2)

##For Caliper_2

qqnorm(caliper_2, main = "Normal Probability Plot Caliper_2", cex =2, bg = "violet", lwd = 3, pch = 21)
qqline(caliper_1, lwd = 3)

Paired T-Test

t.test(caliper_1,caliper_2,paired=TRUE)
## 
##  Paired t-test
## 
## data:  caliper_1 and caliper_2
## t = 0.43179, df = 11, p-value = 0.6742
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
##  -0.001024344  0.001524344
## sample estimates:
## mean difference 
##         0.00025

Conclusion/Inference

Since P value = 0.6742, it is much greater than 0.05. As a result, we fail to reject the hypothesis . We also conclude that the two population samples are closely related.

b, What is the P Value? P = 0.6742

c,

2 Question 2.34:

An article in the Journal of Strain Analysis (vol. 18, no. 2, 1983) compares several procedures for predicting the shear strength for steel plate girders. Data for nine girders in the form of the ratio of predicted to observed load for two of these procedures, the Karlsruhe and Lehigh methods, are as follows:

Girder Karlsruhe Method Lehigh Method
S1/1 1.186 1.061
S2/1 1.151 0.992
S3/1 1.322 1.063
S4/1 1.339 1.062
S5/1 1.200 1.065
S2/1 1.402 1.178
S2/2 1.365 1.037
S2/3 1.537 1.086
S2/4 1.559 1.052
  1. Is there any evidence to support a claim that there is a difference in mean performance between the two methods? Use ( α�= 0.05)

  2. What is the P-value for the test in part (a)?

  3. Construct a 95 percent confidence interval for the difference in mean predicted to observed load.

  4. Investigate the normality assumption for both samples.

  5. Investigate the normality assumption for the difference in ratios for the two methods.

  6. Discuss the role of the normality assumption in the paired t-test.

Solution

karlsrushe <-c(1.186,1.151,1.322,1.339,1.200,1.402,1.365,1.537,1.559)
lehigh <- c(1.061,0.992,1.063,1.062,1.065,1.178,1.037,1.086,1.052)
Difference <- (karlsrushe-lehigh)

\[ H_{0}:\mu _{1}\neq \mu _{2} \]

\[ H_{0}:\mu _{1}= \mu _{2} \]

Where μ1 = Mean data recorded by Karlsrushe

μ2 = Mean data recorded by Lehigh method

a. Paired T Test

t.test(karlsrushe,lehigh, paired = TRUE)
## 
##  Paired t-test
## 
## data:  karlsrushe and lehigh
## t = 6.0819, df = 8, p-value = 0.0002953
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
##  0.1700423 0.3777355
## sample estimates:
## mean difference 
##       0.2738889

We have a P value of 0.0002953 which is way less than 0.05. As a result, we reject the hypothesis.

  1. P Value of test

P value = 0.0002953

  1. Normality Assumption for both Sample
qqnorm(karlsrushe,main="Normal Plot of Caliper 1 Data", cex=3, bg="green", lwd=2, pch=21)
qqline(karlsrushe, lwd=3)

Deductions The plot seems to be partially normal

Normal plot for Lehigh Method

qqnorm(lehigh, main="Normal Plot of Caliper 2 Data", cex=2, bg="purple", lwd=3, pch=21)
qqline(lehigh, lwd=3)

Remarks The plot seems normal

  1. Normal Assumption for the difference in ratios for the two methods
qqnorm(Difference, main="Ratio Differences: Normal Probability Plot", cex=2, bg="yellow", lwd=2, pch=21)
qqline(Difference, lwd=2)

Deduction The data appears normal, validating the assumption that it is normal

3 Question 2.29:

Photoresist is a light-sensitive material applied to semiconductor wafers so that the circuit pattern can be imaged on to the wafer. After application, the coated wafers are baked to remove the solvent in the photoresist mixture and to harden the resist. Here are measurements of photoresist thickness (in kA) for eight wafers baked at two different temperatures. Assume that all of the runs were made in random order.

95 C 100 C
11.176 5.263
7.089 6.748
8.097 7.461
11.739 7.015
11.291 8.133
10.759 7.418
6.476 3.772
8.315 8.963

e. Check the assumption of normality of the photoresist thickness.

f. Find the power of this test for detecting an actual difference in means of 2.5 kA.

Solution

Baking95 <- c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
Baking100 <- c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)

[Solution e]

Checking the assumption of normality: we plot the normal probability curve

Baking at 95C, the Normal Probability Plot

qqnorm(Baking95,main="Baking at 95C: Normal Probability Plot", ylab = "Photoresist Thickness", cex=3, bg="green", lwd=2, pch=21)
qqline(Baking95, lwd=3)

Baking at 100C, the Normal Probability Plot

qqnorm(Baking100,main="Baking at 100C: Normal Probability Plot", ylab = "Photoresist Thickness", cex=3, bg="brown", lwd=2, pch=21)
qqline(Baking100, lwd=3)

Deduction: the data appears normal

[Solution F] Power of this test for detecting an actual difference in means of 2.5 kA.

Calculate power Sigma level: 0.05 d = (2.5 / St Dev) We use the Power Analysis of 2 Sample T-Test

Estimating the Pooled Standard Deviation for the given samples

sd95<- c(sd(Baking95))
print(sd95)
## [1] 2.099564
sd100<- c(sd(Baking100))
print(sd100)
## [1] 1.640427
SP <- sqrt(((8-1)*sd95^2+(8-1)*sd100^2)/(8+8-2))
print(SP)
## [1] 1.884034

Power that Gives a mean Difference of 2.5kA

library(pwr)
Power1<- c(pwr.t.test(n=8,d=1.3269,sig.level=0.05,power=NULL,type="two.sample"))
print(Power1)
## $n
## [1] 8
## 
## $d
## [1] 1.3269
## 
## $sig.level
## [1] 0.05
## 
## $power
## [1] 0.6945613
## 
## $alternative
## [1] "two.sided"
## 
## $note
## [1] "n is number in *each* group"
## 
## $method
## [1] "Two-sample t test power calculation"

Power is 0.6945613

4 Question 2.27:

An article in Solid State Technology, "Orthogonal Design for Process Optimization and Its Application to Plasma Etching" by G. Z. Yin and D. W. Jillie (May 1987) describes an experiment to determine the effect of the C2F6 flow rate on the uniformity of the etch on a silicon wafer used in integrated circuit manufacturing. All of the runs were made in random order. Data for two flow rates are as follows:

Uniformity Observations

C2F6 Flow
(SCCM)
1 2 3 4 5 6
125 2.7 4.6 2.6 3.0 3.2 3.8
200 4.6 3.4 2.9 3.5 4.1 5.1
  1. Does the C2F6 flow rate affect average etch uniformity? Use α�= 0.05. And use Non - Parametric Method:

a). Use non-parametric Test

flow_125 <- c(2.7,4.6,2.6,3.0,3.2,3.8)
flow_200 <- c(4.6,3.4,2.9,3.5,4.1,5.1)

Normal Probability Plot for Flow at 125

qqnorm(flow_125,main="Normal Probability Plot: Flow @ 125 SCCM ", cex=3, bg="magenta", lwd=2, pch=21)
qqline(flow_125, lwd=2)

Deduction: Curve shows some form of normality

Normal Probability Plot for Flow @ 200

qqnorm(flow_200,main="Normal Probability Plot: Flow 200 SCCM", cex=3, bg="yellow", lwd=2, pch=21)
qqline(flow_200, lwd=2)

Deduction: this shows a partially distributed plot

Comparing Standard Deviation Using Box Plot

boxplot(flow_125,flow_200,names=c('Flow 125 ','Flow 200'),main='Flow 125 SCCM Vs Flow 200 SCCM Boxplots')

Comments

the box plot appears to be of the same size implying that the standard deviation is close/similar

Non-Parametric T-Test

wilcox.test(flow_125,flow_200)
## Warning in wilcox.test.default(flow_125, flow_200): cannot compute exact
## p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  flow_125 and flow_200
## W = 9.5, p-value = 0.1994
## alternative hypothesis: true location shift is not equal to 0

Deduction: P value=0.1994 which is more than P=0.05, so we fail to reject the hypothesis.

Complete Source Code

#Q 2.32
caliper_1 <- c(0.265, 0.265, 0.266, 0.267, 0.267, 0.265, 0.267, 0.267, 0.265, 0.268, 0.268, 0.265)
caliper_2 <- c(0.264, 0.265, 0.264, 0.266, 0.267, 0.268, 0.264, 0.265, 0.265, 0.267, 0.268, 0.269)
#performing T test
Difference <- caliper_1-caliper_2
qqnorm(Difference,main = "Normal Probability Plot of the Difference", cex =3, bg = "black", lwd = 2, pch = 21)
qqline(Difference, lwd = 3)

#Finding Correlation:
cor(caliper_1,caliper_2)

##the normal probability plot 
##For Caliper_1
qqnorm(caliper_1, main = "Normal Probability Plot Caliper_1", cex =2, bg = "green", lwd = 3, pch = 21)
qqline(caliper_1, lwd = 2)

##For Caliper_2
qqnorm(caliper_2, main = "Normal Probability Plot Caliper_2", cex =2, bg = "violet", lwd = 3, pch = 21)
qqline(caliper_1, lwd = 3)

#Paired T-Test
t.test(caliper_1,caliper_2,paired=TRUE)


##Question 2.34
karlsrushe <-c(1.186,1.151,1.322,1.339,1.200,1.402,1.365,1.537,1.559)
lehigh <- c(1.061,0.992,1.063,1.062,1.065,1.178,1.037,1.086,1.052)
Difference <- (karlsrushe-lehigh)

#Paireed T-Test
t.test(karlsrushe,lehigh, paired = TRUE)

#Normality

#Normal plot for karlsrushe Method
qqnorm(karlsrushe,main="Normal Plot of Caliper 1 Data", cex=3, bg="green", lwd=2, pch=21)
qqline(karlsrushe, lwd=3)

#Normal plot for Lehigh Method
qqnorm(lehigh, main="Normal Plot of Caliper 2 Data", cex=2, bg="purple", lwd=3, pch=21)
qqline(lehigh, lwd=3)

#Normal Assumption for the difference in ratios for the two methods
qqnorm(Difference, main="Ratio Differences: Normal Probability Plot", cex=2, bg="yellow", lwd=2, pch=21)
qqline(Difference, lwd=2)


##Question 2.29
Baking95 <- c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
Baking100 <- c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)

#Baking at 95C, the Normal Probability Plot
qqnorm(Baking95,main="Baking at 95C: Normal Probability Plot", ylab = "Photoresist Thickness", cex=3, bg="green", lwd=2, pch=21)

#Baking at 100C, the Normal Probability Plot
qqnorm(Baking100,main="Baking at 100C: Normal Probability Plot", ylab = "Photoresist Thickness", cex=3, bg="brown", lwd=2, pch=21)
qqline(Baking100, lwd=3)


##Estimating the Pooled Standard Deviation for the given samples
sd95<- c(sd(Baking95))
print(sd95)

sd100<- c(sd(Baking100))
print(sd100)

SP <- sqrt(((8-1)*sd95^2+(8-1)*sd100^2)/(8+8-2))
print(SP)

#Power that Gives a mean Difference of 2.5kA
library(pwr)
Power1<- c(pwr.t.test(n=8,d=1.3269,sig.level=0.05,power=NULL,type="two.sample"))
print(Power1)


###Question 2.27

#Use non-parametric Test
flow_125 <- c(2.7,4.6,2.6,3.0,3.2,3.8)
flow_200 <- c(4.6,3.4,2.9,3.5,4.1,5.1)


#Normal Probability Plot for Flow at 125
qqnorm(flow_125,main="Normal Probability Plot: Flow @ 125 SCCM ", cex=3, bg="magenta", lwd=2, pch=21)
qqline(flow_125, lwd=2)


#Normal Probability Plot for Flow @ 200
qqnorm(flow_200,main="Normal Probability Plot: Flow 200 SCCM", cex=3, bg="yellow", lwd=2, pch=21)
qqline(flow_200, lwd=2)

#Comparing Standard Deviation Using Box Plot

boxplot(flow_125,flow_200,names=c('Flow 125 ','Flow 200'),main='Flow 125 SCCM Vs Flow 200 SCCM Boxplots')

#Non-Parametric T-Test
wilcox.test(flow_125,flow_200)