电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

统计建模与R软件第五章课后习题答案VIP免费

统计建模与R软件第五章课后习题答案_第1页
1/13
统计建模与R软件第五章课后习题答案_第2页
2/13
统计建模与R软件第五章课后习题答案_第3页
3/13
统 计 建 模 与 R 软件第五章习题答案(假设检验) Ex5.1 > x<-c(220, 188, 162, 230, 145, 160, 238, 188, 247, 113, 126, 245, 164, 231, 256, 183, 190, 158, 224, 175) > t.test(x,mu=225) One Sample t-test data: x t = -3.4783, df = 19, p-value = 0.002516 alternative hypothesis: true mean is not equal to 225 95 percent confidence interval: 172.3827 211.9173 sample estimates: mean of x 192.15 原假设:油漆工人的血小板计数与正常成年男子无差异。 备择假设:油漆工人的血小板计数与正常成年男子有差异。 p 值小于 0.05,拒绝原假设,认为油漆工人的血小板计数与正常成年男子有差异。 上述检验是双边检验。也可采用单边检验。备择假设:油漆工人的血小板计数小于正常成年男子。 > t.test(x,mu=225,alternative="less") One Sample t-test data: x t = -3.4783, df = 19, p-value = 0.001258 alternative hypothesis: true mean is less than 225 95 percent confidence interval: -Inf 208.4806 sample estimates: mean of x 192.15 同样可得出油漆工人的血小板计数小于正常成年男子的结论。 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.5087941 x<=1000的概率为0.509,故x 大于1000 的概率为0.491. 要点:pnorm 计算正态分布的分布函数。在 R 软件中,计算值均为下分位点。 Ex5.3 > A<-c(113,120,138,120,100,118,138,123) > B<-c(138,116,125,136,110,132,130,110) > t.test(A,B,paired=TRUE) Paired t-test data: A and B t = -0.6513, df = 7, p-value = 0.5357 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -15.62889 8.87889 sample estimates: mean of the differences -3.375 p 值大于0.05,接受原假设,两种方法治疗无差异。 Ex5.4 (1) 正态性 W 检验: >x<-c(-0.7,-5.6,2,2.8,0.7,3.5,4,5.8,7.1,-0.5,2.5,-1.6,1.7,3,0.4,4.5,4.6,2.5,6,-1.4) >y<-c(3.7,6.5,5,5.2,0.8,0.2,0.6,3.4,6.6,-1.1,6,3.8,2,1.6,2,2.2,1.2,3.1,1.7,-2) > shapiro.test(x) ...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

统计建模与R软件第五章课后习题答案

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部