Question1

caliperA<-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)
caliperB<-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)
cor(caliperA,caliperB)
## [1] 0.1276307
sd(caliperA)
## [1] 0.001215431
sd(caliperB)
## [1] 0.001758098
#cor - 0.12
boxplot(caliperA,caliperB)

qqnorm(caliperA)
qqline(caliperA)

qqnorm(caliperB)
qqline(caliperB)

wilcox.test(caliperA,caliperB)
## Warning in wilcox.test.default(caliperA, caliperB): cannot compute exact p-value
## with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  caliperA and caliperB
## W = 81, p-value = 0.6131
## alternative hypothesis: true location shift is not equal to 0
t.test(caliperA,caliperB)
## 
##  Welch Two Sample t-test
## 
## data:  caliperA and caliperB
## t = 0.40519, df = 19.559, p-value = 0.6897
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.001038888  0.001538888
## sample estimates:
## mean of x mean of y 
##   0.26625   0.26600

Results

Null Hypotheis: H0 : mu1 - mu2 = 0

Alternate Hypothesis:Ha: mu1 - mu2 != 0

p-value: 0.6131

95% Confidence Interval : -0.0010 to 0.0015

Question2

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)

cor(kmethod,lmethod)
## [1] 0.3821669
qqnorm(kmethod)

qqnorm(lmethod)

boxplot(kmethod,lmethod)

wilcox.test(kmethod,lmethod)
## 
##  Wilcoxon rank sum exact test
## 
## data:  kmethod and lmethod
## W = 80, p-value = 8.227e-05
## alternative hypothesis: true location shift is not equal to 0
t.test(kmethod,lmethod,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
t.test(kmethod,lmethod)
## 
##  Welch Two Sample t-test
## 
## data:  kmethod and lmethod
## t = 5.3302, df = 9.8059, p-value = 0.0003557
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.1590886 0.3886892
## sample estimates:
## mean of x mean of y 
##  1.340111  1.066222
qqnorm(kmethod)

qqnorm(lmethod)

d<-kmethod-lmethod
d
## [1] 0.125 0.159 0.259 0.277 0.135 0.224 0.328 0.451 0.507
qqnorm(d)

Results

Null Hypotheis: H0 : mu1 - mu2 = 0, Alternate Hypothesis:Ha: mu1 - mu2 != 0

The p-value is 0.001 and it is very less than the alpha value of0.05 and we could reject the null hypothesis.So there enough evidence to support a claim that there is a difference in mean performance between the two methods

p-value:0.001

95% confidence interval:0.16 to 0.38

Approximately normal

The normality assumption is not violated

Question3

thickness1<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
thickness2<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
s1<-sd(thickness1)
s2<-sd(thickness2)
s3<-mean(s1,s2)

thickness1<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
thickness2<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
cor(thickness1,thickness2)
## [1] 0.2878289
#cor-0.28
#Checking the assumption of normality
qqnorm(thickness1)

qqnorm(thickness2)

#Checking for equal variances

boxplot(thickness1,thickness2)

#(f)
power.t.test(n=8,delta = 2.5,sd=1.64,sig.level = 0.05,alternative = "two.sided")
## 
##      Two-sample t test power calculation 
## 
##               n = 8
##           delta = 2.5
##              sd = 1.64
##       sig.level = 0.05
##           power = 0.8090705
##     alternative = two.sided
## 
## NOTE: n is number in *each* group

Results

The size of the boxes differ by a considerable magnitude and so we can say that the variances are not equal.Hence we could say that we cannot pool the variances for running the test

When checking the assumption of normality we see that the data points tend to be approximately normally. There is no significant deviation from normality assumption.

Question4

A1<-c(2.7,4.6,2.6,3.0,3.2,3.8)
A2<-c(4.6,3.4,2.9,3.5,4.1,5.1)
cor(A1,A2)
## [1] 0.104653
#cor:0.10

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

Results

Null Hypothesis: mu1-mu2 = 0,Alternate Hypothesis: mu1-mu2 != 0

The p-value for this test is 0.1994 and it is greater than aplha=0.05 and so we fail to reject the null hypothesis.So, we could conclude that the C2F6 flow rate does not affect average etch uniformity.

All Code

# Question1

caliperA<-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)
caliperB<-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)
cor(caliperA,caliperB)
sd(caliperA)
sd(caliperB)

#cor - 0.12
boxplot(caliperA,caliperB)
qqnorm(caliperA)
qqline(caliperA)
qqnorm(caliperB)
qqline(caliperB)

wilcox.test(caliperA,caliperB)

t.test(caliperA,caliperB)

# Question2

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)

cor(kmethod,lmethod)
qqnorm(kmethod)
qqnorm(lmethod)
boxplot(kmethod,lmethod)


wilcox.test(kmethod,lmethod)
t.test(kmethod,lmethod,paired = TRUE)


t.test(kmethod,lmethod)

qqnorm(kmethod)
qqnorm(lmethod)

d<-kmethod-lmethod
d
qqnorm(d)

# Question3


thickness1<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
thickness2<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
s1<-sd(thickness1)
s2<-sd(thickness2)
s3<-mean(s1,s2)

thickness1<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
thickness2<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
cor(thickness1,thickness2)
#cor-0.28
#Checking the assumption of normality
qqnorm(thickness1)
qqnorm(thickness2)


#Checking for equal variances

boxplot(thickness1,thickness2)

#(f)
power.t.test(n=8,delta = 2.5,sd=1.64,sig.level = 0.05,alternative = "two.sided")

# Question4


A1<-c(2.7,4.6,2.6,3.0,3.2,3.8)
A2<-c(4.6,3.4,2.9,3.5,4.1,5.1)
cor(A1,A2)
#cor:0.10

var(A1)
var(A2)

wilcox.test(A1,A2)