统计建模与R软件假设检验习题答案_第1页
统计建模与R软件假设检验习题答案_第2页
统计建模与R软件假设检验习题答案_第3页
统计建模与R软件假设检验习题答案_第4页
统计建模与R软件假设检验习题答案_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、习题答案Ex5.1 x t.test(x,mu=225) One Sample t-testdata: xt = -3.4783, df = 19, p-value = 0.002516alternative hypothesis: true mean is not equal to 22595 percent confidence interval: 172.3827 211.9173sample estimates:mean of x 192.15原假设:油漆工人的血小板计数与正常成年男子无差异。备择假设:油漆工人的血小板计数与正常成年男子有差异。p值小于0.05,拒绝原假设,认为油漆工人

2、的血小板计数与正常成年男子有差异。上述检验是双边检验。也可采用单边检验。备择假设:油漆工人的血小板计数小于正常成年男子。 t.test(x,mu=225,alternative=less) One Sample t-testdata: xt = -3.4783, df = 19, p-value = 0.001258alternative hypothesis: true mean is less than 22595 percent confidence interval: -Inf 208.4806sample estimates:mean of x 192.15同样可得出油漆工人的血小板

3、计数小于正常成年男子的结论。Ex5.2 pnorm(1000,mean(x),sd(x)1 0.5087941 x 1 1067 919 1196 785 1126 936 918 1156 920 948 pnorm(1000,mean(x),sd(x)1 0.5087941x A B t.test(A,B,paired=TRUE) Paired t-testdata: A and Bt = -0.6513, df = 7, p-value = 0.5357alternative hypothesis: true difference in means is not equal to 095

4、 percent confidence interval: -15.62889 8.87889sample estimates:mean of the differences -3.375p值大于0.05,接受原假设,两种方法治疗无差异。Ex5.4(2)方差相同模型t检验: t.test(x,y,var.equal=TRUE) Two Sample t-testdata: x and yt = -0.6419, df = 38, p-value = 0.5248alternative hypothesis: true difference in means is not equal to 09

5、5 percent confidence interval: -2.326179 1.206179sample estimates:mean of x mean of y 2.065 2.625 方差不同模型t检验: t.test(x,y) Welch Two Sample t-testdata: x and yt = -0.6419, df = 36.086, p-value = 0.525alternative hypothesis: true difference in means is not equal to 095 percent confidence interval: -2.3

6、2926 1.20926sample estimates:mean of x mean of y 2.065 2.625 (3)方差检验: var.test(x,y) F test to compare two variancesdata: x and yF = 1.5984, num df = 19, denom df = 19, p-value = 0.3153alternative hypothesis: true ratio of variances is not equal to 195 percent confidence interval: 0.6326505 4.0381795

7、sample estimates:ratio of variances 1.598361接受原假设,两组数据方差相同。Ex5.5 a b t.test(a,b,var.equal=TRUE) Two Sample t-testdata: a and bt = -8.8148, df = 20, p-value = 2.524e-08alternative hypothesis: true difference in means is not equal to 095 percent confidence interval: -48.24975 -29.78358sample estimates

8、:mean of x mean of y 125.5833 164.6000可认为两者有差别。Ex5.6二项分布总体的假设检验: binom.test(57,400,p=0.147) Exact binomial testdata: 57 and 400number of successes = 57, number of trials = 400, p-value = 0.8876alternative hypothesis: true probability of success is not equal to 0.14795 percent confidence interval: 0.

9、1097477 0.1806511sample estimates:probability of success 0.1425P 值0.05,故接受原假设,表示调查结果支持该市老年人口的看法Ex5.7二项分布总体的假设检验: binom.test(178,328,p=0.5,alternative=greater) Exact binomial testdata: 178 and 328number of successes = 178, number of trials = 328, p-value = 0.06794alternative hypothesis: true probability of su

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论