Professional Documents
Culture Documents
1.)> x=c(12,12,32,43,32,12,32,43,54,12,13,42);
> t.test(x,alternative="greater",mu=0.3)
data: x
20.25171 Inf
sample estimates:
mean of x
28.25
2.)> ctrl=c(12,32,43,5,45,23,12,43,54)
> treat=c(12,43,54,32,12,3,43,34,23)
> t.test(ctrl,treat,alternative="less",var.=TRUE)
-Inf 15.70414
sample estimates:
mean of x mean of y
29.88889 28.44444
Paired t-test
3.)> x=c(1,2,3,4,5,6,7,8,9,7)
> reg=c(12,32,43,54,56,45,32,12,23,54)
> pre=c(1,2,3,4,2,5,7,6,7,9)
> t.test(pre,reg,alternative="greater",paired=TRUE)
-41.41934 Inf
sample estimates:
-31.7