Skip to content
A native extension for Ruby to handle standard deviation for Arrays
C++ Ruby
Find file
Latest commit adb9a5e @corybuecker revised default stdev calculation to perform sample standard deviatio…
…n. Also added in a separate function to calculation population standard deviation


Ruby Standard Deviation

This is a native extension to Ruby that adds a standard deviation calculation to the Array class.


require 'ruby-standard-deviation'
r = [1,3,21,32,42]

# calculate sample standard deviation, you can also use stdevs
p r.stdev 

# calculate population standard deviation
p r.stdevp
Something went wrong with that request. Please try again.