def variance(values)
      raise "Values must be an array" unless values.is_a?(Array)

      mean(values.map{|i| i**2}) - mean(values)**2
    end
def variance(values)
      raise "Values must be an array" unless values.is_a?(Array)

      mean(values.map{|i| i**2}) - mean(values)**2
    end
Variance
 http://en.wikipedia.org/wiki/Variance