1.2.0 • Published 10 years ago

math-statistics v1.2.0

Weekly downloads
8
License
-
Repository
github
Last release
10 years ago

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
1.2.0

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.1.0

11 years ago