{"id":1227,"date":"2023-07-27T05:20:12","date_gmt":"2023-07-27T05:20:12","guid":{"rendered":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/"},"modified":"2023-07-27T05:20:12","modified_gmt":"2023-07-27T05:20:12","slug":"r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93","status":"publish","type":"post","link":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/","title":{"rendered":"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/ja\/\u4fe1\u983c\u533a\u9593-1\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u4fe1\u983c\u533a\u9593\u306f<\/a>\u3001\u4e00\u5b9a\u306e\u4fe1\u983c\u30ec\u30d9\u30eb\u3067<a href=\"https:\/\/statorials.org\/ja\/\u7d71\u8a08\u3068\u30cf\u309a\u30e9\u30e1\u30fc\u30bf\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u6bcd\u96c6\u56e3\u30d1\u30e9\u30e1\u30fc\u30bf\u304c<\/a>\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u5024\u306e\u7bc4\u56f2\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u4e00\u822c\u5f0f\u306b\u5f93\u3063\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593<\/strong>= (\u70b9\u63a8\u5b9a\u5024) +\/- (\u81e8\u754c\u5024)* (\u6a19\u6e96\u8aa4\u5dee)<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u5f0f\u306f\u3001\u4e0b\u9650\u3068\u4e0a\u9650\u3092\u6301\u3064\u533a\u9593\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4fe1\u983c\u5ea6\u306e\u3042\u308b\u6bcd\u96c6\u56e3\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593<\/strong>= [\u4e0b\u9650\u3001\u4e0a\u9650]<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u6b21\u306e\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u5e73\u5747\u5024\u306e\u4fe1\u983c\u533a\u9593<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>2.<\/strong>\u5e73\u5747\u5024\u306e\u5dee\u306e\u4fe1\u983c\u533a\u9593<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>3.<\/strong>\u5272\u5408\u306e\u4fe1\u983c\u533a\u9593<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>4.<\/strong>\u6bd4\u7387\u306e\u5dee\u306e\u4fe1\u983c\u533a\u9593<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3055\u3042\u884c\u3053\u3046\uff01<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 1: \u5e73\u5747\u5024\u306e\u4fe1\u983c\u533a\u9593<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u3001 <a href=\"https:\/\/statorials.org\/ja\/\u5e73\u5747\u4fe1\u983c\u533a\u9593\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5e73\u5747\u306e\u4fe1\u983c\u533a\u9593<\/a>\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593 = <span style=\"text-decoration: overline;\">x<\/span> +\/- t <sub>n-1, 1-\u03b1\/2<\/sub> *(s\/\u221an)<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong><span style=\"text-decoration: overline;\">x<\/span> :<\/strong>\u30b5\u30f3\u30d7\u30eb\u5e73\u5747<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>t:<\/strong> t \u81e8\u754c\u5024<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>s:<\/strong>\u30b5\u30f3\u30d7\u30eb\u306e\u6a19\u6e96\u504f\u5dee<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>n:<\/strong>\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u4f8b:<\/strong>\u6b21\u306e\u60c5\u5831\u3092\u542b\u3080\u30ab\u30e1\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u53ce\u96c6\u3059\u308b\u3068\u3057\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba<strong>n = 25<\/strong><\/span><\/li>\n<li><span style=\"color: #000000;\">\u5e73\u5747\u30b5\u30f3\u30d7\u30eb\u91cd\u91cf<strong><span style=\"text-decoration: overline;\">x<\/span> = 300<\/strong><\/span><\/li>\n<li><span style=\"color: #000000;\">\u30b5\u30f3\u30d7\u30eb\u6a19\u6e96\u504f\u5dee<strong>s = 18.5<\/strong><\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30ab\u30e1\u500b\u4f53\u7fa4\u306e\u771f\u306e\u5e73\u5747\u4f53\u91cd\u306e 95% \u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#input sample size, sample mean, and sample standard deviation\n<\/span>n &lt;- 25\nxbar &lt;- 300 \ns &lt;- 18.5\n\n<span style=\"color: #008080;\">#calculate margin of error\n<\/span>margin &lt;- qt(0.975,df=n-1)*s\/sqrt(n)\n\n<span style=\"color: #008080;\">#calculate lower and upper bounds of confidence interval\n<\/span>low &lt;- xbar - margin\nlow\n\n[1] 292.3636\n\nhigh &lt;- xbar + margin\nhigh\n\n[1] 307.6364\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30ab\u30e1\u500b\u4f53\u7fa4\u306e\u771f\u306e\u5e73\u5747\u4f53\u91cd\u306e 95% \u4fe1\u983c\u533a\u9593\u306f<strong>[292.36, 307.64]<\/strong>\u3067\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 2: \u5e73\u5747\u5024\u306e\u5dee\u306e\u4fe1\u983c\u533a\u9593<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u3001 <a href=\"https:\/\/statorials.org\/ja\/\u5e73\u5747\u5024\u9593\u306e\u4fe1\u983c\u533a\u9593\u306e\u5dee\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u6bcd\u5e73\u5747\u306e\u5dee<\/a>\u306e\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593<\/strong>= ( <span style=\"text-decoration: overline;\">x<\/span> <sub>1<\/sub> \u2013 <span style=\"text-decoration: overline;\">x<\/span> <sub>2<\/sub> ) +\/- t*\u221a((s <sub>p<\/sub> <sup>2<\/sup> \/n <sub>1<\/sub> ) + (s <sub>p<\/sub> <sup>2<\/sup> \/n <sub>2<\/sub> ))<\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><span style=\"text-decoration: overline;\">x<\/span> <sub>1<\/sub> \u3001 <span style=\"text-decoration: overline;\">x<\/span> <sub>2<\/sub> : \u30b5\u30f3\u30d7\u30eb 1 \u306e\u5e73\u5747\u3001\u30b5\u30f3\u30d7\u30eb 2 \u306e\u5e73\u5747<\/span><\/li>\n<li><span style=\"color: #000000;\">t: \u4fe1\u983c\u6c34\u6e96\u3068 (n <sub>1<\/sub> + n <sub>2<\/sub> -2) \u81ea\u7531\u5ea6\u306b\u57fa\u3065\u304f t \u81e8\u754c\u5024<\/span><\/li>\n<li><span style=\"color: #000000;\">s <sub>p<\/sub> <sup>2<\/sup> : \u30d7\u30fc\u30eb\u3055\u308c\u305f\u5206\u6563\u3001((n <sub>1<\/sub> -1)s <sub>1<\/sub> <sup>2<\/sup> + (n <sub>2<\/sub> -1)s <sub>2<\/sub> <sup>2<\/sup> ) \/ (n <sub>1<\/sub> +n <sub>2<\/sub> -2) \u3068\u3057\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\">t: t \u81e8\u754c\u5024<\/span><\/li>\n<li><span style=\"color: #000000;\">n <sub>1<\/sub> \u3001n <sub>2<\/sub> : \u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba 1\u3001\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba 2<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u4f8b:<\/strong> 2 \u3064\u306e\u7570\u306a\u308b\u7a2e\u306e\u30ab\u30e1\u306e\u5e73\u5747\u4f53\u91cd\u306e\u5dee\u3092\u63a8\u5b9a\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u5404\u96c6\u56e3\u304b\u3089 15 \u5339\u306e\u30ab\u30e1\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002\u5404\u30b5\u30f3\u30d7\u30eb\u306e\u6982\u8981\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b5\u30f3\u30d7\u30eb 1:<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><span style=\"text-decoration: overline;\">x1<\/span> = <sub>310<\/sub><\/span><\/li>\n<li> <span style=\"color: #000000;\"><sub>s1<\/sub> = 18.5<\/span><\/li>\n<li> <span style=\"color: #000000;\">n <sub>1<\/sub> = 15<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u30b5\u30f3\u30d7\u30eb 2:<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><span style=\"text-decoration: overline;\">x2<\/span> <sub>=<\/sub> 300<\/span><\/li>\n<li> <span style=\"color: #000000;\"><sub>s2<\/sub> = 16.4<\/span><\/li>\n<li> <span style=\"color: #000000;\"><sub>n2<\/sub> = 15<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u6bcd\u5e73\u5747\u306e\u771f\u306e\u5dee\u306e 95% \u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#input sample size, sample mean, and sample standard deviation\n<\/span>n1 &lt;- 15\nxbar1 &lt;- 310 \ns1 &lt;- 18.5\n\nn2 &lt;- 15\nxbar2 &lt;- 300\ns2 &lt;- 16.4\n\n<span style=\"color: #008080;\">#calculate pooled variance\n<span style=\"color: #000000;\">sp = ((n1-1)*s1^2 + (n2-1)*s2^2) \/ (n1+n2-2)<\/span>\n\n#calculate margin of error\n<\/span>margin &lt;- qt(0.975,df=n1+n2-1)*sqrt(sp\/n1 + sp\/n2)\n\n<span style=\"color: #008080;\">#calculate lower and upper bounds of confidence interval\n<\/span>low &lt;- (xbar1-xbar2) - margin\nlow\n\n[1] -3.055445\n\nhigh &lt;- (xbar1-xbar2) + margin\nhigh\n\n[1] 23.05544\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6bcd\u96c6\u56e3\u5e73\u5747\u9593\u306e\u771f\u306e\u5dee\u306e 95% \u4fe1\u983c\u533a\u9593\u306f<strong>[-3.06, 23.06]<\/strong>\u3067\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 3: \u6bd4\u7387\u306e\u4fe1\u983c\u533a\u9593<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u3001 <a href=\"https:\/\/statorials.org\/ja\/\u4fe1\u983c\u533a\u9593\u306e\u5272\u5408\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5272\u5408\u306e\u4fe1\u983c\u533a\u9593<\/a>\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593 = p<\/strong> <strong>+\/- z*(\u221a <span style=\"text-decoration: overline;\">p(1-p) \/ n<\/span> )<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>p:<\/strong>\u30b5\u30f3\u30d7\u30eb\u5272\u5408<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>z:<\/strong>\u9078\u629e\u3055\u308c\u305f Z \u5024<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>n:<\/strong>\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u4f8b:<\/strong>\u7279\u5b9a\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u90e1\u306e\u4f4f\u6c11\u306e\u5272\u5408\u3092\u63a8\u5b9a\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u4f4f\u6c11 100 \u4eba\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u7121\u4f5c\u70ba\u306b\u9078\u3073\u3001\u6cd5\u5f8b\u306b\u5bfe\u3059\u308b\u5f7c\u3089\u306e\u7acb\u5834\u3092\u5c0b\u306d\u307e\u3057\u305f\u3002\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba<strong>n = 100<\/strong><\/span><\/li>\n<li><span style=\"color: #000000;\">\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u5272\u5408<strong>p = 0.56<\/strong><\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u3053\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u90e1\u5168\u4f53\u306e\u4f4f\u6c11\u306e\u771f\u306e\u5272\u5408\u306e 95% \u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#input sample size and sample proportion\n<\/span>n &lt;- 100\np &lt;- .56<span style=\"color: #008080;\">\n\n#calculate margin of error\n<\/span>margin &lt;- qnorm(0.975)*sqrt(p*(1-p)\/n)\n\n<span style=\"color: #008080;\">#calculate lower and upper bounds of confidence interval\n<\/span>low &lt;- p - margin\nlow\n\n[1] 0.4627099\n\nhigh &lt;- p + margin\nhigh\n\n[1] 0.6572901\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u3053\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u90e1\u5168\u4f53\u306e\u4f4f\u6c11\u306e\u771f\u306e\u5272\u5408\u306e 95% \u4fe1\u983c\u533a\u9593\u306f<strong>[.463, .657]<\/strong>\u3067\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 4: \u6bd4\u7387\u306e\u5dee\u306e\u4fe1\u983c\u533a\u9593<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u3001 <a href=\"https:\/\/statorials.org\/ja\/\u6bd4\u7387\u306e\u4fe1\u983c\u533a\u9593\u306e\u5dee\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u6bd4\u7387\u306e\u5dee\u306e\u4fe1\u983c\u533a\u9593<\/a>\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4fe1\u983c\u533a\u9593 = (p <sub>1<\/sub> \u2013p <sub>2<\/sub> ) +\/- z*\u221a(p <sub>1<\/sub> (1-p <sub>1<\/sub> )\/n <sub>1<\/sub> + p <sub>2<\/sub> (1-p <sub>2<\/sub> )\/n <sub>2<\/sub> )<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">p <sub>1<\/sub> \u3001p <sub>2<\/sub> : \u30b5\u30f3\u30d7\u30eb 1 \u306e\u5272\u5408\u3001\u30b5\u30f3\u30d7\u30eb 2 \u306e\u5272\u5408<\/span><\/li>\n<li><span style=\"color: #000000;\">z: \u4fe1\u983c\u6c34\u6e96\u306b\u57fa\u3065\u304f z \u81e8\u754c\u5024<\/span><\/li>\n<li><span style=\"color: #000000;\">n <sub>1<\/sub> \u3001n <sub>2<\/sub> : \u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba 1\u3001\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba 2<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u4f8b:<\/strong> A \u90e1\u306e\u7279\u5b9a\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u4f4f\u6c11\u306e\u5272\u5408\u3068 B \u90e1\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u4f4f\u6c11\u306e\u5272\u5408\u306e\u5dee\u3092\u63a8\u5b9a\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u5404\u30b5\u30f3\u30d7\u30eb\u306e\u6982\u8981\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b5\u30f3\u30d7\u30eb 1:<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">n <sub>1<\/sub> = 100<\/span><\/li>\n<li> <span style=\"color: #000000;\">p <sub>1<\/sub> = 0.62 (\u3064\u307e\u308a\u3001\u4f4f\u6c11 100 \u4eba\u4e2d 62 \u4eba\u304c\u6cd5\u5f8b\u3092\u652f\u6301)<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u30b5\u30f3\u30d7\u30eb 2:<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><sub>n2<\/sub> = 100<\/span><\/li>\n<li> <span style=\"color: #000000;\">p <sub>2<\/sub> = 0.46 (\u3064\u307e\u308a\u3001\u4f4f\u6c11 100 \u4eba\u4e2d 46 \u4eba\u304c\u6cd5\u5f8b\u3092\u652f\u6301)<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u90e1\u9593\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u4f4f\u6c11\u306e\u5272\u5408\u306e\u771f\u306e\u5dee\u7570\u306e 95% \u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#input sample sizes and sample proportions\n<\/span>n1 &lt;- 100\np1 &lt;- .62\n\nn2 &lt;- 100\np2 &lt;- .46<span style=\"color: #008080;\">\n\n#calculate margin of error\n<\/span>margin &lt;- qnorm(0.975)*sqrt(p1*(1-p1)\/n1 + p2*(1-p2)\/n2)\n\n<span style=\"color: #008080;\">#calculate lower and upper bounds of confidence interval\n<\/span>low &lt;- (p1-p2) - margin\nlow\n\n[1] 0.02364509\n\n\nhigh &lt;- (p1-p2) + margin\nhigh\n\n[1] 0.2963549\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u90e1\u9593\u306e\u6cd5\u5f8b\u3092\u652f\u6301\u3059\u308b\u4f4f\u6c11\u306e\u5272\u5408\u306e\u771f\u306e\u5dee\u7570\u306e 95% \u4fe1\u983c\u533a\u9593\u306f<strong>[0.024, 0.296]<\/strong>\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><em>\u305d\u306e\u4ed6\u306e R \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f<a href=\"https:\/\/statorials.org\/ja\/-10\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3053\u3067<\/a>\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/em><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4fe1\u983c\u533a\u9593\u306f\u3001\u4e00\u5b9a\u306e\u4fe1\u983c\u30ec\u30d9\u30eb\u3067\u6bcd\u96c6\u56e3\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u5024\u306e\u7bc4\u56f2\u3067\u3059\u3002 \u6b21\u306e\u4e00\u822c\u5f0f\u306b\u5f93\u3063\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002 \u4fe1\u983c\u533a\u9593= (\u70b9\u63a8\u5b9a\u5024) +\/- (\u81e8\u754c\u5024)* (\u6a19\u6e96\u8aa4\u5dee) \u3053\u306e\u5f0f\u306f\u3001\u4e0b\u9650\u3068\u4e0a\u9650\u3092\u6301\u3064\u533a\u9593\u3092\u4f5c\u6210\u3057\u307e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1227","post","type-post","status-publish","format-standard","hentry","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/ja\/r-\u306e\u4fe1\u983c\u533a\u9593\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/ja\/r-\u306e\u4fe1\u983c\u533a\u9593\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T05:20:12+00:00\" \/>\n<meta name=\"author\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/\",\"url\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/\",\"name\":\"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/ja\/#website\"},\"datePublished\":\"2023-07-27T05:20:12+00:00\",\"dateModified\":\"2023-07-27T05:20:12+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\"},\"description\":\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/ja\/#website\",\"url\":\"https:\/\/statorials.org\/ja\/\",\"name\":\"Statorials\",\"description\":\"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/ja\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\",\"name\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\"},\"description\":\"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b\",\"sameAs\":[\"http:\/\/statorials.org\/ja\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/ja\/r-\u306e\u4fe1\u983c\u533a\u9593\/","og_locale":"ja_JP","og_type":"article","og_title":"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/statorials.org\/ja\/r-\u306e\u4fe1\u983c\u533a\u9593\/","og_site_name":"Statorials","article_published_time":"2023-07-27T05:20:12+00:00","author":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/","url":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/","name":"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)","isPartOf":{"@id":"https:\/\/statorials.org\/ja\/#website"},"datePublished":"2023-07-27T05:20:12+00:00","dateModified":"2023-07-27T05:20:12+00:00","author":{"@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83"},"description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e4%bf%a1%e9%a0%bc%e5%8c%ba%e9%96%93\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/ja\/"},{"@type":"ListItem","position":2,"name":"R \u3067\u4fe1\u983c\u533a\u9593\u3092\u6c42\u3081\u308b\u65b9\u6cd5 (\u4f8b\u4ed8\u304d)"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/ja\/#website","url":"https:\/\/statorials.org\/ja\/","name":"Statorials","description":"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/ja\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83","name":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb"},"description":"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b","sameAs":["http:\/\/statorials.org\/ja"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/comments?post=1227"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1227\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/media?parent=1227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/categories?post=1227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/tags?post=1227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}