#question 1 problem 2.24(a,b,c,d)
Machine1<-c(16.03,16.04,16.05,16.05,16.02,16.01,15.96,15.98,16.02,15.99)
Machine2<-c(16.02,15.97,15.96,16.01,15.99,16.03,16.04,16.02,16.01,16.00)
summary(Machine1)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 15.96 15.99 16.02 16.02 16.04 16.05
summary(Machine2)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 15.96 15.99 16.01 16.00 16.02 16.04
?t.test
## starting httpd help server ... done
t.test(Machine1,Machine2,var.equal = TRUE)
##
## Two Sample t-test
##
## data: Machine1 and Machine2
## t = 0.79894, df = 18, p-value = 0.4347
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.01629652 0.03629652
## sample estimates:
## mean of x mean of y
## 16.015 16.005
The mean value of both the machines are quite identical, and we failed to reject the hypothesis and value of p tends less than 0.5 and t value tends to less than 1.0
#question 2 problem 2.26(a,b) using levene’s test
Temp<-c(65,81,57,66,82,82,67,59,75,70,64,71,83,59,65,56,69,74,82,79)
type<-c("A","A","A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B","B","B")
library(lawstat)
data<-cbind(type,Temp)
data<-as.data.frame(data)
str(data)
## 'data.frame': 20 obs. of 2 variables:
## $ type: chr "A" "A" "A" "A" ...
## $ Temp: chr "65" "81" "57" "66" ...
data$type<-as.factor(data$type)
data$Temp<-as.numeric(data$Temp)
library(lawstat)
levene.test(data$Temp,data$type,location = "mean")
##
## Classical Levene's test based on the absolute deviations from the mean
## ( none not applied because the location is not set to median )
##
## data: data$Temp
## Test Statistic = 0.0014598, p-value = 0.9699
Temp1<-c(65,81,57,66,82,82,67,59,75,70)
Temp2<-c(64,71,83,59,65,56,69,74,82,79)
t.test(Temp1,Temp2,var.equal = TRUE)
##
## Two Sample t-test
##
## data: Temp1 and Temp2
## t = 0.048008, df = 18, p-value = 0.9622
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -8.552441 8.952441
## sample estimates:
## mean of x mean of y
## 70.4 70.2
#question 3 problem 2.29(a,b,c,e)
temp1<-c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
temp2<-c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
t.test(temp1,temp2,var.equal = TRUE)
##
## Two Sample t-test
##
## data: temp1 and temp2
## t = 2.6751, df = 14, p-value = 0.01812
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.4995743 4.5404257
## sample estimates:
## mean of x mean of y
## 9.366625 6.846625
qqnorm(temp1,main = "1st wafer temparature",ylab = "Thickness")
qqline(temp1)
qqnorm(temp2,main = "2nd wafer temaprature",ylab = "Thickness")
qqline(temp2)
This above normal probability graphs shows the points tends near to the line for the both the graphs respectivily