第一次发帖,照片可能不好用,这是我输的代码。
> weight <- c(102.5,102.4,102.0,101.8,101.8,102.1,102.3,102.5,102.6,102.8,103.4,104.2)
> t.test(x=weight,mu=102.4,alternative="two.sided") #双尾检验
One Sample t-test
data: weight
t = 0.67006, df = 11, p-value = 0.5166
alternative hypothesis: true mean is not equal to 102.4
95 percent confidence interval:
102.0954 102.9713
sample estimates:
mean of x
102.5333
> pt(0.67006,11)
[1] 0.7416804
|