|||
输入 | 注释 | |
> | X<- c(159, 280, 101, 212, 224, 379, 179, 264, 222, 362, 168, 250, 149, 260, 485, 170) | 给向量X赋值 |
> | t.test(X, alternative = "greater", mu = 225) | 检验平均值是否大于225 |
结果 | One Sample t-test data: X t = 0.6685, df = 15, p-value = 0.257 alternative hypothesis: true mean is greater than 225 95 percent confidence interval: 198.2321 Inf sample estimates: mean of x 241.5 | 平均值241.5,大于225。 (1-P)值的大小代表支持备择假说的概率,即1-0.257 = 0.743,均值大于225是个大概率事件 |
输入 | 注释 | |
> | X<- c(159, 280, 101, 212, 224, 379, 179, 264, 222, 362, 168, 250, 149, 260, 220, 170) | 给向量X赋值 |
> | t.test(X, alternative = "greater", mu = 225) | 检验平均值是否大于225 |
结果 | One Sample t-test data: X t = -0.0034, df = 15, p-value = 0.5013 alternative hypothesis: true mean is greater than 225 95 percent confidence interval: 192.3401 Inf sample estimates: mean of x 224.9375 | 1-P = 0.4987 这是均值大于225的概率 |
输入 | 注释 | |
> | X<- c(159, 280, 101, 212, 224, 151, 179, 264, 222, 362, 168, 250, 149, 260, 150, 170) | 给向量X赋值 |
> | t.test(X, alternative = "greater", mu = 225) | 检验平均值是否大于225 |
结果 | One Sample t-test data: X t = -1.1377, df = 15, p-value = 0.8634 alternative hypothesis: true mean is greater than 225 95 percent confidence interval: 177.5168 Inf sample estimates: mean of x 206.3125 | 1-P = 0.1366 这是均值大于225的概率 实际上均值小于225 |
输入 | 注释 | |
> | X<- c(159, 280, 101, 212, 224, 151, 179, 264, 222, 362, 168, 250, 149, 260, 150, 170) | 给向量X赋值 |
> | t.test(X, alternative = "less", mu = 225) | 检验平均值是否大于225 |
结果 | > t.test(X, alternative = "less", mu = 225) One Sample t-test data: X t = -1.1377, df = 15, p-value = 0.1366 alternative hypothesis: true mean is less than 225 95 percent confidence interval: -Inf 235.1082 sample estimates: mean of x 206.3125 | 1-P = 0.8634 这是均值小于225的概率 刚好和相反的备择假说互补 |
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-26 10:37
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社