This is the new Standard Deviation class I created.  It's very 
simplified and works really well.

class Stddev
  def initialize(arr)
    @arr = arr
    @size = @arr.to_a.size
  end

  def sum
    @arr.inject {|a,b| a + b }
  end

  def sumofx
    @arr.inject {|a,b| a + b**2}
  end

  def newcalc
    Math.sqrt((sumofx-((sum * sum)/@size))/(@size-1).to_f)
  end
end
-- 
Posted via http://www.ruby-forum.com/.