R语言 t检验实例程序及答案 下载本文

> t.test(a11,b11,alternative=\

Welch Two Sample t-test

data: a11 and b11

t = 1.9772, df = 9.704, p-value = 0.03855

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 0.06604808 Inf sample estimates: mean of x mean of y 0.9958313 0.1749454

> t.test(a11,c11,alternative=\

Welch Two Sample t-test

data: a11 and c11

t = 4.3788, df = 9.086, p-value = 0.0008671

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 1.039104 Inf sample estimates:

mean of x mean of y 0.9958313 -0.7901305

> t.test(b11,c11,alternative=\

Welch Two Sample t-test

data: b11 and c11

t = 5.8762, df = 21.925, p-value = 3.299e-06

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 0.6830173 Inf sample estimates:

mean of x mean of y 0.1749454 -0.7901305

> t.test(a12,b12,alternative=\

Welch Two Sample t-test

data: a12 and b12

t = 2.994, df = 10.814, p-value = 0.006212

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 0.5557607 Inf sample estimates:

mean of x mean of y 0.9931852 -0.3988946

> t.test(a12,c12,alternative=\

Welch Two Sample t-test

data: a12 and c12

t = 2.5917, df = 10.145, p-value = 0.01329

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 0.356743 Inf sample estimates:

mean of x mean of y 0.9931852 -0.1893416

> t.test(b12,c12,alternative=\

Welch Two Sample t-test

data: b12 and c12

t = -0.8809, df = 22.84, p-value = 0.8062

alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: -0.6173701 Inf sample estimates:

mean of x mean of y -0.3988946 -0.1893416