> ttest = t.test(x,y) > ttest Welch Two Sample t-test
data: x and y t = 15.506, df = 109.45, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 2.922444 3.778957 sample estimates: mean of x mean of y 20.20033 16.84963
> ttest$estimate# 均值 mean of x mean of y 20.20033 16.84963
> ttest$null.value difference in means 0
> ttest$alternative [1] "two.sided"
> ttest$method# 检验方法 [1] "Welch Two Sample t-test"
> ttest$parameter# degree of freedom,自由度 df 109.4474
> ttest$statistic# t, ratio of difference between two groups with difference within groups,即组间差异与组内差异的比值; t # t=(mean of x - mean of y)/stderr = (20.20033-16.84963)/0.2160862 = 15.50631 15.50631
> ttest$data.name # data [1] "x and y"
> ttest$stderr# standard error of the difference,均值差的标准误(均值标准误的差) [1] 0.2160862