stats-variance

1.0.0 • Public • Published

Variance Build Status

Calculate variance of data.

Installation

$ npm install stats-variance

Usage

var variance = require('stats-variance');
 
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
 
variance.calc(data); // → 8.25

API

calc(data)

data

Type: array

The data to be analysed; an array of numbers considered as the entire population. The following formula is used for calculation http://en.wikipedia.org/wiki/Variance#Population_variance.

License

MIT © Michał Jezierski

Package Sidebar

Install

npm i stats-variance

Weekly Downloads

43

Version

1.0.0

License

MIT

Last publish

Collaborators

  • michal.jezierski