Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
114 views
in Technique[技术] by (71.8m points)

r - In the case of the same SD, the difference between One sample t-test and Two sample t-test

In the case of the following program, I can think simply it has two times probability between One sample t-test(0.002111) and Two sample t-test(0.001053) to the p-value?

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
question from:https://stackoverflow.com/questions/65833051/in-the-case-of-the-same-sd-the-difference-between-one-sample-t-test-and-two-sam

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...