SD相同的情况下,一样本t检验与二样本t检验的差异

时间:2021-01-21 17:51:28

标签: r

在以下程序的情况下,我可以简单地认为它在一个样本 t-test(0.002111) 和两个样本 t-test(0.001053) 之间的概率是 p 值的两倍?

x1<-c(1,2,3,4,5)
x2<-c(6,7,8,9,10)
(m1<-mean(x1))
(m2<-mean(x2))
(var1<-var(x1))
(var2<-var(x2))

t.test(x1,mu=8,alternative="two.sided")
#        One Sample t-test
#data:  x1
#t = -7.0711, df = 4, p-value = 0.002111
#alternative hypothesis: true mean is not equal to 8

t.test(x1,x2,alternative="two.sided")
#        Welch Two Sample t-test
#data:  x1 and x2
#t = -5, df = 8, p-value = 0.001053
#alternative hypothesis: true difference in means is not equal to 0

0 个答案:

没有答案
相关问题