2.32

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)
t.test(caliper1,caliper2,alternative = "two.sided", paired = FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  caliper1 and caliper2
## 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

\(H_o: \mu_1 = \mu_2\) \(H_a: \mu_1 \neq \mu_2\)

\(\mu_1\): caliper 1 \(\mu_2\): caliper 2

the p-value is is 0.6897 which is greater than alpha (0.05). Therefore, we fail to reject the null hypothesis At a significance level of 0.05, the mean of caliper 1 = the mean of caliper 2

the 95% confidence interval is: -0.001038888 0.001538888

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)
t.test(karlsrushe,lehigh, alternative = "two.sided", paired = TRUE)
## 
##  Paired t-test
## 
## data:  karlsrushe and lehigh
## 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

\(H_o: \mu_1 = \mu_2\) \(H_a: \mu_1 \neq \mu_2\)

\(\mu_1\): karlsrushe \(\mu_2\): lehigh

the p-value is is 0.0002953 which is less than alpha (0.05). Therefore, reject the null hypothesis and accept the alternate hypothesis. At a significance level of 0.05, the the karlsrushe glider method does not equal the mean of the lehigh glider method.

the 95% confidence interval is: 0.1700423 0.3777355

girder <-c("S1/1", "S2/1", "S3/1", "S4/1", "S5/1", "S2/1", "S2/2", "S2/3", "S2/4")
dat1 <- data.frame(karlsrushe,lehigh)
qqnorm(karlsrushe, main = "Normal Probability Plot", xlab = "Karlrushe", ylab ="probability" )

qqnorm(lehigh, main="Normal Probabilty Plot", xlab = "Lehigh", ylab = "probability")

The normality assumption in the t-test assumes that the differences are normal and not necessarily the observations are normal.

2.29(e,f)

e. check probability normalness

We use the Levene’s test to see if the assumption is valid. If the Levene’s test, proves to be valid we can assume normality because we proved equal variance.

library(lawstat)
data5<-read.csv("https://raw.githubusercontent.com/maryadepoju98/DesignExperiment/main/2_29.csv",header=TRUE)
qqnorm(data5$degree95C, main ="Normal Probibility Plot", xlab = "95 Degrees Celsius", ylab = "probability")

qqnorm(data5$degree100C,  main ="Normal Probibility Plot", xlab = "100 Degrees Celsius", ylab = "probability")

The p value (0.1317) is > than alpha (0.05) so we can assume the variances are equal and assume normality.

f. Power

library(pwr)
pwr.t.test(n = 8, sig.level= 0.05, d = 2.5, alternative = "two.sided", type="two.sample", power = NULL)
## 
##      Two-sample t test power calculation 
## 
##               n = 8
##               d = 2.5
##       sig.level = 0.05
##           power = 0.9962561
##     alternative = two.sided
## 
## NOTE: n is number in *each* group

The power of this test is 0.9962561

2.27

\(H_o:\mu_1 = \mu_2\) \(H_a: \mu_1 \neq \mu_2\)

sccm125 <-c(2.7,4.6,2.6,3.0,3.2,3.8)
sccm200 <-c(4.6,3.4,2.9,3.5,4.1,5.1)
wilcox.test(sccm125,sccm200)
## Warning in wilcox.test.default(sccm125, sccm200): cannot compute exact p-value
## with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  sccm125 and sccm200
## W = 9.5, p-value = 0.1994
## alternative hypothesis: true location shift is not equal to 0

The p-value is 0.1994 which is greater than alpha (0.05). Therefore we fail to reject the null hypothesis