####example 17
x=c(50.4,50.7,49.1,49,51.1)
t.test(x,mu=50,alternative="two.sided",conf.level=0.95)
####example 18
x=c(0.51,0.51,0.51,0.50,0.51,0.49,0.52,0.53,0.50,0.47,0.51,0.52,0.53,0.48,0.49,0.50,0.52,0.49,0.49,0.50,0.49,0.48,0.46,0.49,0.49,0.48,0.49,0.49,0.51,0.47,0.51,0.51,0.51,0.48,0.50,0.47,0.50,0.51,0.49,0.48,0.51,0.50,0.50,0.53,0.52,0.52,0.50,0.50,0.51,0.51)
t.test(x,mu=0.51,alternative="two.sided",conf.level=0.95)
####example 20
x=c(59,56,56,59,57,55)
y=c(59,59,59,58,55,57)
t.test(x,y,alternative="two.sided",conf.level=0.95,var.equal = TRUE)
var.test(x, y, alternative = "two.sided")
####example 21
x=c(1.84,1.92,1.94,1.92,1.85,1.91,2.07)
y=c(2.81,4.06,3.62,3.27,3.27,3.76)
t.test(x,y,alternative="two.sided",conf.level=0.95,var.equal = FALSE)
var.test(x, y, alternative = "two.sided")
####example 22
x=c(84.63,84.38,84.08,84.41,83.82,83.55,83.92,83.69,84.06,84.03)
y=c(83.15,83.72,83.84,84.2,83.92,84.16,84.02,83.6,84.13,84.24)
t.test(x,y,paired=TRUE, alternative="two.sided",conf.level=0.95,var.equal = FALSE)
###example25,26
library(outliers)
x=c(0.403,0.41,0.401,0.380)
dixon.test(x)
x=c(0.403,0.41,0.401,0.380,0.4,0.413,0.408)
grubbs.test(x)
dixon.test(x)