{"id":1159,"date":"2020-08-06T08:03:01","date_gmt":"2020-08-06T00:03:01","guid":{"rendered":"http:\/\/cnliutz.uicp.io\/?p=1159"},"modified":"2020-08-06T08:03:01","modified_gmt":"2020-08-06T00:03:01","slug":"r%e8%af%ad%e8%a8%80%e5%90%84%e7%a7%8d%e5%81%87%e8%ae%be%e6%a3%80%e9%aa%8c%e5%ae%9e%e4%be%8b%e6%95%b4%e7%90%86-2","status":"publish","type":"post","link":"http:\/\/g1n29wqq.ipyingshe.net:5347\/?p=1159","title":{"rendered":"R\u8bed\u8a00\u5404\u79cd\u5047\u8bbe\u68c0\u9a8c\u5b9e\u4f8b\u6574\u7406"},"content":{"rendered":"\n<p><strong>\u4e00\u3001\u6b63\u6001\u5206\u5e03\u53c2\u6570\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>\u4f8b1.<\/strong>&nbsp;\u67d0\u79cd\u539f\u4ef6\u7684\u5bff\u547dX\uff08\u4ee5\u5c0f\u65f6\u8ba1\uff09\u670d\u4ece\u6b63\u6001\u5206\u5e03N\uff08\u03bc, \u03c3)\u5176\u4e2d\u03bc, \u03c3<sup>2<\/sup>\u5747\u672a\u77e5\u3002\u73b0\u6d4b\u5f9716\u53ea\u5143\u4ef6\u7684\u5bff\u547d\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 159 280 101 212 224 379 179 264<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 222 362 168 250 149 260 485 170<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u95ee\u662f\u5426\u6709\u7406\u7531\u8ba4\u4e3a\u5143\u4ef6\u7684\u5e73\u5747\u5bff\u547d\u5927\u4e8e255\u5c0f\u65f6\uff1f<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>\u6309\u9898\u610f\uff0c\u9700\u68c0\u9a8c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1a \u03bc \u2264 225H<sub>1<\/sub>: \u03bc &gt;225<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u6b64\u95ee\u9898\u5c5e\u4e8e\u5355\u8fb9\u68c0\u9a8c\u95ee\u9898<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u53ef\u4ee5\u4f7f\u7528R\u8bed\u8a00t.test<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t.test(x,y=NULL,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternative=c(&#8220;two.sided&#8221;,&#8221;less&#8221;,&#8221;greater&#8221;),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mu=0,paired=FALSE,var.equal=FALSE,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conf.level=0.95)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5176\u4e2dx,y\u662f\u53c8\u6570\u636e\u6784\u6210e\u5411\u91cf\uff0c\uff08\u5982\u679c\u53ea\u63d0\u4f9bx,\u5219\u4f5c\u5355\u4e2a\u6b63\u6001\u603b\u4f53\u7684\u5747\u503c\u68c0\u9a8c\uff0c\u5982\u679c\u63d0\u4f9bx,y\u5219\u4f5c\u4e24\u4e2a\u603b\u4f53\u7684\u5747\u503c\u68c0\u9a8c)\uff0calternative\u8868\u793a\u88ab\u5219\u5047\u8bbe\uff0ctwo.sided(\u7f3a\u7701)\uff0c\u53cc\u8fb9\u68c0\u9a8c(H<sub><sup>1<\/sup><\/sub>:\u03bc\u2260H<sub>0<\/sub>),less\u8868\u793a\u5355\u8fb9\u68c0\u9a8c(H<sub>1<\/sub>:\u03bc&lt;\u03bc<sub>0<\/sub>),greater\u8868\u793a\u5355\u8fb9\u68c0\u9a8c(H<sub>1<\/sub>:\u03bc&gt;\u03bc<sub>0<\/sub>)\uff0cmu\u8868\u793a\u539f\u5047\u8bbe\u03bc<sub>0<\/sub>\uff0cconf.level\u7f6e\u4fe1\u6c34\u5e73\uff0c\u53731-\u03b1\uff0c\u901a\u5e38\u662f0.95\uff0cvar.equal\u662f\u903b\u8f91\u53d8\u91cf\uff0cvar.equal=TRUE\u8868\u793a\u4e24\u6837\u54c1\u65b9\u5dee\u76f8\u540c\uff0cvar.equal=FALSE\uff08\u7f3a\u7701\uff09\u8868\u793a\u4e24\u6837\u672c\u65b9\u5dee\u4e0d\u540c\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X&lt;-c(159, 280, 101, 212, 224, 379, 179, 264,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 222, 362, 168, 250, 149, 260, 485, 170)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.test(X,alternative = &#8220;greater&#8221;,mu=225)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201703\/1093203-20170328154747779-154969565.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \u53ef\u89c1P\u503c\u4e3a0.257 &gt; 0.05 \uff0c\u4e0d\u80fd\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u63a5\u53d7H<sub>0<\/sub>\uff0c\u5373\u5e73\u5747\u5bff\u547d\u4e0d\u5927\u4e8e225\u5c0f\u65f6\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>&nbsp;\u4f8b2.\u001d\u0003<\/strong>\u5728\u5e73\u7089\u4e0a\u8fdb\u884c\u7684\u4e00\u9879\u8bd5\u9a8c\u4ee5\u786e\u5b9a\u6539\u53d8\u64cd\u4f5c\u65b9\u6cd5\u7684\u5efa\u8bae\u662f\u5426\u4f1a\u589e\u52a0\u521a\u7684\u5f97\u7387\uff0c\u8bd5\u9a8c\u65f6\u5728\u540c\u4e00\u4e2a\u5e73\u7089\u4e0a\u8fdb\u884c\u7684\uff0c\u6bcf\u70bc\u4e00\u7089\u521a\u65f6\u9664\u64cd\u4f5c\u65b9\u6cd5\u5916\uff0c\u5176\u5b83\u6761\u4ef6\u90fd\u5c3d\u53ef\u80fd\u505a\u5230\u76f8\u540c\uff0c\u5148\u7528\u6807\u51c6\u65b9\u6cd5\u70bc\u4e00\u7089\uff0c\u7136\u540e\u7528\u65b0\u65b9\u6cd5\u70bc\u4e00\u7089\uff0c\u4ee5\u540e\u4ea4\u66ff\u8fdb\u884c\uff0c\u5404\u70bc\u4e8610\u7089\uff0c\u5176\u5f97\u7387\u5206\u522b\u4e3a<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u6807\u51c6\u65b9\u6cd5&nbsp;&nbsp;&nbsp; 78.1 72.4 76.2 74.3 77.4 78.4 76.0 75.5 76.7 77.3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u65b0\u65b9\u6cd5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 79.1 81.0 77.3 79.1 80.0 79.1 79.1 77.3 80.2 82.1<\/p>\n\n\n\n<p>\u8bbe\u8fd9\u4e24\u4e2a\u6837\u672c\u76f8\u4e92\u72ec\u7acb\uff0c\u4e14\u5206\u522b\u6765\u81ea\u6b63\u6001\u603b\u4f53N\uff08\u03bc<sub>1<\/sub>, \u03c3<sup>2<\/sup>)\u548cN\uff08\u03bc<sub>2<\/sub>, \u03c3<sup>2<\/sup>)\uff0c\u5176\u4e2d\u03bc<sub>1<\/sub>\uff0c\u03bc<sub>2<\/sub>\u548c\u03c3<sup>2<\/sup>\u672a\u77e5\u3002\u95ee\u65b0\u7684\u64cd\u4f5c\u80fd\u5426\u63d0\u9ad8\u5f97\u7387\uff1f\uff08\u53d6\u03b1=0.05\uff09<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u89e31\uff1a<\/strong>\u6839\u636e\u9898\u610f\uff0c\u9700\u8981\u5047\u8bbe<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;H<sub>0<\/sub>\uff1a \u03bc<sub>1<\/sub>&nbsp;\u2265 &nbsp;\u03bc<sub>2 &nbsp; &nbsp;&nbsp;<\/sub>H<sub>1<\/sub>:&nbsp;\u03bc<sub>1<\/sub>&nbsp;&lt;&nbsp; \u03bc2 &nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u8fd9\u91cc\u5047\u5b9a\u03c3<sub>1<\/sub><sup>2=<\/sup>\u03c3<sub>2<\/sub>2=\u03c3<sup>2<\/sup>\uff0c\u56e0\u6b64\u9009\u62e9t.test\uff0cvar.equal=TRUE<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; X&lt;-c(78.1,72.4,76.2,74.3,77.4,78.4,76.0,75.5,76.7,77.3)<br>&nbsp;&nbsp;&nbsp; Y&lt;-c(79.1,81.0,77.3,79.1,80.0,79.1,79.1,77.3,80.2,82.1)<br>&nbsp;&nbsp;&nbsp; t.test(X,Y,var.equal = TRUE,alternative = &#8220;less&#8221;)<\/p>\n\n\n\n<p>&nbsp;&nbsp; \u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201703\/1093203-20170328164556029-1186071805.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u53ef\u89c1P\u503c&lt;0.05\uff0c\u63a5\u53d7\u5907\u62e9\u5047\u8bbe\uff0c\u5373\u65b0\u7684\u64cd\u4f5c\u80fd\u591f\u63d0\u9ad8\u5f97\u7387\u3002<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u89e32\uff1a<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u56e0\u4e3a\u6570\u636e\u662f\u6210\u5bf9\u51fa\u73b0\u7684\uff0c\u6240\u4ee5\u91c7\u7528\u6210\u5bf9\u6570\u636et\u68c0\u9a8c\u6bd4\u4e0a\u8ff0\u7684\u53cc\u6837\u672c\u5747\u503c\u68c0\u9a8c\u66f4\u51c6\u786e\u3002\u6240\u8c13\u6210\u5bf9t\u68c0\u9a8c\u5c31\u662fZ<sub>i<\/sub>=X<sub>i<\/sub>-Y<sub>i<\/sub>\uff0c\u518d\u5bf9Z\u8fdb\u884c\u5355\u6837\u672c\u5747\u503c\u68c0\u9a8c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; X&lt;-c(78.1,72.4,76.2,74.3,77.4,78.4,76.0,75.5,76.7,77.3)<br>&nbsp;&nbsp;&nbsp; Y&lt;-c(79.1,81.0,77.3,79.1,80.0,79.1,79.1,77.3,80.2,82.1)<br>&nbsp;&nbsp;&nbsp; t.test(X-Y, alternative = &#8220;less&#8221;)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201703\/1093203-20170328170303029-498031215.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u53ef\u89c1P\u503c&lt;0.05\uff0c\u63a5\u53d7\u5907\u62e9\u5047\u8bbe\uff0c\u5373\u65b0\u7684\u64cd\u4f5c\u80fd\u591f\u63d0\u9ad8\u5f97\u7387\u3002\u5e76\u4e14P\u503c\u66f4\u5c0f\u53ef\u89c1\u6bd4\u53cc\u6837\u672c\u5747\u503c\u68c0\u9a8c\u66f4\u51c6\u786e<\/p>\n\n\n\n<p>&nbsp;&nbsp;<strong>\u4f8b3.<\/strong>\u5bf9\u4f8b2\u8fdb\u884c\u65b9\u5dee\u68c0\u9a8c\uff0c\u65b9\u5dee\u662f\u5426\u76f8\u540c<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;\u89e3\uff1a<\/strong>\u6839\u636e\u9898\u610f\uff0c\u9700\u68c0\u9a8c<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp; H<sub>0<\/sub>\uff1a&nbsp;\u03c3<sub>1<\/sub><sup>2<\/sup>&nbsp;=&nbsp;&nbsp;\u03c3<sub>2<\/sub><sup>2<\/sup>H<sub>1<\/sub>:&nbsp;\u03c3<sub>1<\/sub><sup>2<\/sup>&nbsp;\u2260&nbsp; \u03c3<sub>2<\/sub><sup>2<\/sup><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u65b9\u5dee\u68c0\u9a8c\u53ef\u4ee5\u7528var.test<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; var.test(x, y, ratio = 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternative = c(&#8220;two.sided&#8221;, &#8220;less&#8221;, &#8220;greater&#8221;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conf.level = 0.95, &#8230;)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; x,y\u662f\u6765\u81ea\u4e24\u6837\u672c\u6570\u636e\u6784\u6210\u7684\u5411\u91cf\uff0cratio\u662f\u65b9\u5dee\u6bd4\u7684\u539f\u5047\u8bbe\uff0c\u7f3a\u7701\u503c\u4e3a1.alternative\u662f\u5907\u62e9\u5047\u8bbe\uff0ctwo.sided\u8868\u793a\u53cc\u8fb9\u68c0\u9a8c(H1:\u03c3<sub>1<\/sub><sup>2<\/sup>\/\u03c3<sub>2<\/sub><sup>2<\/sup>&lt;ratio),greater\u8868\u793a\u5355\u8fb9\u68c0\u9a8c\uff08H<sub>1<\/sub>\uff1a\u03c31<sup>2<\/sup>\uff09<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; X&lt;-c(78.1,72.4,76.2,74.3,77.4,78.4,76.0,75.5,76.7,77.3)<br>&nbsp;&nbsp;&nbsp; Y&lt;-c(79.1,81.0,77.3,79.1,80.0,79.1,79.1,77.3,80.2,82.1)&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; var.test(X,Y)<\/p>\n\n\n\n<p>&nbsp; &nbsp; \u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170404160115832-1291385124.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp; \u53ef\u89c1P\u503c\u4e3a0.559&gt;0.05\uff0c\u63a5\u53d7\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3a\u4e24\u8005\u65b9\u5dee\u76f8\u540c<\/p>\n\n\n\n<p><strong>\u4e8c\u3001\u4e8c\u9879\u5206\u5e03\u53c2\u6570\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;\u4f8b4.<\/strong>\u6709\u4e00\u6279\u852c\u83dc\u79cd\u5b50\u7684\u5e73\u5747\u53d1\u82bd\u7387p<sub>0<\/sub>=0.85\uff0c\u73b0\u968f\u5373\u62bd\u53d6500\u7c92\uff0c\u7528\u79cd\u8863\u5242\u8fdb\u884c\u6d78\u79cd\u5904\u7406\uff0c\u7ed3\u679c\u6709445\u7c92\u53d1\u82bd\u3002\u8bd5\u68c0\u9a8c\u79cd\u8863\u5242\u5bf9\u79cd\u5b50\u53d1\u82bd\u7387\u6709\u65e0\u6548\u679c\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>\u6839\u636e\u9898\u610f\uff0c\u6240\u68c0\u9a8c\u7684\u95ee\u9898\u4e3a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1ap=p<sub>0<\/sub>=0.85\uff0c H<sub>1<\/sub>\uff1ap\u2260p<sub>0<\/sub><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u53ef\u4ee5\u7528R\u8bed\u8a00\u7684binom.test<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binom.test(x, n, p = 0.5,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternative = c(&#8220;two.sided&#8221;, &#8220;less&#8221;, &#8220;greater&#8221;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conf.level = 0.95)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u5176\u4e2dx\u662f\u6210\u529f\u7684\u6b21\u6570\uff1b\u6216\u662f\u4e00\u4e2a\u7531\u6210\u529f\u6570\u548c\u5931\u8d25\u6570\u7ec4\u6210\u7684\u4e8c\u7ef4\u5411\u91cf\u3002n\u662f\u8bd5\u9a8c\u603b\u6570\uff0c\u5f53x\u662f\u4e8c\u7ef4\u5411\u91cf\u65f6\uff0c\u6b64\u503c\u65e0\u6548\u3002P\u662f\u539f\u5047\u8bbe\u7684\u6982\u7387\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp; binom.test(445,500,p=0.85)<\/p>\n\n\n\n<p>&nbsp;&nbsp; \u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170404162442285-562628373.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u53ef\u77e5P\u503c0.01207&lt;0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8bf4\u660e\u79cd\u8863\u5242\u5bf9\u79cd\u5b50\u7684\u53d1\u82bd\u7387\u6709\u663e\u8457\u6548\u679c\u3002<\/p>\n\n\n\n<p><strong>\u4e09\u3001\u5176\u5b83\u91cd\u8981\u7684\u975e\u53c2\u6570\u68c0\u9a8c\u6cd5<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;3.1.\u7406\u8bba\u5206\u5e03\u5b8c\u5168\u5df2\u77e5\u7684\u60c5\u51b5\u4e0b<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp; 3.1.1.\u76ae\u5c14\u68ee\u62df\u5408\u4f18\u5ea6\u68c0\u9a8c<\/strong><strong><\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u4f8b5.<\/strong>\u67d0\u6d88\u8d39\u8005\u534f\u4f1a\u4e3a\u4e86\u786e\u5b9a\u5e02\u573a\u4e0a\u6d88\u8d39\u8005\u5bf95\u79cd\u54c1\u724c\u5564\u9152\u7684\u559c\u597d\u60c5\u51b5\uff0c\u968f\u5373\u62bd\u53d6\u4e861000\u540d\u5564\u9152\u7231\u597d\u8005\u4f5c\u4e3a\u6837\u54c1\u8fdb\u884c\u8bd5\u9a8c\uff1a\u6bcf\u4e2a\u4eba\u5f97\u52305\u79cd\u54c1\u724c\u7684\u5564\u9152\u5404\u4e00\u74f6\uff0c\u4f46\u672a\u6807\u660e\u724c\u5b50\u3002\u8fd95\u79cd\u5564\u9152\u5206\u522b\u6309\u7740A\u3001B\u3001C\u3001D\u3001E\u5b57\u6bcd\u76845\u5f20\u7eb8\u7247\u968f\u5373\u7684\u987a\u5e8f\u9001\u7ed9\u6bcf\u4e00\u4e2a\u4eba\u3002\u4e0b\u8868\u662f\u6839\u636e\u6837\u672c\u8d44\u6599\u6574\u7406\u7684\u5404\u79cd\u54c1\u724c\u5564\u9152\u7231\u597d\u8005\u7684\u9891\u6570\u5206\u5e03\u3002\u8bd5\u6839\u636e\u8fd9\u4e9b\u6570\u636e\u5224\u65ad\u6d88\u8d39\u8005\u5bf9\u8fd95\u79cd\u54c1\u724c\u5564\u9152\u7684\u7231\u597d\u6709\u65e0\u660e\u663e\u5dee\u5f02\uff1f<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u6700\u559c\u6b22\u7684\u724c\u5b50&nbsp;&nbsp;&nbsp; A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u4eba\u6570X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 312&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 85&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 223<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>\u5982\u679c\u6d88\u8d39\u8005\u5bf95\u79cd\u54c1\u724c\u7684\u5564\u9152\u65e0\u663e\u8457\u5dee\u5f02\uff0c\u90a3\u4e48\uff0c\u5c31\u53ef\u4ee5\u8ba4\u4e3a\u559c\u597d\u8fd95\u79cd\u62cd\u54c1\u5564\u9152\u7684\u4eba\u5448\u5747\u5300\u5206\u5e03\uff0c\u53735\u79cd\u54c1\u724c\u5564\u9152\u7231\u597d\u8005\u4eba\u6570\u5404\u536020%\u3002\u636e\u6b64\u5047\u8bbe<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1a\u559c\u597d5\u79cd\u5564\u9152\u7684\u4eba\u6570\u5206\u5e03\u5747\u5300<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; \u53ef\u4ee5\u4f7f\u7528Pearson \u03c7<sup>2<\/sup>\u62df\u5408\u4f18\u5ea6\u68c0\u9a8c\uff0cR\u8bed\u8a00\u4e2d\u8c03\u7528chisq.test(X)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; chisq.test(x, y = NULL, correct = TRUE,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = rep(1\/length(x), length(x)), rescale.p = FALSE,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simulate.p.value = FALSE, B = 2000)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5176\u4e2dx\u662f\u7531\u89c2\u6d4b\u6570\u636e\u6784\u6210\u7684\u5411\u91cf\u6216\u8005\u77e9\u9635\uff0cy\u662f\u6570\u636e\u5411\u91cf\uff08\u5f53x\u4e3a\u77e9\u9635\u65f6\uff0cy\u65e0\u6548)\u3002correct\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u6807\u660e\u662f\u5426\u7528\u4e8e\u8fde\u7eed\u4fee\u6b63\uff0cTRUE(\u7f3a\u7701\u503c)\u8868\u793a\u4fee\u6b63\uff0cFALSE\u8868\u793a\u4e0d\u4fee\u6b63\u3002p\u662f\u539f\u5047\u8bbe\u843d\u5728\u5c0f\u533a\u95f4\u7684\u7406\u8bba\u6982\u7387\uff0c\u7f3a\u7701\u503c\u8868\u793a\u5747\u5300\u5206\u5e03\uff0crescale.p\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u9009\u62e9FALSE\uff08\u7f3a\u7701\u503c\uff09\u65f6\uff0c\u8981\u6c42\u8f93\u5165\u7684p\u6ee1\u8db3\u548c\u7b49\u4e8e1\uff1b\u9009\u62e9TRUE\u65f6\uff0c\u5e76\u4e0d\u8981\u6c42\u8fd9\u4e00\u70b9\uff0c\u7a0b\u5e8f\u5c06\u91cd\u65b0\u8ba1\u7b97p\u503c\u3002simulate.p.value\u903b\u8f91\u53d8\u91cf\uff08\u7f3a\u7701\u503c\u4e3aFALSE\uff09\uff0c\u5f53\u4e3aTRUE\uff0c\u5c06\u7528\u4eff\u771f\u7684\u65b9\u6cd5\u8ba1\u7b97p\u503c\uff0c\u6b64\u65f6,B\u8868\u793a\u4eff\u771f\u7684\u6b64\u503c\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;X&lt;-c(210, 312, 170, 85, 223)<\/p>\n\n\n\n<p>&nbsp;&nbsp; chisq.test(X)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170404171157472-157640823.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b6.<\/strong>\u4e3a\u7814\u7a76\u7535\u8bdd\u603b\u673a\u5728\u67d0\u6bb5\u65f6\u95f4\u5185\u63a5\u5230\u7684\u547c\u53eb\u6b21\u6570\u662f\u5426\u670d\u4ecePoisson\u5206\u5e03\uff0c\u73b0\u6536\u96c6\u4e8642\u4e2a\u6570\u636e\uff0c\u5982\u4e0b\u8868\u6240\u793a\uff0c\u901a\u8fc7\u5bf9\u6570\u636e\u7684\u5206\u6790\uff0c\u95ee\u80fd\u5426\u786e\u8ba4\u5728\u67d0\u6bb5\u65f6\u95f4\u5185\u63a5\u5230\u7684\u547c\u53eb\u6b21\u6570\u670d\u4ecePoisson\u5206\u5e03\uff08\u03b1 = 0.1\uff09\uff1f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416112709240-244778737.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; #\u8f93\u5165\u6570\u636e<br>&nbsp;&nbsp;&nbsp; X&lt;-0:6; Y&lt;-c(7, 10, 12, 8, 3, 2, 0)<br>&nbsp;&nbsp;&nbsp; #\u8ba1\u7b97\u7406\u8bba\u5206\u5e03\uff0c\u5176\u4e2dmean(rep(X,Y))\u4e3a\u6837\u672c\u5747\u503c<br>&nbsp;&nbsp;&nbsp; q&lt;-ppois(X, mean(rep(X,Y))); n&lt;-length(Y)<br>&nbsp;&nbsp;&nbsp; p=rep(0,n)<br>&nbsp;&nbsp;&nbsp; p[1]&lt;-q[1]; p[n]&lt;-1-q[n-1]<br>&nbsp;&nbsp;&nbsp; for (i in 2:(n-1))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p[i]&lt;-q[i]-q[i-1]<br>&nbsp;&nbsp;&nbsp; #\u4f5c\u68c0\u9a8c<br>&nbsp;&nbsp;&nbsp; chisq.test(Y,p=p)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416095327614-1357326265.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u63d0\u793a\u7ed3\u679c\u53ef\u80fd\u4e0d\u51c6\u786e\uff0c\u56e0\u4e3a\u76ae\u5c14\u68ee\u5361\u65b9\u62df\u5408\u7531\u5ea6\u68c0\u9a8c\u8981\u6c42\u5206\u7ec4\u540e\u6bcf\u7ec4\u7684\u9891\u6570\u81f3\u5c11\u8981\u5927\u4e8e\u7b49\u4e8e5\uff0c\u800c\u540e\u4e09\u7ec4\u4e2d\u51fa\u73b0\u7684\u9891\u7387\u5206\u522b\u4e3a3\uff0c2\uff0c0\uff0c\u5747\u5c0f\u4e8e5\uff0c\u89e3\u51b3\u95ee\u9898\u7684\u65b9\u6cd5\u662f\u5c06\u540e\u4e09\u7ec4\u5408\u6210\u4e00\u7ec4\uff0c\u6b64\u65f6\u7684\u9891\u6570\u4e3a5\uff0c\u6ee1\u8db3\u8981\u6c42\uff0c\u91cd\u5199R\u8bed\u8a00\u4ee3\u7801<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp; #\u8f93\u5165\u6570\u636e<br>&nbsp; &nbsp; X&lt;-0:6; Y&lt;-c(7, 10, 12, 8, 3, 2, 0)<br>&nbsp;&nbsp; #\u8ba1\u7b97\u7406\u8bba\u5206\u5e03\uff0c\u5176\u4e2dmean(rep(X,Y))\u4e3a\u6837\u672c\u5747\u503c<br>&nbsp; &nbsp; q&lt;-ppois(X, mean(rep(X,Y))); n&lt;-length(Y)<br>&nbsp;&nbsp;&nbsp; p&lt;-rep(0,n)<br>&nbsp;&nbsp;&nbsp; p[1]&lt;-q[1]; p[n]&lt;-1-q[n-1]<br>&nbsp;&nbsp;&nbsp; for (i in 2:(n-1))<br>&nbsp; &nbsp; &nbsp; p[i]&lt;-q[i]-q[i-1]<br>&nbsp;&nbsp;&nbsp; #\u91cd\u65b0\u5206\u7ec4<br>&nbsp;&nbsp;&nbsp; Z&lt;-c(7, 10, 12, 8, 5)<br>&nbsp;&nbsp;&nbsp; #\u91cd\u65b0\u8ba1\u7b97\u7406\u8bba\u5206\u5e03<br>&nbsp;&nbsp;&nbsp; n&lt;-length(Z); p&lt;-p[1:n-1]; p[n]&lt;-1-q[n-1]<br>&nbsp;&nbsp;&nbsp; #\u4f5c\u68c0\u9a8c<br>&nbsp;&nbsp;&nbsp; chisq.test(Z,p=p)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416095430270-1839339624.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u53ef\u89c1P\u503c&gt;&gt;0.1\uff0c\u53ef\u4ee5\u786e\u8ba4\u5728\u67d0\u6bb5\u65f6\u95f4\u4e4b\u5185\u63a5\u5230\u7684\u7535\u8bdd\u6b21\u6570\u670d\u4ecePoisson \u5206\u5e03<\/p>\n\n\n\n<p><strong>&nbsp;3.1.2.\u6b63\u6001W\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u4f8b7.<\/strong>\u5df2\u77e515\u540d\u5b66\u751f\u4f53\u91cd\u5982\u4e0b\uff0c\u95ee\u662f\u5426\u670d\u4ece\u6b63\u6001\u5206\u5e03<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416215620431-815559162.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>&nbsp;\u89e3\uff1a<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; w &lt;- c(75.0, 64.0, 47.4, 66.9, 62.2, 62.2, 58.7, 63.5,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66.6, 64.0, 57.0, 69.0, 56.9, 50.0, 72.0)<br>&nbsp;&nbsp;&nbsp; shapiro.test(w)<\/p>\n\n\n\n<p>&nbsp;&nbsp; P\u503c&gt;0.05\uff0c\u63a5\u53d7\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3a\u6765\u81ea\u6b63\u6001\u5206\u5e03\u603b\u4f53\u3002<\/p>\n\n\n\n<p><strong>3.2.\u7406\u8bba\u5206\u5e03\u4f9d\u8d56\u4e8e\u82e5\u5e72\u4e2a\u672a\u77e5\u53c2\u6570\u7684\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>&nbsp;3.2.1Kolmogorov-Smirnov \u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b8.<\/strong>\u5bf9\u4e00\u53f0\u8bbe\u5907\u8fdb\u884c\u5bff\u547d\u68c0\u9a8c\uff0c\u8bb0\u5f5510\u6b21\u65e0\u6545\u969c\u5de5\u4f5c\u65f6\u95f4\uff0c\u5e76\u6309\u4ece\u5c0f\u5230\u5927\u7684\u6b21\u5e8f\u6392\u5217\u5982\u4e0b\uff1a\uff08\u5355\u4f4d\uff09<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 420&nbsp; 500 920&nbsp; 1380&nbsp; 1510&nbsp; 1650&nbsp; 1760 2100 2300 2350<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u8bd5\u7528Kolmogorov-Smirnov K \u68c0\u9a8c\u65b9\u6cd5\u68c0\u9a8c\u6b64\u8bbe\u5907\u65e0\u6545\u969c\u5de5\u4f5c\u65f6\u95f4\u5206\u5e03\u662f\u5426\u670d\u4ece\u03bb = 1\/1500\u7684\u6307\u6570\u5206\u5e03\uff1f<\/p>\n\n\n\n<p>&nbsp;&nbsp;<strong>&nbsp;\u89e3\uff1a<\/strong>&nbsp;R\u8bed\u8a00\u8fdb\u884cKolmogorov-Smirnov K \u68c0\u9a8c\u4f7f\u7528ks.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ks.test(x, y, &#8230;,<br>&nbsp;&nbsp;&nbsp; alternative = c(&#8220;two.sided&#8221;, &#8220;less&#8221;, &#8220;greater&#8221;),<br>&nbsp;&nbsp;&nbsp; exact = NULL)&nbsp;&nbsp;&nbsp; # x\u662f\u5f85\u68c0\u6d4b\u7684\u6837\u54c1\u6784\u6210\u7684\u5411\u91cf\uff0cy\u662f\u539f\u5047\u8bbe\u7684\u6570\u636e\u5411\u91cf\u6216\u662f\u539f\u5047\u8bbe\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X&lt;-c(420, 500, 920, 1380, 1510, 1650, 1760, 2100, 2300, 2350)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ks.test(X, &#8220;pexp&#8221;, 1\/1500)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416095521130-1627872874.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; P\u503c\u5927\u4e8e0.05\uff0c\u65e0\u6cd5\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u56e0\u6b64\u8ba4\u4e3a\u6b64\u8bbe\u5907\u65e0\u6545\u969c\u5de5\u4f5c\u65f6\u95f4\u7684\u5206\u5e03\u670d\u4ece\u03bb = 1\/1500\u7684\u6307\u6570\u5206\u5e03\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b9.<\/strong>\u5047\u5b9a\u4ece\u5206\u5e03\u51fd\u6570\u672a\u77e5\u7684F\uff08x\uff09\u548cG\uff08x\uff09\u7684\u603b\u4f53\u4e2d\u5206\u522b\u62bd\u51fa25\u4e2a\u548c20\u4e2a\u89c2\u5bdf\u503c\u7684\u968f\u5373\u6837\u54c1\uff0c\u5176\u6570\u636e\u7531\u4e0b\u8868\u6240\u793a\u3002\u73b0\u68c0\u9a8cF\uff08x\uff09\u548cG(x)\u662f\u5426\u76f8\u540c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170415150047767-1721454408.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X&lt;-scan( )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.61 0.29 0.06 0.59 -1.73 -0.74 0.51 -0.56<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 1.64 0.05 -0.06 0.64 -0.82 0.37 1.77<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.36 1.31 1.05 -0.32 -0.40 1.06 -2.47<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.39 1.09 -1.28<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Y&lt;-scan( )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.20 1.66 1.38 0.20 0.36 0.00<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.96 1.56 0.44&nbsp; 1.50 -0.30 0.66&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.31 3.29 -0.27 -0.37 0.38 0.70<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.52 -0.71<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ks.test(X,Y)<\/p>\n\n\n\n<p>P\u503c&gt;0.05,\u65e0\u6cd5\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8bf4\u660eF\uff08x\uff09\u548cG(x)\u5206\u5e03\u51fd\u6570\u76f8\u540c\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>&nbsp;3.2.2.\u5217\u8054\u8868\u6570\u636e\u7684\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b10.<\/strong>\u4e3a\u4e86\u7814\u7a76\u5438\u70df\u662f\u5426\u4e0e\u60a3\u80ba\u764c\u76f8\u5173\uff0c\u5bf963\u4f4d\u80ba\u764c\u60a3\u8005\u53ca43\u540d\u975e\u80ba\u764c\u60a3\u8005\uff08\u5bf9\u7167\u7ec4\uff09\u8c03\u67e5\u4e86\u5176\u4e2d\u7684\u5438\u70df\u4eba\u6570\uff0c\u5f97\u52302&#215;2\u5217\u8054\u8868\uff0c\u5982\u4e0b\u8868\u6240\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170415160536283-271865716.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp; \u89e3\uff1a<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8fdb\u884cPearson\u5361\u65b9\u68c0\u9a8c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; x&lt;-c(60, 3, 32, 11)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dim(x)&lt;- c(2,2)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chisq.test(x,correct = F)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416175846431-1119669383.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>P\u503c&lt;0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3a\u5438\u70df\u4e0e\u60a3\u80ba\u764c\u76f8\u5173\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b11.<\/strong>\u67d0\u533b\u5e08\u4e3a\u7814\u7a76\u4e59\u809d\u514d\u75ab\u7403\u86cb\u767d\u9884\u9632\u80ce\u513f\u5bab\u5185\u611f\u67d3HBV\u7684\u7ed3\u679c\uff0c\u5c0633\u4f8bHBsAg\u9633\u6027\u5b55\u5987\u968f\u5373\u5206\u4e3a\u9884\u9632\u6ce8\u5c04\u7ec4\u548c\u5bf9\u7167\u7ec4\uff0c\u7ed3\u679c\u7531\u4e0b\u8868\u6240\u793a\uff0c\u95ee\u4e24\u7ec4\u65b0\u751f\u513f\u7684HBV\u603b\u4f53\u611f\u67d3\u7387\u6709\u65e0\u5dee\u522b\uff1f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170415163452861-885747933.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>&nbsp; \u89e3\uff1a&nbsp;<\/strong>\u6700\u5c0f\u671f\u671b\u503cT=(11*9)\/33=3 &lt; 5 \uff0c\u56e0\u6b64\u4e0d\u80fd\u4f7f\u7528\u5361\u65b9\u68c0\u9a8c\uff0c\u4f7f\u7528fisher\u68c0\u9a8c\uff0c\u5728R\u8bed\u8a00\u4e2d\u4f7f\u7528fisher.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; fisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; control = list(), or = 1, alternative = &#8220;two.sided&#8221;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conf.int = TRUE, conf.level = 0.95)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; #\u5176\u4e2dx\u662f\u5177\u6709\u4e8c\u7ef4\u5217\u8054\u8868\u5f62\u5f0f\u7684\u77e9\u9635\u6216\u662f\u7531\u56e0\u5b50\u6784\u6210\u7684\u5bf9\u8c61\uff0cy\u662f\u7531\u56e0\u5b50\u6784\u6210\u7684\u5bf9\u8c61\uff0c\u5f53x\u662f\u77e9\u9635\u65f6\uff0c\u6b64\u503c\u65e0\u6548\u3002workspace\u7684\u8f93\u5165\u503c\u65f6\u4e00\u6574\u6570\uff0c\u5176\u6574\u6570\u8868\u793a\u7528\u4e8e\u7f51\u7edc\u7b97\u6cd5\u7a7a\u95f4\u7684\u5927\u5c0f\u3002hybrid\u4e3a\u903b\u8f91\u53d8\u91cf\uff0cFALSE(\u7f3a\u7701\u503c)\u8868\u793a\u7cbe\u786e\u8ba1\u7b97\u6982\u7387\uff0cTRUE\u8868\u793a\u7528\u6df7\u5408\u7b97\u6cd5\u8ba1\u7b97\u6982\u7387\u3002alternative\u4e3a\u5907\u62e9\uff0c\u6709&#8221;two.sided&#8221;(\u7f3a\u5931\u503c)\u53cc\u8fb9\uff0c&#8221;less&#8221;\u5355\u8fb9\u5c0f\u4e8e\uff0c&#8221;greater&#8221;\u5355\u8fb9\u5927\u4e8e\uff0cconf.int\u903b\u8f91\u53d8\u91cf\uff0c\u5f53conf.int=TRUE\uff08\u7f3a\u7701\u503c\uff09\uff0c\u7ed9\u51fa \u533a\u95f4\u4f30\u8ba1\u3002conf.level\u4e3a\u7f6e\u4fe1\u6c34\u5e73\uff0c\u7f3a\u7701\u503c\u4e3a0.95\uff0c\u5176\u4f59\u53c2\u6570\u89c1\u5728\u7ebf\u8bf4\u660e\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; x&lt;-c(4,5,18,6); dim(x)&lt;-c(2,2)<br>&nbsp;&nbsp;&nbsp; fisher.test(x)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170415164739814-1350508424.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp; \u53ef\u89c1P\u503c&gt;0.05\uff0c\u63a5\u53d7\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3a\u4e24\u53d8\u91cf\u662f\u72ec\u7acb\u7684\uff0c\u5373\u4e24\u7ec4\u65b0\u751f\u513f\u7684HBV\u603b\u4f53\u611f\u67d3\u7387\u65e0\u5dee\u522b&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;<strong>\u4f8b12.<\/strong>\u67d0\u80f8\u79d1\u533b\u9662\u540c\u65f6\u7528\u7532\u4e59\u4e24\u79cd\u65b9\u6cd5\u6d4b\u5b9a202\u4efd\u75f0\u6837\u672c\u4e2d\u7684\u6297\u9178\u6746\u83cc\uff0c\u7ed3\u679c\u5982\u4e0b\u8868\u6240\u793a\uff0c\u95ee\u7532\u3001\u4e59\u4e24\u79cd\u65b9\u6cd5\u68c0\u51fa\u7387\u6709\u65e0\u5dee\u5f02\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416090959755-1464421631.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u89e3\uff1a<\/strong>\u56e0\u4e3a\u662f\u5728\u76f8\u540c\u4e2a\u4f53\u4e0a\u8fdb\u884c\u7684\u4e24\u6b21\u68c0\u9a8c\uff0c\u56e0\u6b64\u4f7f\u7528McNemar\u68c0\u9a8c\uff0c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1a\u5bf9\u76f8\u540c\u75f0\u6837\u672c\u6d4b\u5b9a\u4e2d\uff0c\u7532\u4e59\u4e24\u79cd\u65b9\u6cd5\u68c0\u51fa\u7387\u6ca1\u6709\u5dee\u5f02\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u5728R\u8bed\u8a00\u4e2d\u8fdb\u884cMcNemar\u68c0\u9a8c\u7528\u5230\u51fd\u6570mcnemar.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; mcnemar.test(x, y = NULL, correct = TRUE)&nbsp;&nbsp;#\u5176\u4e2dx\u662f\u5177\u6709\u4e8c\u7ef4\u5217\u8054\u8868\u5f62\u5f0f\u7684\u77e9\u9635\u6216\u662f\u7531\u56e0\u5b50\u6784\u6210\u7684\u5bf9\u8c61\u3002y\u662f\u7531\u56e0\u5b50\u6784\u6210\u7684\u5bf9\u8c61\uff0c\u5f53x\u662f\u77e9\u9635\u65f6\uff0c\u6b64\u503c\u65e0\u6548\u3002correct\u662f\u903b\u8f91\u53d8\u91cf\uff0cTRUE\uff08\u7f3a\u7701\u503c\uff09\u8868\u793a\u5728\u8ba1\u7b97\u68c0\u9a8c\u7edf\u8ba1\u91cf\u65f6\u7528\u8fde\u7eed\u4fee\u6b63\uff0cFALSE\u662f\u4e0d\u7528\u4fee\u6b63\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; X&lt;-c(49, 21, 25, 107); dim(X)&lt;-c(2,2)<br>&nbsp;&nbsp;&nbsp; mcnemar.test(X,correct=FALSE)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416093450505-1783361552.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>P\u503c&gt; 0.05\uff0c\u4e0d\u80fd\u8ba4\u4e3a\u4e24\u79cd\u68c0\u6d4b\u65b9\u6cd5\u6709\u5dee\u5f02\u3002<\/p>\n\n\n\n<p><strong>3.2.3.\u7b26\u53f7\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;<strong>\u4f8b13.<\/strong>\u8054\u5408\u56fd\u4eba\u5458\u5728\u4e16\u754c\u4e0a66\u4e2a\u5927\u57ce\u5e02\u7684\u751f\u6d3b\u82b1\u8d39\u6307\u6570\uff08\u4ee5\u7ebd\u7ea6\u5e021996\u5e7412\u6708\u4e3a100\uff09\u6309\u81ea\u5c0f\u81f3\u5927\u7684\u6b21\u5e8f\u6392\u5217\u5982\u4e0b\uff08\u8fd9\u91cc\u5317\u4eac\u7684\u6307\u6570\u4e3a99\uff09\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66 75 78 80 81 81 82 83 83 83 83<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 84 85 85 86 86 86 86 87 87 88 88<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 88 88 88 89 89 89 89 90 90 91 91<br>&nbsp; &nbsp; &nbsp;&nbsp; 91 91 92 93 93 96 96 96 97 99 100<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 101 102 103 103 104 104 104 105 106 109 109<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 110 110 110 111 113 115 116 117 118 155 192<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u5047\u8bbe\u8fd9\u4e2a\u6837\u54c1\u662f\u4ece\u4e16\u754c\u8bb8\u591a\u5927\u57ce\u5e02\u4e2d\u968f\u5373\u62bd\u6837\u5f97\u5230\u7684\u3002\u8bd5\u7528\u7b26\u53f7\u68c0\u9a8c\u5206\u6790\uff0c\u5317\u4eac\u662f\u5728\u4e2d\u4f4d\u6570\u4e4b\u4e0a\uff0c\u8fd8\u662f\u5728\u4e2d\u4f4d\u6570\u4e4b\u4e0b\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u89e3\uff1a\u6837\u672c\u7684\u4e2d\u4f4d\u6570\uff08M\uff09\u4f5c\u4e3a\u57ce\u5e02\u751f\u6d3b\u6c34\u5e73\u7684\u4e2d\u95f4\u503c\uff0c\u56e0\u6b64\u9700\u8981\u68c0\u9a8c\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>&nbsp;0<\/sub>&nbsp;: M \u2265 99,&nbsp; H<sub>&nbsp;1<\/sub>&nbsp;: M &lt; 99.<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; \u8f93\u5165\u6570\u636e\uff0c\u4f5c\u4e8c\u9879\u68c0\u9a8c\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; X &lt;- c(66,75, 78 ,80 ,81 ,81 ,82, 83, 83, 83, 83,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 84 , 85, 85, 86, 86, 86, 86, 87 ,87, 88, 88,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 88, 88, 88, 89 ,89, 89, 89, 90 ,90 ,91 ,91,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 91 ,91, 92, 93, 93, 96, 96, 96, 97, 99, 100,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 101, 102, 103, 103 ,104, 104, 104 ,105, 106, 109, 109,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 110 ,110, 110, 111, 113, 115, 116, 117 ,118, 155 ,192)<br>&nbsp;&nbsp;&nbsp;&nbsp; binom.test(sum(X&gt;99), length(X), al=&#8221;l&#8221;)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416102433817-1148510350.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u5728\u7a0b\u5e8f\u4e2d\uff0csum(x&gt;99)\u8868\u793a\u6837\u672c\u4e2d\u5927\u4e8e99\u7684\u4e2a\u6570\u3002al\u662falternative\u7684\u7f29\u5199\uff0c&#8221;l&#8221;\u662f&#8221;less&#8221;\u7684\u7f29\u5199\u3002\u8ba1\u7b97\u51fa\u7684P\u503c\u5c0f\u4e8e0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5317\u4eac\u7684\u751f\u6d3b\u6c34\u5e73\u9ad8\u4e8e\u4e16\u754c\u7684\u4e2d\u4f4d\u6c34\u5e73\u3002<\/p>\n\n\n\n<p><strong>\u4f8b14.<\/strong>\u7528\u4e24\u79cd\u4e0d\u540c\u7684\u9972\u6599\u517b\u732a\uff0c\u5176\u589e\u91cd\u60c5\u51b5\u5982\u4e0b\u8868\u6240\u793a\u3002\u8bd5\u5206\u6790\u4e24\u79cd\u9972\u6599\u517b\u732a\u6709\u65e0\u663e\u8457\u5dee\u5f02\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416103356036-1644133641.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp; x&lt;-scan()<br>&nbsp; &nbsp;&nbsp; 25 30 28 23 27 35 30 28 32 29 30 30 31 16<br><br>&nbsp;&nbsp;&nbsp;&nbsp; y&lt;-scan()<br>&nbsp;&nbsp;&nbsp;&nbsp; 19 32 21 19 25 31 31 26 30 25 28 31 25 25<br><br>&nbsp;&nbsp;&nbsp;&nbsp; binom.test(sum(x&lt;y), length(x))<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416104113833-2015606236.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>sum(x &lt; y)\u8868\u793a\u6837\u54c1X\u5c0f\u4e8e\u6837\u54c1Y\u7684\u4e2a\u6570\u3002\u8ba1\u7b97\u51faP\u503c\u5927\u4e8e0.05\uff0c\u65e0\u6cd5\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u53ef\u4ee5\u8ba4\u4e3a\u4e24\u79cd\u9972\u6599\u517b\u732a\u65e0\u663e\u8457\u5dee\u5f02\u3002<\/p>\n\n\n\n<p><strong>\u4f8b15.<\/strong>\u67d0\u996e\u6599\u5e97\u4e3a\u4e86\u89e3\u987e\u5ba2\u5bf9\u996e\u6599\u7684\u7231\u597d\u60c5\u611f\uff0c\u8fdb\u4e00\u6b65\u6539\u8fdb\u4ed6\u4eec\u7684\u5de5\u4f5c\uff0c\u5bf9\u987e\u5ba2\u559c\u6b22\u5496\u5561\u8fd8\u662f\u559c\u6b22\u5976\u8336\uff0c\u6216\u8005\u4e24\u8005\u540c\u6837\u7231\u597d\u8fdb\u884c\u4e86\u8c03\u67e5\uff0c\u987e\u5ba2\u559c\u6b22\u5496\u5561\u8d85\u8fc7\u5976\u8336\u7528\u6b63\u53f7\u8868\u793a\uff0c\u559c\u6b22\u5976\u8336\u8d85\u8fc7\u5496\u5561\u7528\u8d1f\u53f7\u8868\u793a\uff0c\u4e24\u8005\u540c\u6837\u7231\u597d\u75280\u8868\u793a\u3002\u73b0\u5c06\u8c03\u67e5\u7684\u7ed3\u679c\u5217\u5728\u4e0b\u8868\u4e2d\u3002\u8bd5\u5206\u6790\u987e\u5ba2\u662f\u559c\u6b22\u5496\u5561\u8fd8\u662f\u559c\u6b22\u5976\u8336\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416104732098-1150287525.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u89e3\uff1a<\/strong>\u6839\u636e\u9898\u610f\u53ef\u68c0\u9a8c\u5982\u4e0b\u5047\u8bbe\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1a\u987e\u5ba2\u559c\u6b22\u5496\u5561\u7b49\u4e8e\u559c\u6b22\u5976\u8336\uff1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>1<\/sub>\uff1a\u987e\u5ba2\u559c\u6b22\u5496\u5561\u8d85\u8fc7\u5976\u8336\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u4ee5\u4e0a\u8d44\u6599\u4e2d\u6709\u4ee5\u4eba\uff08\u53736\u53f7\u987e\u5ba2\uff09\u8868\u793a\u5bf9\u5496\u5561\u548c\u5976\u8336\u6709\u540c\u6837\u7231\u597d\uff0c\u75280\u8868\u793a\uff0c\u56e0\u6b64\u5728\u6837\u672c\u5bb9\u91cf\u4e2d\u4e0d\u52a0\u8ba1\u7b97\uff0c\u6240\u4ee5\u5b9e\u9645\u4e0aN=12.\u5982\u679cH<sub>0<\/sub>\u5047\u8bbe\u4e3a\u771f\uff0c\u90a3\u4e48\u7b26\u5408p\u4e3a1\/2\u7684\u4e8c\u9879\u5206\u5e03\uff0c\u5982\u679cH1\u4e3a\u771f\uff0c\u90a3\u4e48\u987e\u5ba2\u559c\u6b22\u5976\u8336\u7684\u4eba\u6570\u5c0f\u4e8e\u7406\u8bba\u503c\uff0cal=&#8221;l&#8221;\uff0c\u56e0\u6b64\u7528R\u8f6f\u4ef6\u8fdb\u884c\u8ba1\u7b97\uff0c\u663e\u8457\u6027\u6c34\u5e73\u53d6\u03b1 = 0.10\uff0c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; binom.test(3,12,p=1\/2, al=&#8221;l&#8221;, conf.level = 0.90)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416110806067-782958037.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u53ef\u89c1P\u503c &lt; 0.1 \uff0c\u7f6e\u4fe1\u533a\u95f4\u4e5f\u4e0d\u5305\u62ec0.5\uff0c\u56e0\u6b64\u62d2\u7edd\u539f\u5047\u8bbe\u4eba\u53e3\u559c\u6b22\u5496\u5561\u7684\u4eba\u8d85\u8fc7\u559c\u6b22\u5976\u8336\u7684\u4eba\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u5728\u7b26\u53f7\u68c0\u9a8c\u6cd5\u4e2d\uff0c\u53ea\u8ba1\u7b97\u7b26\u53f7\u7684\u4e2a\u6570\uff0c\u800c\u4e0d\u8003\u8651\u6bcf\u4e2a\u7b26\u53f7\u5dee\u6240\u5305\u542b\u7684\u7edd\u5bf9\u503c\u7684\u5927\u5c0f\uff0c\u56e0\u6b64\u5e38\u5e38\u4f7f\u7528\u5f25\u8865\u4e86\u8fd9\u4e2a\u7f3a\u70b9\u7684wilcoxon\u7b26\u53f7\u79e9\u68c0\u9a8c\u3002<\/p>\n\n\n\n<p><strong>3.3.4.\u7b26\u53f7\u79e9\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<strong>&nbsp;\u4f8b16.<\/strong>\u5047\u5b9a\u67d0\u7535\u6c60\u5382\u5ba3\u79f0\u8be5\u5382\u751f\u4ea7\u7684\u67d0\u79cd\u578b\u53f7\u7535\u6c60\u5bff\u547d\u7684\u4e2d\u4f4d\u6570\u4e3a140\u5b89\u57f9\u5c0f\u65f6\u3002\u4e3a\u4e86\u68c0\u9a8c\u6539\u5382\u751f\u4ea7\u7684\u7535\u6c60\u662f\u5426\u7b26\u5408\u5176\u89c4\u5b9a\u7684\u6807\u51c6\uff0c\u73b0\u4ece\u65b0\u8fd1\u751f\u4ea7\u7684\u4e00\u6279\u7535\u6c60\u4e2d\u62bd\u53d6\u4e86\u968f\u5373\u6837\u672c\uff0c\u5e76\u5bf9\u8fd920\u4e2a\u7535\u6c60\u7684\u5bff\u547d\u8fdb\u884c\u4e86\u6d4b\u8bd5\uff0c\u5176\u7ed3\u679c\u5982\u4e0b\uff08\u5355\u4f4d\uff1a\u5b89\u57f9\u5c0f\u65f6\uff09\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 137.0 140.0 138.3 139.0 144.3 139.1 141.7 137.3 133.5 138.2<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 141.1 139.2 136.5 136.5 135.6 138.0 140.9 140.6 136.3 134.1<\/p>\n\n\n\n<p>\u8bd5\u7528Wilcoxon\u7b26\u53f7\u79e9\u68c0\u9a8c\u5206\u6790\u8be5\u5382\u751f\u4ea7\u7684\u7535\u6c60\u662f\u5426\u7b26\u5408\u5176\u6807\u51c6\u3002<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u89e3\uff1a<\/strong>\u6839\u636e\u9898\u610f\u5047\u8bbe\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>0<\/sub>\uff1a\u7535\u6c60\u4e2d\u4f4d\u6570M\u2265 140\u5b89\u57f9\u5c0f\u65f6\uff1b<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H<sub>1<\/sub>\uff1a\u7535\u6c60\u4e2d\u4f4d\u6570&lt;140\u5b89\u57f9\u5c0f\u65f6\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5728R\u8bed\u8a00\u4e2d\u8fdb\u884c\u7b26\u53f7\u79e9\u68c0\u9a8c\u53ef\u4ee5\u4f7f\u7528wilcox.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;wilcox.test(x, y = NULL,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternative = c(&#8220;two.sided&#8221;, &#8220;less&#8221;, &#8220;greater&#8221;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mu = 0, paired = FALSE, exact = NULL, correct = TRUE,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conf.int = FALSE, conf.level = 0.95, &#8230;)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5176\u4e2dx,y\u662f\u89c2\u5bdf\u6570\u636e\u6784\u6210\u7684\u6570\u636e\u5411\u91cf\u3002alternative\u662f\u5907\u62e9\u5047\u8bbe\uff0c\u6709\u5355\u4fa7\u68c0\u9a8c\u548c\u53cc\u4fa7\u68c0\u9a8c\uff0cmu\u5f85\u68c0\u53c2\u6570\uff0c\u5982\u4e2d\u4f4d\u6570M<sub>0<\/sub>.paired\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u8bf4\u660e\u53d8\u91cfx,y\u662f\u5426\u4e3a\u6210\u5bf9\u6570\u636e\u3002exact\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u8bf4\u660e\u662f\u5426\u7cbe\u786e\u8ba1\u7b97P\u503c\uff0c\u5f53\u6837\u672c\u91cf\u8f83\u5c0f\u65f6\uff0c\u6b64\u53c2\u6570\u8d77\u4f5c\u7528\uff0c\u5f53\u6837\u672c\u4e24\u8f83\u5927\u65f6\uff0c\u8f6f\u4ef6\u91c7\u7528\u6b63\u6001\u5206\u5e03\u8fd1\u4f3c\u8ba1\u7b97P\u503c\u3002correct\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u8bf4\u660e\u662f\u5426\u5bf9P\u503c\u7684\u8ba1\u7b97\u91c7\u7528\u8fde\u7eed\u6027\u4fee\u6b63\uff0c\u76f8\u540c\u79e9\u6b21\u8f83\u591a\u65f6\uff0c\u7edf\u8ba1\u91cf\u8981\u6821\u6b63\u3002conf.int\u662f\u903b\u8f91\u53d8\u91cf\uff0c\u8bf4\u660e\u662f\u5426\u7ed9\u51fa\u76f8\u5e94\u7684\u7f6e\u4fe1\u533a\u95f4\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X&lt;-scan()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 137.0 140.0 138.3 139.0 144.3 139.1 141.7 137.3 133.5 138.2 141.1&nbsp; 139.2 136.5 136.5 135.6 138.0 140.9 140.6 136.3 134.1<br><br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; wilcox.test(X, mu=140, alternative=&#8221;less&#8221;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; exact=FALSE,correct=FALSE, conf.int=TRUE)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416194257149-619008211.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u8fd9\u91ccV=34\u662fwicoxon\u7684\u7edf\u8ba1\u91cf\uff0cP\u503c&lt;0.05\uff0c\u5373\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u63a5\u53d7\u5907\u62e9\u5047\u8bbe\uff0c\u4e2d\u4f4d\u503c\u5c0f\u4e8e\u5c0f\u4e8e140\u5b89\u57f9\u5c0f\u65f6\u3002<\/p>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;<strong>\u4f8b17.&nbsp;<\/strong>\u4e3a\u4e86\u68c0\u9a8c\u4e00\u79cd\u65b0\u7684\u590d\u5408\u80a5\u548c\u539f\u6765\u4f7f\u7528\u7684\u80a5\u6599\u76f8\u6bd4\u662f\u5426\u663e\u8457\u63d0\u9ad8\u4e86\u5c0f\u9ea6\u7684\u4ea7\u91cf\uff0c\u5728\u4e00\u4e2a\u519c\u573a\u4e2d\u9009\u62e9\u4e8610\u5757\u7530\u5730\uff0c\u6bcf\u5757\u7b49\u5206\u4e3a\u4e24\u90e8\u5206\uff0c\u5176\u4e2d\u4efb\u6307\u5b9a\u4e00\u90e8\u5206\u4f7f\u7528\u65b0\u7684\u590d\u5408\u80a5\u6599\uff0c\u53e6\u4e00\u90e8\u5206\u4f7f\u7528\u539f\u80a5\u6599\u3002\u5c0f\u9ea6\u6210\u719f\u540e\u79f0\u5f97\u5404\u90e8\u5206\u5c0f\u9ea6\u4ea7\u91cf\u5982\u4e0b\u8868\u6240\u793a\u3002\u8bd5\u7528Wilcoxon\u7b26\u53f7\u68c0\u9a8c\u6cd5\u68c0\u9a8c\u65b0\u590d\u5408\u80a5\u662f\u5426\u4f1a\u663e\u8457\u63d0\u9ad8\u5c0f\u9ea6\u7684\u4ea7\u91cf\uff0c\u5e76\u4e0e\u7b26\u53f7\u68c0\u9a8c\u4f5c\u6bd4\u8f83\uff08\u03b1 = 0.05\uff09\u3002<\/p>\n\n\n\n<p>&nbsp;<strong>&nbsp;&nbsp; \u89e3\uff1a<\/strong>\u6839\u636e\u9898\u610f\u4f5c\u5982\u4e0b\u5047\u8bbe\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H0\uff1a\u65b0\u590d\u5408\u80a5\u7684\u4ea7\u91cf\u4e0e\u539f\u80a5\u6599\u7684\u4ea7\u91cf\u76f8\u540c\uff0c<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; H1\uff1a\u65b0\u590d\u5408\u80a5\u7684\u4ea7\u91cf\u9ad8\u4e8e\u539f\u80a5\u6599\u7684\u4ea7\u91cf\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b26\u53f7\u79e9\u68c0\u9a8cR\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x&lt;-c(459, 367, 303, 392, 310, 342, 421, 446, 430, 412)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y&lt;-c(414, 306, 321, 443, 281, 301, 353, 391, 405, 390)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wilcox.test(x, y, alternative = &#8220;greater&#8221;, paired = TRUE)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416195215321-1726210629.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u53ef\u89c1P\u503c&lt;0.05\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5373\u65b0\u590d\u5408\u80a5\u80fd\u663e\u8457\u63d0\u9ad8\u5c0f\u9ea6\u4ea7\u91cf\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b26\u53f7\u68c0\u9a8cR\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x&lt;-c(459, 367, 303, 392, 310, 342, 421, 446, 430, 412)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y&lt;-c(414, 306, 321, 443, 281, 301, 353, 391, 405, 390)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binom.test(sum(x&gt;y), length(x), alternative = &#8220;greater&#8221;) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416195803524-1738273811.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7528\u7b26\u53f7\u68c0\u9a8cP\u503c&gt;0.05\uff0c\u56e0\u6b64\u5728\u03b1 = 0.05\u7684\u6c34\u5e73\u4e0b\uff0c\u5c31\u6240\u7ed9\u6570\u636e\u800c\u8a00\uff0c\u7b26\u53f7\u68c0\u9a8c\u8fd8\u4e0d\u8db3\u4ee5\u533a\u5206\u4e24\u79cd\u5316\u80a5\u5bf9\u63d0\u9ad8\u5c0f\u9ea6\u7684\u4ea7\u91cf\u4ea7\u751f\u5dee\u5f02\u3002<\/p>\n\n\n\n<p><strong>\u4f8b18.<\/strong>\u4eca\u6d4b\u5f9710\u540d\u975e\u94c5\u4f5c\u4e1a\u5de5\u4eba\u548c7\u540d\u94c5\u4f5c\u4e1a\u5de5\u4eba\u7684\u8840\u94c5\u503c\uff0c\u5982\u4e0b\u8868\u6240\u793a\u3002\u8bd5\u7528Wilcoxon\u79e9\u548c\u68c0\u9a8c\u5206\u6790\u4e24\u7ec4\u5de5\u4eba\u8840\u94c5\u503c\u6709\u65e0\u5dee\u5f02\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416202430368-1720436348.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>\u8fdb\u884cWilcoxon\u79e9\u548c\u68c0\u9a8cR\u8bed\u8a00\u540c\u6837\u53ef\u4ee5\u4f7f\u7528wilcox.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;x&lt;-c(24, 26, 29, 34, 43, 58, 63, 72, 87, 101)<\/p>\n\n\n\n<p>&nbsp; &nbsp; y&lt;-c(82, 87, 97, 121, 164, 208, 213)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; wilcox.test(x,y,alternative=&#8221;less&#8221;,exact=FALSE,correct=FALSE)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416205025009-667923404.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp; P\u503c\u5c0f\u4e8e0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5373\u94c5\u4f5c\u4e1a\u5de5\u4eba\u8840\u94c5\u503c\u9ad8\u4e8e\u975e\u4f5c\u4e1a\u5de5\u4eba\u3002<\/p>\n\n\n\n<p><strong>\u4f8b19.<\/strong>\u67d0\u533b\u9662\u7528\u67d0\u79cd\u836f\u7269\u6cbb\u7597\u4e24\u578b\u6162\u6027\u652f\u6c14\u7ba1\u708e\u60a3\u8005\u5171216\u4f8b\uff0c\u7597\u6548\u7531\u4e0b\u8868\u6240\u793a\uff0c\u8bd5\u5206\u6790\u8be5\u836f\u7269\u5bf9\u4e24\u578b\u6162\u6027\u652f\u6c14\u7ba1\u708e\u7684\u6cbb\u7597\u662f\u5426\u76f8\u540c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416205423227-331128035.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u89e3\uff1a<\/strong>\u6211\u4eec\u60f3\u8c61\u5404\u75c5\u4eba\u7684\u7597\u6548\u75284\u4e2a\u4e0d\u540c\u7684\u503c\u8868\u793a\uff081\u8868\u793a\u6700\u597d\uff0c4\u8868\u793a\u6700\u5dee\uff09\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f4d\u8fd9216\u540d\u6392\u5e8f\uff0c\u56e0\u6b64\uff0c\u53ef\u7528Wilcoxon\u79e9\u548c\u68c0\u9a8c\u6765\u5206\u6790\u95ee\u9898\u3002<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; x&lt;-rep(1:4, c(62, 41, 14,11)); y&lt;-rep(1:4, c(20, 37, 16, 15))<br>&nbsp;&nbsp;&nbsp; wilcox.test(x, y, exact=FALSE)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416211247946-1575575521.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp; &nbsp; P\u503c&lt;0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5373\u8ba4\u4e3a\u8be5\u836f\u7269\u5bf9\u4e24\u578b\u6162\u6027\u652f\u6c14\u7ba1\u708e\u7684\u6cbb\u7597\u662f\u4e0d\u76f8\u540c\u7684\u3002\u56e0\u4e3a\u6570\u636e\u6709\u7ed3\u70b9\u5b58\u5728\uff0c\u6545\u65e0\u6cd5\u7cbe\u786e\u8ba1\u7b97P\u503c\uff0c\u5176\u53c2\u6570\u4e3aexact=FALSE\u3002&nbsp;<\/p>\n\n\n\n<p><strong>&nbsp;3.3.5.\u4e8c\u5143\u6570\u636e\u76f8\u5173\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u4f8b20<\/strong>.\u67d0\u79cd\u77ff\u77f3\u4e2d\u4e24\u79cd\u6709\u7528\u6210\u5206A\uff0cB\uff0c\u53d610\u4e2a\u6837\u54c1\uff0c\u6bcf\u4e2a\u6837\u54c1\u4e2d\u6210\u5206A\u7684\u542b\u91cf\u767e\u5206\u6570x(%)\uff0c\u53caB\u7684\u542b\u91cf\u767e\u5206\u6570y(%)\u7684\u6570\u636e\u4e0b\u8868\u6240\u793a\uff0c\u5bf9\u4e24\u7ec4\u6570\u636e\u8fdb\u884c\u76f8\u5173\u6027\u68c0\u9a8c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416163304977-1448537808.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>\u89e3\uff1a<\/strong>\u8fdb\u884c\u76f8\u5173\u6027\u68c0\u9a8c\uff0c\u5728R\u8bed\u8a00\u4e2d\u53ef\u4ee5\u4f7f\u7528cor.test( )<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;cor.test(x, y,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternative = c(&#8220;two.sided&#8221;, &#8220;less&#8221;, &#8220;greater&#8221;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; method = c(&#8220;pearson&#8221;, &#8220;kendall&#8221;, &#8220;spearman&#8221;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exact = NULL, conf.level = 0.95, &#8230;)<\/p>\n\n\n\n<p>&nbsp; &nbsp; #\u5176\u4e2dx,y\u662f\u6570\u636e\u957f\u5ea6\u76f8\u540c\u7684\u5411\u91cf\uff0calternative\u662f\u5907\u62e9\u5047\u8bbe\uff0c\u7f3a\u7701\u503c\u4e3a&#8221;two.sided&#8221;\uff0cmethod\u662f\u68c0\u9a8c\u65b9\u6cd5\uff0c\u7f3a\u7701\u503c\u662fPearson\u68c0\u9a8c\uff0cconf.level\u662f\u7f6e\u4fe1\u533a\u95f4\u6c34\u5e73\uff0c\u7f3a\u7701\u503c\u4e3a0.95<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; cor.test( )\u8fd8\u6709\u53e6\u4e00\u79cd\u4f7f\u7528\u683c\u5f0f<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;cor.test(formula, data, subset, na.action, &#8230;) #\u5176\u4e2dformula\u662f\u516c\u5f0f\uff0c\u5f62\u5982&#8217;~u+v&#8217; , &#8216;u&#8217;, &#8216;v&#8217; \u5fc5\u987b\u662f\u5177\u6709\u76f8\u540c\u957f\u5ea6\u7684\u6570\u503c\u5411\u91cf\uff0cdata\u662f\u6570\u636e\u6846\uff0csubset\u662f\u53ef\u9009\u62e9\u5411\u91cf\uff0c\u8868\u793a\u89c2\u5bdf\u503c\u7684\u5b50\u96c6\u3002 &nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp; \u5047\u8bbe\u6b64\u4f8b\u4e2d\u4e24\u7ec4\u6570\u636e\u5747\u6765\u81ea\u6b63\u6001\u5206\u5e03\uff0c\u4f7f\u7528pearson\u76f8\u5173\u6027\u68c0\u9a8c\uff0c<\/p>\n\n\n\n<p>&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ore&lt;-data.frame(<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; x=c(67, 54, 72, 64, 39, 22, 58, 43, 46, 34),<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; y=c(24, 15, 23, 19, 16, 11, 20, 16, 17, 13)<br>&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; cor.test(ore$x,ore$y)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416175725024-1328463044.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; \u53ef\u89c1P\u503c&lt;0.05,\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3aX\u4e0eY\u76f8\u5173\u3002<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp; \u4f8b21.<\/strong>\u4e00\u9879\u6709\u516d\u4e2a\u4eba\u53c2\u52a0\u8868\u6f14\u7684\u7ade\u8d5b\uff0c\u6709\u4e24\u4eba\u8fdb\u884c\u8bc4\u5b9a\uff0c\u8bc4\u5b9a\u7ed3\u679c\u7528\u4e0b\u8868\u6240\u793a\uff0c\u8bd5\u7528Spearman\u79e9\u76f8\u5173\u68c0\u9a8c\u65b9\u6cd5\u68c0\u9a8c\u8fd9\u4e24\u4e2a\u8bc4\u5b9a\u5458\u5bf9\u7b49\u7ea7\u8bc4\u5b9a\u6709\u65e0\u76f8\u5173\u5173\u7cfb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416181244790-1502842126.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp; \u89e3\uff1a<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; R\u8bed\u8a00\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; x&lt;-c(1,2,3,4,5,6); y&lt;-c(6,5,4,3,2,1)<br>&nbsp;&nbsp;&nbsp; cor.test(x, y, method = &#8220;spearman&#8221;)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/1093203\/201704\/1093203-20170416181611087-1512279319.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u53ef\u89c1P\u503c&lt;0.05\uff0c\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3ax\u4e0ey\u76f8\u5173\uff0cr<sub>s<\/sub>=-1\uff0c\u8868\u793a\u8fd9\u4e24\u4e2a\u91cf\u662f\u5b8c\u5168\u8d1f\u76f8\u5173\uff0c\u5373\u4e24\u4eba\u7684\u7ed3\u8bba\u6709\u5173\u7cfb\uff0c\u4f46\u5b8c\u5168\u76f8\u53cd\u3002<\/p>\n\n\n\n<p><strong>\u53c2\u8003\u8d44\u6599<\/strong><\/p>\n\n\n\n<p>\u7edf\u8ba1\u5efa\u6a21\u4e0eR\u8f6f\u4ef6(\u4e0a\u518c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6b63\u6001\u5206\u5e03\u53c2\u6570\u68c0\u9a8c &nbsp;&nbsp;&nbsp;\u4f8b1.&nbsp;\u67d0\u79cd <span class=\"readmore\"><a href=\"http:\/\/g1n29wqq.ipyingshe.net:5347\/?p=1159\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,5],"tags":[],"class_list":["post-1159","post","type-post","status-publish","format-standard","hentry","category-r","category-statistics"],"_links":{"self":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1159"}],"version-history":[{"count":1,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions"}],"predecessor-version":[{"id":1160,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions\/1160"}],"wp:attachment":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}