{"id":2114,"date":"2019-09-07T21:29:07","date_gmt":"2019-09-07T12:29:07","guid":{"rendered":"http:\/\/www.python.ambitious-engineer.com\/?p=2114"},"modified":"2020-10-04T22:31:25","modified_gmt":"2020-10-04T13:31:25","slug":"%e5%88%86%e6%95%a3%e3%81%a8%e6%a8%99%e6%ba%96%e5%81%8f%e5%b7%ae-%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e3%81%b0%e3%82%89%e3%81%a4%e3%81%8d%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/2114","title":{"rendered":"\u5206\u6563\u3068\u6a19\u6e96\u504f\u5dee \u30c7\u30fc\u30bf\u306e\u3070\u3089\u3064\u304d\u3092\u8abf\u3079\u308b"},"content":{"rendered":"<p><script async src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.0\/MathJax.js?config=TeX-AMS_CHTML\"><\/script><\/p>\n<p>\u524d\u56de\u3001\u300c\u30c7\u30fc\u30bf\u306e\u4e2d\u5fc3\u300d\u3092\u8868\u3059\u7d71\u8a08\u91cf\u3001\u5e73\u5747\u3001\u4e2d\u592e\u5024\u3001\u6700\u983b\u5024\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u30c7\u30fc\u30bf\u306e\u6563\u3089\u3070\u308a\u3050\u3089\u3044\u3001\u300c\u5206\u6563\u300d\u3068\u300c\u6a19\u6e96\u504f\u5dee\u300d\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h2>\u5206\u6563<\/h2>\n<h3>\u5e73\u5747\u304c\u540c\u3058\u3067\u3082\u30fb\u30fb\u30fb<\/h3>\n<p>\u524d\u56de\u306e\u6700\u5f8c\u306b\u30c7\u30fc\u30bf\u306e\u4e2d\u5fc3\u304c\u540c\u3058\u3067\u3082\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u304c\u7570\u306a\u308b\u3053\u3068\u306f\u591a\u3005\u3042\u308b\u3068\u3044\u3046\u8a71\u3092\u3057\u307e\u3057\u305f\u3002\u3082\u3046\u4e00\u5ea6\u30b0\u30e9\u30d5\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<a href=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist.png\"><img loading=\"lazy\" src=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist.png\" alt=\"\" width=\"1003\" height=\"777\" class=\"alignnone size-full wp-image-3781\" srcset=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist.png 1003w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist-300x232.png 300w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist-768x595.png 768w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/2type-hist-718x556.png 718w\" sizes=\"(max-width: 1003px) 100vw, 1003px\" \/><\/a>\n<p>\u8d64\u3068\u9752\u306e\u30b0\u30e9\u30d5\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u306e\u6563\u3089\u3070\u308a\u5177\u5408\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u8d64\u306e\u65b9\u304c\u3001\u30c7\u30fc\u30bf\u306e\u4e2d\u5fc3\u305f\u308b\u5e73\u5747\u304b\u3089\u9060\u304f\u306b\u307e\u3067\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u30c7\u30fc\u30bf\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3070\u3089\u3064\u304d\u3092\u6570\u5b66\u7684\u306b\u6271\u3046\u65b9\u6cd5\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u5404\u5024\u306e\u5e73\u5747\u304b\u3089\u306e\u8ddd\u96e2\u306e\u7d76\u5bfe\u5024\u306e\u5408\u8a08\u3067\u3082\u826f\u3055\u305d\u3046\u306a\u306e\u3067\u3001N\u500b\u306e\u30c7\u30fc\u30bf\u306e\u3070\u3089\u3064\u304d\u3092\u8868\u3059\u305f\u3081\u306b\u3001\u307e\u305a\u8003\u3048\u3089\u308c\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u5f0f\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\\(\\overline{x}\\)\u306f\u5e73\u5747\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\\[<br \/>\n\\frac{|x_1 - \\overline{x}| + |x_2 - \\overline{x}| + \\cdots + |x_N - \\overline{x}|}{N}<br \/>\n\\]\n<p>\u4e00\u8a00\u3067\u66f8\u304f\u3068\u300c\u5e73\u5747\u304b\u3089\u306e\u7d76\u5bfe\u5024\u8ddd\u96e2\u306e\u5e73\u5747\u300d\u3068\u306a\u308a\u307e\u3059\u3002\uff08\u7d76\u5bfe\u5024\u3092\u7701\u304f\u3068\u5e73\u5747\u304b\u3089\u306e\u8ddd\u96e2\u306e\u5e73\u5747\u3068\u306a\u308a\u3001\u5e38\u306b0\u306b\u306a\u308b\u305f\u3081\u4f7f\u3044\u7269\u306b\u306a\u308a\u307e\u305b\u3093\u3002\uff09\u4ee5\u4e0b\u306b\u6570\u5f0f\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u8f09\u305b\u307e\u3059\u3002<\/p>\n<a href=\"http:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric.png\"><img loading=\"lazy\" src=\"http:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric-1024x687.png\" alt=\"\" width=\"640\" height=\"429\" class=\"alignnone size-large wp-image-2301\" srcset=\"https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric-1024x687.png 1024w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric-300x201.png 300w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric-768x516.png 768w, https:\/\/www.python.ambitious-engineer.com\/wp-content\/uploads\/2019\/09\/avg_metric.png 1290w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a>\n<p>\u4e0a\u306e\uff12\u3064\u306e\u56f3\u306e\u306f\u70b9x1\u301cx6\u304c\u6570\u76f4\u7dda\u4e0a\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u8d64\u3044\u76ee\u5370\u304c\u305d\u308c\u305e\u308c\u306e\u5e73\u5747\u3068\u3057\u307e\u3059\u3002\u77e2\u5370\u306e\u9577\u3055\u306e\u5e73\u5747\u304c\u5148\u7a0b\u306e\u5f0f\u306e\u610f\u5473\u3059\u308b\u3068\u3053\u308d\u3068\u306a\u308a\u307e\u3059\u3002\u4e0a\u6bb5\u3068\u4e0b\u6bb5\u3068\u3067\u306f\u898b\u305f\u611f\u3058\u4e0b\u6bb5\u306e\u307b\u3046\u304c\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u3067\u3059\u304c\u3001\u5b9f\u969b\u77e2\u5370\u306e\u9577\u3055\u306e\u5408\u8a08\u306f\u4e0b\u6bb5\u306e\u307b\u3046\u304c\u5927\u304d\u3044\u305f\u3081\u3001\u3070\u3089\u3064\u304d\u306e\u5927\u304d\u3055\u304c\u8a55\u4fa1\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u611f\u899a\u7684\u306b\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5f0f\u306f\u5e73\u5747\u504f\u5dee\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u76f4\u611f\u7684\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u30b3\u30f3\u30bb\u30d7\u30c8\u3068\u3057\u3066\u91cd\u8981\u306a\u306e\u3067\u3059\u304c\u3001\u5f0f\u306e\u4e2d\u306b\u7d76\u5bfe\u5024\u304c\u5165\u3063\u3066\u3044\u308b\u305f\u3081\u5fae\u5206\u304c\u3067\u304d\u306a\u3044\u3068\u3044\u3063\u305f\u300c\u6570\u5b66\u7684\u306b\u6271\u3044\u306b\u304f\u3044\u300d\u305f\u3081\u3001\u3042\u307e\u308a\u4f7f\u308f\u308c\u307e\u305b\u3093\u3002\u306a\u304a\u3001\u504f\u5dee\u3068\u306f\u5e73\u5747\u304b\u3089\u306e\u8ddd\u96e2\u306e\u3053\u3068\u6307\u3057\u307e\u3059\u3002<\/p>\n<h3>\u5206\u6563<\/h3>\n<p>\u305d\u3053\u3067\u5e73\u5747\u504f\u5dee\u3092\u6570\u5b66\u7684\u306b\u6271\u3044\u3084\u3059\u3044\u5f62\u306b\u3057\u305f\u306e\u304c\u5206\u6563\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u5f0f\u3067\u8868\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\\[<br \/>\n\\sigma^2 = \\frac{(x_1 - \\overline{x})^2 + (x_2 - \\overline{x})^2 + \\cdots + (x_N - \\overline{x})^2}{N}<br \/>\n\\]\n\\[<br \/>\n= \\frac{1}{N} \\sum_{k=1}^{N} (x_k - \\overline{x})^2<br \/>\n\\]\n<p>\u7d76\u5bfe\u5024\u306e\u4ee3\u308f\u308a\u306b2\u4e57\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u306d\u3002\u8a08\u7b97\u5f0f\u3060\u3051\u898b\u308b\u3068\u96e3\u3057\u305d\u3046\u3067\u3059\u304c\u3001\u6210\u308a\u7acb\u3061\u304c\u308f\u304b\u3063\u3066\u3044\u308b\u3068\u6697\u8a18\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u304a\u3001\u5206\u6563\u306e\u8a18\u53f7\u306f\\(\\sigma^2\\)\uff08\u3057\u3050\u307e\u3058\u3058\u3087\u3046\uff09\u3068\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u914d\u5217\u306e\u5206\u6563\u3092Python\u3067\u6c42\u3081\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306bnumpy\u306evar\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport numpy as np\r\ndata = [2, 5, 3, 10, 7, 2, 10]\r\nnp.var(data) # 10.530....\r\n<\/pre>\n<p>\u3067\u306f\u7df4\u7fd2\u3067\u3059\u30022\u3064\u306e\u30af\u30e9\u30b9A\u3001B\u304c\u3042\u308a\u3001\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u306e\u751f\u5f92\u306e\u8eab\u9577\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u3063\u305f\u3068\u3057\u307e\u3059\u3002A\u3001B\u3068\u3082\u306b\u5e73\u5747\u306f170cm\u306a\u306e\u3067\u3059\u304c\u3001\u3069\u3061\u3089\u306e\u30af\u30e9\u30b9\u306e\u751f\u5f92\u306e\u307b\u3046\u304c\u8eab\u9577\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u304b\uff1f\u8eab\u9577\u306e\u5358\u4f4d\u306fcm\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nA=[165,168,171,177,171,162,163,166,168,187,172,177]\r\nB=[188,161,174,155,184,187,160,158,178,175,160,165]\r\n<\/pre>\n<p>\u3055\u3063\u305d\u304f\u5206\u6563\u3092\u8a08\u7b97\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom matplotlib import pyplot as plt\r\n\r\n# \u30af\u30e9\u30b9A\u3001B\u306e\u751f\u5f92\u306e\u8eab\u9577\r\nA=[165,168,171,177,171,162,163,166,168,187,172,177]\r\nB=[188,161,174,155,184,187,160,158,178,175,160,165]\r\n\r\n# \u5206\u6563\u3092\u7b97\u51fa\r\nnp.var(A) # 45.9...\r\nnp.var(B) # 132.2...\r\n\r\n<\/pre>\n<p>\u5206\u6563\u3092\u6bd4\u8f03\u3059\u308b\u3068\u30af\u30e9\u30b9B\u306e\u751f\u5f92\u306e\u307b\u3046\u304c\u8eab\u9577\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u3001\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<h2>\u6a19\u6e96\u504f\u5dee<\/h2>\n<h3>\u5206\u6563\u306e\u5358\u4f4d<\/h3>\n<p>\u5206\u6563\u3067\u30c7\u30fc\u30bf\u306e\u3070\u3089\u3064\u304d\u304c\u8a55\u4fa1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u5358\u4f4d\u306e\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002\uff12\u4e57\u306e\u548c\u306a\u306e\u3067\u5358\u4f4d\u30822\u4e57\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u5148\u7a0b\u306e\u30c7\u30fc\u30bf\u3001\u5206\u6563\u306e\u5358\u4f4d\u306fcm^2\u306a\u306e\u3067\u3059\u304c\u610f\u5473\u3092\u6349\u3048\u3065\u3089\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u6a19\u6e96\u504f\u5dee<\/h3>\n<p>\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u306b\u306f\u5206\u6563\u306b\u5bfe\u3057\u3066\u5358\u7d14\u306b\u221a\u3092\u88ab\u305b\u308c\u3070\u3088\u304f\u3001\u4ee5\u4e0b\u306e\u5f0f\u3092\u6a19\u6e96\u504f\u5dee\u3068\u547c\u3073\u307e\u3059\u3002<br \/>\n\\[<br \/>\n\\sigma = \\sqrt{\\sigma^2} = \\sqrt{\\frac{\\sum_{k=1}^{N} (x_k - \\overline{x})^2}{N}}<br \/>\n\\]\n\u6a19\u6e96\u504f\u5dee\u306f\\(\\sigma\\)\u3067\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30c7\u30fc\u30bf\u914d\u5217\u306e\u6a19\u6e96\u504f\u5dee\u3092Python\u3067\u6c42\u3081\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306bstd\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport numpy as np\r\ndata = [2, 5, 3, 10, 7, 2, 10]\r\nnp.std(data) # 3.245...\r\n<\/pre>\n<p>\u3067\u306f\u7df4\u7fd2\u3068\u3057\u3066\u3055\u304d\u307b\u3069\u306e\u751f\u5f92\u306e\u8eab\u9577\u306e\u6a19\u6e96\u504f\u5dee\u3092Python\u3067\u8a08\u7b97\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom matplotlib import pyplot as plt\r\n\r\n# \u30af\u30e9\u30b9A\u3001B\u306e\u751f\u5f92\u306e\u8eab\u9577\r\nA=[165,168,171,177,171,162,163,166,168,187,172,177]\r\nB=[188,161,174,155,184,187,160,158,178,175,160,165]\r\n\r\n# \u6a19\u6e96\u504f\u5dee\u3092\u7b97\u51fa\r\nnp.std(A) # 6.77...\r\nnp.std(B) # 11.49...\r\n\r\n<\/pre>\n<p>\u3053\u308c\u3067\u5148\u7a0b\u306e\u30c7\u30fc\u30bf\u306e\u6a19\u6e96\u504f\u5dee\u306f6.77cm\u306811.49cm\u3068\u5358\u4f4d\u4ed8\u304d\u3067\u3070\u3089\u3064\u304d\u304c\u3042\u308f\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\n\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3070\u3089\u3064\u304d\u3092\u8868\u3059\u65b9\u6cd5\u3068\u3057\u3066\u5206\u6563\u3068\u6a19\u6e96\u504f\u5dee\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u5e73\u5747\u304c\u540c\u3058\u5834\u5408\u306e\u306e\u3070\u3089\u3064\u304d\u5177\u5408\u306b\u3064\u3044\u3066\u8a55\u4fa1\u3057\u307e\u3057\u305f\u3002\u6b21\u56de\u306f\u5909\u52d5\u4fc2\u6570\u3092\u3064\u304b\u3063\u3066\u7570\u306a\u308b\u5358\u4f4d\u3084\u5e73\u5747\u304c\u5927\u304d\u304f\u7570\u306a\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u306e\u3070\u3089\u3064\u304d\u306e\u8a55\u4fa1\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001\u300c\u30c7\u30fc\u30bf\u306e\u4e2d\u5fc3\u300d\u3092\u8868\u3059\u7d71\u8a08\u91cf\u3001\u5e73\u5747\u3001\u4e2d\u592e\u5024\u3001\u6700\u983b\u5024\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u30c7\u30fc\u30bf\u306e\u6563\u3089\u3070\u308a\u3050\u3089\u3044\u3001\u300c\u5206\u6563\u300d\u3068\u300c\u6a19\u6e96\u504f\u5dee\u300d\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002 \u5206\u6563 \u5e73\u5747\u304c\u540c\u3058\u3067\u3082\u30fb\u30fb\u30fb \u524d\u56de\u306e\u6700\u5f8c\u306b\u30c7\u30fc\u30bf\u306e\u4e2d\u5fc3\u304c\u540c\u3058\u3067\u3082\u30c7\u30fc\u30bf...<\/p>\n","protected":false},"author":1,"featured_media":2998,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[188,153],"tags":[191,170,189],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/2114"}],"collection":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/comments?post=2114"}],"version-history":[{"count":25,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/2114\/revisions"}],"predecessor-version":[{"id":2307,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/2114\/revisions\/2307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media\/2998"}],"wp:attachment":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media?parent=2114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=2114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=2114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}