kokeol
看了R导言之后 对t.test理解不够啊,希望有人解答
为了比较两个样本的均值是否相等,我们可以使用非配对t-检验
> t.test(A, B)
Welch Two Sample t-test
data: A and B
t = 3.2499, df = 12.027, p-value = 0.00694
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.01385526 0.07018320
sample estimates:
mean of x mean of y
80.02077 79.97875
上面的结果表明在正态前提下,二者有明显的统计差异 这里的"有明显的统计差异"是指p<0.05吧
R 函数默认两个样本方差不齐 是根据什么得出的的呢?
而SPLUS 类似函数t.test 则默认方差齐性。 这个是根据什么得出的?
如果两个样本都是来自正态群体,我们可以用F检验来确定方差的齐性情况
> var.test(A, B)
F test to compare two variances
data: A and B
F = 0.5837, num df = 12, denom df = 7, p-value = 0.3938
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.1251097 2.1052687
sample estimates:
ratio of variances
0.5837405
这表明二者方差在统计学上没有显著差异 这个是根据什么得出的?
没有显著差异,就使用 t.test(A, B, var.equal=TRUE)
如果有的话,使用什么命令呢?
实在是搞不懂啊,如果问题真的很简单,请不要见笑啊