<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Yasaichi</author_name>
  <author_url>https://blog.hatena.ne.jp/Yasaichi/</author_url>
  <blog_title>WEB SALAD</blog_title>
  <blog_url>https://web-salad.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>統計学</anon>
  </categories>
  <description>はじめに タイトル通り。もう何回か自作してる気がするので、そろそろメモしておく。 実装 Arrayクラスを書き換えます。 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 使い方 基本統計量は次のように計算できます。 a = (1..10).to_a # =&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fweb-salad.hateblo.jp%2Fentry%2F2015%2F02%2F05%2F110557&quot; title=&quot;Rubyで総和・平均・分散・標準偏差を算出する - WEB SALAD&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-02-05 11:05:57</published>
  <title>Rubyで総和・平均・分散・標準偏差を算出する</title>
  <type>rich</type>
  <url>https://web-salad.hateblo.jp/entry/2015/02/05/110557</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
