Module: DescriptiveStatistics::Shape

Included in:
AllMethods
Defined in:
lib/descriptive-statistics/shape.rb

Instance Method Summary collapse

Instance Method Details

#kurtosisObject



10
11
12
13
14
# File 'lib/descriptive-statistics/shape.rb', line 10

def kurtosis
  return if length == 0
  return 0 if length == 1
  sum_quarted_deviation / ((length - 1) * quarted_standard_deviation.to_f)
end

#skewnessObject



4
5
6
7
8
# File 'lib/descriptive-statistics/shape.rb', line 4

def skewness
  return if length == 0
  return 0 if length == 1
  sum_cubed_deviation / ((length - 1) * cubed_standard_deviation.to_f)
end