This package has been deprecated

Author message:

THIS PROJECT IS NO LONGER MAINTAINED by clebert

math-statistics

1.2.0 • Public • Published

math-statistics

This module provides functions for statistical data analysis.

license npm downloads

build coverage code climate dependencies devDependencies

Getting Started

Installation

npm install math-statistics --save

Integration

var statistics = require('math-statistics');

API

statistics.mean(data)

Returns the mean (average) of the numerical data.

statistics.mean([]) === NaN
statistics.mean([-1]) === -1
statistics.mean([-1, 2, 3, 4, 4]) === 2.4
statistics.mean([-1, 2.5, 3.25, 5.75]) === 2.625

statistics.median(data)

Returns the median (middle value) of the numerical data.

statistics.median([]) === NaN
statistics.median([-1]) === -1
statistics.median([-1, 3, 5]) === 3
statistics.median([-1, 3, 5, 7]) === 4
statistics.median([-1, 7, 3, 5, 4]) === 4

Running Tests

To run the test suite first install the development dependencies:

npm install

then run the tests:

npm test

Package Sidebar

Install

npm i math-statistics

Weekly Downloads

13

Version

1.2.0

License

none

Last publish

Collaborators

  • clebert