{"width":"100%","type":"rich","provider_url":"https://hatena.blog","categories":["Ruby","\u7d71\u8a08\u5b66"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fweb-salad.hateblo.jp%2Fentry%2F2015%2F02%2F05%2F110557\" title=\"Ruby\u3067\u7dcf\u548c\u30fb\u5e73\u5747\u30fb\u5206\u6563\u30fb\u6a19\u6e96\u504f\u5dee\u3092\u7b97\u51fa\u3059\u308b - WEB SALAD\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Ruby\u3067\u7dcf\u548c\u30fb\u5e73\u5747\u30fb\u5206\u6563\u30fb\u6a19\u6e96\u504f\u5dee\u3092\u7b97\u51fa\u3059\u308b","description":"\u306f\u3058\u3081\u306b \u30bf\u30a4\u30c8\u30eb\u901a\u308a\u3002\u3082\u3046\u4f55\u56de\u304b\u81ea\u4f5c\u3057\u3066\u308b\u6c17\u304c\u3059\u308b\u306e\u3067\u3001\u305d\u308d\u305d\u308d\u30e1\u30e2\u3057\u3066\u304a\u304f\u3002 \u5b9f\u88c5 Array\u30af\u30e9\u30b9\u3092\u66f8\u304d\u63db\u3048\u307e\u3059\u3002 class Array def sum reduce(:+) end def mean sum.to_f / size end def var m = mean reduce(0) { |a,b| a + (b - m) ** 2 } / (size - 1) end def sd Math.sqrt(var) end end \u4f7f\u3044\u65b9 \u57fa\u672c\u7d71\u8a08\u91cf\u306f\u6b21\u306e\u3088\u3046\u306b\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002 a = (1..10).to_a # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 1\u2026","published":"2015-02-05 11:05:57","url":"https://web-salad.hateblo.jp/entry/2015/02/05/110557","image_url":null,"blog_title":"WEB SALAD","version":"1.0","author_name":"Yasaichi","height":"190","provider_name":"Hatena Blog","blog_url":"https://web-salad.hateblo.jp/","author_url":"https://blog.hatena.ne.jp/Yasaichi/"}