均值t检验,方差卡方检验例题(R语言)
程序员文章站
2022-06-09 20:48:36
题目程序及结果1)程序x<-c(4,9,11,13,18,20,24,28,45,67)y<-c(5,7,8,12,19,23,32,36,40,52)t.test(x,y,var.equal=TRUE)1)结果Two Sample t-testdata: x and yt = 0.063425, df = 18, p-value = 0.9501alternative hypothesis: true difference in means is not equa...
题目
程序及结果
1)程序
x<-c(4,9,11,13,18,20,24,28,45,67)
y<-c(5,7,8,12,19,23,32,36,40,52)
t.test(x,y,var.equal=TRUE)
1)结果
Two Sample t-test
data: x and y
t = 0.063425, df = 18, p-value = 0.9501
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-16.06238 17.06238
sample estimates:
mean of x mean of y
23.9 23.4
2)程序
x<-c(4,9,11,13,18,20,24,28,45,67)
y<-c(5,7,8,12,19,23,32,36,40,52)
var.test(x,y,conf.level=0.99)
2)结果
F test to compare two variances
data: x and y
F = 1.4105, num df = 9, denom df = 9, p-value = 0.6166
alternative hypothesis: true ratio of variances is not equal to 1
99 percent confidence interval:
0.2156353 9.2261387
sample estimates:
ratio of variances
1.41049
结果分析
本文地址:https://blog.csdn.net/qq_44941689/article/details/110200905
下一篇: 关于ES6尾调用优化的使用