The diameter of a ball bearing was measured by 12 inspectors, each using two different kinds of calipers. The results were given in a Table. 1/ Checking if there is a significant difference between the means of the population of measurements from which the two samples were selected? Use alpha= 0.05
caliper1<-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)
Caliper2<-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)
dat<-cbind(caliper1,Caliper2)
we want to test the hypothesis that the means of the population of measurements are the same for each caliper. the appropriate hypothesis: A) H0: mean Calliper1 =mean Caliper2
the alternative hypothesis will be: mean Caliper1 !=mean Caliper2
t.test(caliper1,Caliper2, paired=TRUE)
##
## Paired t-test
##
## data: caliper1 and Caliper2
## t = 0.43179, df = 11, p-value = 0.6742
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.001024344 0.001524344
## sample estimates:
## mean of the differences
## 0.00025
p-value = 0.6742>>> alpha= 0.05 we fail to reject Ho which means there is not significant evidence to conclude that the means of the population of measurements are the same for each caliper.
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 (K) and Lehigh (L) methods
1/ checking if there is any evidence to support a claim that there is a difference in mean performance between the two methods? Use alpha= 0.05.
K<-c(1.186,1.151,1.322,1.339,1.200,1.402,1.365,1.537,1.559)
L<-c(1.061,0.992,1.063,1.062,1.065,1.178,1.037,1.086,1.052)
d<-K-L
data<-cbind(K,L,d)
data<-as.data.frame(data)
t.test(K,L, paired=FALSE,var.equal = TRUE, alternative = "two.sided", mu=0)
##
## Two Sample t-test
##
## data: K and L
## t = 5.3302, df = 16, p-value = 6.767e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.1649580 0.3828197
## sample estimates:
## mean of x mean of y
## 1.340111 1.066222
the p-value = 6.767e-05 the confidence interval is cI:(0.1649580; 0.3828197)
Investigating the normality assumption for both samples.
qqnorm(K, main=" Normal plot of Karlsruhe method")
qqline(K)
qqnorm(L,main="Normal plot of Lehigh method ")
qqline(L)
> these two data are normaly distributed >Investigating the normality assumption for the difference in ratios for the two methods.
qqnorm(d,main="Normal plot for the difference in ratios for the two methods")
qqline(d)
####Problem 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.
T1<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
T2<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
checking for normality
qqnorm(T1,main="Normal plot For Temp1=95 C")
qqline(T1)
qqnorm(T2,main="Normal plot For Temp2=100 C ")
qqline(T2)
> these plots shows that the data are normally distributed. The assumption of normality therefore hold.
Find the power of this test for detecting an actual difference in means of 2.5 kA.
power.t.test(n=8,delta =2.5, sd=1, sig.level=.05, power=NULL, type="paired", alternative = "two.sided")
##
## Paired t test power calculation
##
## n = 8
## delta = 2.5
## sd = 1
## sig.level = 0.05
## power = 0.9999642
## alternative = two.sided
##
## NOTE: n is number of *pairs*, sd is std.dev. of *differences* within pairs
t he disered power is power = 0.999998
sample size would be necessary to detect an actual difference in means of 1.5 kA with a power of at least 0.9?
power.t.test(n=NULL,delta =1.5, sd=1, sig.level=.05, power=0.9, type="paired", alternative = "two.sided")
##
## Paired t test power calculation
##
## n = 6.869959
## delta = 1.5
## sd = 1
## sig.level = 0.05
## power = 0.9
## alternative = two.sided
##
## NOTE: n is number of *pairs*, sd is std.dev. of *differences* within pairs
sample size is n = 6.869959 = 7 pairs
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:
Null hypothesis: mean (flow1)= mean(flow2) alternative: mean(flow1)!= mean( flow2)
flow1<-c(2.7,4.6,2.6,3.0,3.2,3.8)
flow2<-c(4.6,3.4,2.9,3.5,4.1,5.1)
wilcox.test(flow1,flow2)
## Warning in wilcox.test.default(flow1, flow2): cannot compute exact p-value with
## ties
##
## Wilcoxon rank sum test with continuity correction
##
## data: flow1 and flow2
## W = 9.5, p-value = 0.1994
## alternative hypothesis: true location shift is not equal to 0
Does the C2F6 flow rate affect average etch uniformity? Use alpha= 0.05
P value: p-value = 0.1994 as p value is greater than alpha, at 0.05 significance we accept the null hypothesis. And conclude that flow rate does not affect the average etch uniformity