Method: Utilities::Statistics#quartiles

Defined in:
lib/utilities/utilities.rb

#quartiles(already_sorted = false) ⇒ Object

Return an array containing the first, the second and the last quartile of self



105
106
107
108
# File 'lib/utilities/utilities.rb', line 105

def quartiles( already_sorted = false )
  a = sort_and_extend( already_sorted )
  [a.first_quartile( true ), a.median( true ), a.last_quartile( true )]
end