a <- c(15,10,10,7,7,4,9,6,10,12) b <- c(8,9,2,0,0,9,9,7,3,3) mean(a) mean(b) sd(a) sd(b) t.test(a-b, alternative="less") mean(a)-mean(b) sd(a)-sd(b)
Standard input is empty
[1] 9
[1] 5
[1] 3.162278
[1] 3.771236
One Sample t-test
data: a - b
t = 2.6312, df = 9, p-value = 0.9863
alternative hypothesis: true mean is less than 0
95 percent confidence interval:
-Inf 6.78676
sample estimates:
mean of x
4
[1] 4
[1] -0.6089585