class MoreMath::Sequence
def sum_of_squares
Returns the sum of squares (the sum of the squared deviations) of the
def sum_of_squares @elements.inject(0.0) { |s, t| s + (t - arithmetic_mean) ** 2 } end
def sum_of_squares @elements.inject(0.0) { |s, t| s + (t - arithmetic_mean) ** 2 } end