Mathstats
Mathstats is a simple statistics library.
Goals
- Support for basic statistics equations
- No dependencies
- Rails integration
- Usable as a mixin: [4,8,15,16,23,42].variance
- Usable as a library: Mathstats.variance([4,8,15,16,23,42])
Installation
$ gem install mathstats
Usage
require 'mathstats'
Mathstats.attach_to(Array) # => Array.send :include, Mathstats::Mixin
[4,8,15,16,23,42].variance
# Or if you don't want to mess with the Array class
Mathstats.variance([4,8,15,16,23,42])
Methods available
- mean, average
- standard_deviation
- sum
- variance