Method: Math#stddev_sample

Defined in:
lib/openc3/core_ext/math.rb

#stddev_sample(array) ⇒ Float

Calculates the standard deviation of the sample variation by taking the square root of the sample variance.

Parameters:

Returns:

  • (Float, Float)

    The first value is the mean and the second is the standard deviation



99
100
101
102
# File 'lib/openc3/core_ext/math.rb', line 99

def stddev_sample(array)
  mean, variance = self.variance_sample(array)
  return [mean, Math.sqrt(variance)]
end