let
u1=means of population of measurement from caliper 1
u2= means of population of measurement from caliper 2
Null Hypothesis- Ho:u1=u2 that is u1-u2=0
Alternative hypothesis - Ha: u1\("\neq"\) u2 meaning u1\("\neq"\) u2
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)
Checking for the correlation between the two samples
cor(Caliper1,Caliper2)
## [1] 0.1276307
Since the correlation of the sample is 0.1276307, this points us to an indication that we need to use a two sample t-test.
Checking for the Normality and combine variance of both samples we have.
qqnorm(Caliper1, main = "Normal probability plot of caliper 1")
qqline(Caliper1,col="blue")
qqnorm(Caliper2, main = "Normal probability plot of caliper 2")
qqline(Caliper1,col="red")
boxplot(Caliper1,Caliper2,main="Boxplot of caliper 1 and Caliper 2", names=c("caliper 1","caliper 2"))
From the plots obtained we can see that
The Normal probability plot of caliper 1 and caliper 2 follows a fairly straight line which indicates that we can assume a normal distribution.
Also, the variances of both plots looks fairly the same and therefore we can assume constant variance.
?t.test
## starting httpd help server ... done
t.test(Caliper1,Caliper2,alternative = "two.sided",var.equal = TRUE)
##
## Two Sample t-test
##
## data: Caliper1 and Caliper2
## t = 0.40519, df = 22, p-value = 0.6893
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.001029568 0.001529568
## sample estimates:
## mean of x mean of y
## 0.26625 0.26600
Since the p-value(0.6893) obtained is greater than our reference p-value(0.05). We are failing to reject the null hypothesis which states that Ho:u1=u2 . This expressively means that is no significant difference between means of population of measurement from caliper 1(u1) and means of population of measurement from caliper 2(u2)
the p-value computed is 0.6893
A 95percent confidence interval is
-0.001029568<u1-u2<0.001529568
Kmethod<- c(1.186,1.151,1.322,1.339,1.200,1.402,1.365,1.537,1.559)
Lmethod <- c(1.061,0.992,1.063,1.062,1.065,1.178,1.037,1.086,1.052)
let
u1= data of mean performance from the karlsruhe Method
u2= data of means performance from the Lehigh Method
Null Hypothesis- Ho:u1=u2 that is u1-u2=0
Alternative hypothesis - Ha: u1\("\neq"\) u2 meaning u1\("\neq"\) u2
Checking for the correlation between the two samples
cor(Kmethod,Lmethod)
## [1] 0.3821669
correlation of the sample is 0.3821669
t.test(Kmethod,Lmethod,alternative="two.sided",paired = TRUE)
##
## Paired t-test
##
## data: Kmethod and Lmethod
## t = 6.0819, df = 8, p-value = 0.0002953
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.1700423 0.3777355
## sample estimates:
## mean of the differences
## 0.2738889
Since the p-value of our model p-value = 0.0002953 is less than our reference value of significance (alpha=0.05) is , we reject the null hypothesis, stating that is a significant difference between the data of mean performance of the karlsruhe Method and data of means performance from the Lehigh Method.
P value computed is 0.0002953
A 95percent confidence interval is
0.1700423<u1-u2<0.3777355
Investigating the normality assumption for both samples we have
qqnorm(Kmethod, main = "Normal probability plot of Kmethod")
qqline(Kmethod,col="blue")
qqnorm(Lmethod, main = "Normal probability plot of Lmethod")
qqline(Lmethod,col="red")
From the plots obtained we can see that
The Normal probability plot of K-method and L-method follows a fairly straight line which indicates that we can assume a normal distribution
For the normality assumption for difference in mean we have
qqnorm(Kmethod-Lmethod,main = "Differences in mean between k AND L methods")
qqline(Kmethod-Lmethod,col="green")
We can visibly see that the differences in means of the K and L method also follows a fairly straight line which indicates that we can assume a normal distribution. We can also visibly see the presence of outliers.
The role of normality assumption in the paired t-test is only of a weak assumption with little importance. As it concerns the paired t-test, the assumption of normality only applies to the distribution of the dissimilarities in of the data samples which are similar. Only the differences in the measurement has to be normally distributed.
Thick95<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
Thick100<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
Stating the Hypothesis
let
u1= mean of thickness 95
u2= mean of thickness 100
The Null hypothesis- Ho: u1=u2, u1=u2 (mean of thickness 95 is the same as mean of thickness100)
Alternative hypothesis- Ha: u2<u1 (mean of thickness 100 is less than mean of thickness 95)
Using the two sample t-test we have
t.test(Thick100,Thick95,var.equal = TRUE,alternative = "less")
##
## Two Sample t-test
##
## data: Thick100 and Thick95
## t = -2.6751, df = 14, p-value = 0.009059
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
## -Inf -0.8608158
## sample estimates:
## mean of x mean of y
## 6.846625 9.366625
The p-value obtained from the our model is 0.009059 which is less than our reference level of significance (0.05). This indicates we are failing to reject our null hypothesis(Ho:u1-u2=0) and stating that the mean thickness of 100 is less than the mean thickness of 95.
checking for the assumption of normality we have
qqnorm(Thick100,main="NPP for thick 100")
qqline(Thick100,col="green")
qqnorm(Thick95,main="NPP for thick 95")
qqline(Thick95,col="blue")
From the plots above we can see that the data points of thick 95 and thick100 fairly falls on straight line .
We can therefore make conclusions that it approximately follows a normal distribution.
library(pwr)
## Warning: package 'pwr' was built under R version 4.1.3
n1 <- length(Thick100)
n2 <- length(Thick95)
s1 <- sd(Thick100)
s2 <- sd(Thick95)
sp <- sqrt(((n1-1)*s1^2 +(n2-1)*s2^2 )/ (n1+n2-2))
power.t.test(n=8,delta=2.5,sd=sp,sig.level = 0.05,power=NULL,type = "two.sample",alternative = "one.sided")
##
## Two-sample t test power calculation
##
## n = 8
## delta = 2.5
## sd = 1.884034
## sig.level = 0.05
## power = 0.8098869
## alternative = one.sided
##
## NOTE: n is number in *each* group
The power from this test is approximately 0.81 (81 percent ) obtained.
Question 2.27
flow125 <- c(2.7,4.6,2.6,3.0,3.2,3.8)
flow200 <- c(4.6,3.4,2.9,3.5,4.1,5.1)
let
u1= uniformity observation values for flow 125
u2= uniformity observation values for flow 200
Null Hypothesis- Ho:u1=u2 that is u1-u2=0
Alternative hypothesis - Ha: u1\("\neq"\) u2 meaning u1\("\neq"\) u2
wilcox.test(flow125,flow200)
## Warning in wilcox.test.default(flow125, flow200): cannot compute exact p-value
## with ties
##
## Wilcoxon rank sum test with continuity correction
##
## data: flow125 and flow200
## W = 9.5, p-value = 0.1994
## alternative hypothesis: true location shift is not equal to 0
Since the p-value of our model p-value =0.1994 is greater than our reference value of significance (alpha=0.05) is , we fail to reject the null hypothesis, stating that the mean flow for 125 is the same as the mean flow of 200. Which translates to the fact that C2F6 flowrate does not in anyway have an effect on average etch uniformity.