lib/stats/timing_stat.rb
# Returns the population variance of the values.
Returns the population variance of the values.
Returns the population variance of the values .
def pop_var
      return nil if length == 0
      average = avg
      1 / length.to_f * inject(0) { |acc, i| acc + (i - average) ** 2 }
    end
def pop_var return nil if length == 0 average = avg 1 / length . to_f * inject ( 0 ) { | acc , i | acc + ( i - average ) ** 2 } end
Returns the population variance of the values.
Returns the population variance of the values .