Project

mathstats

0.0
No commit activity in last 3 years
No release in over 3 years
Mathstats is a basic statistics library. It is meant to be mixed into Array, but you can also use it as a standalone class.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Mathstats

Mathstats is a simple statistics library.

Goals

  1. Support for basic statistics equations
  2. No dependencies
  3. Rails integration
  4. Usable as a mixin: [4,8,15,16,23,42].variance
  5. 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