math-stats

0.4.1 • Public • Published

mathematica_logo


Stats Build Status Coverage Status Known Vulnerabilities NPM Downloads Node.js CI

A small library that does statistics for your numbers.

Installation

npm install math-stats

Usage

var stats = require('@pavanvamsi/math-stats');

var numbers = [1, 2, 3];

var moreNumbers = [1, 2, 1, 3];

var mean = stats.mean(numbers); // returns 2

var median = stats.median(numbers); // returns 2

var modes = stats.mode(moreNumbers); // returns [1]
var modeOfStrings = stats.mode(['red', 'blue', 'red']); // returns ['red']

var standardDeviation = stats.standardDeviation(numbers); // returns 0.816496580927726

var variance = stats.variance(numbers); // returns 0.6666666666666666

var harmonicMean = stats.harmonicMean(numbers); // returns 1.6363636363636365

var geometricMean = stats.geometricMean(numbers); // returns 1.8171205928321397

Like it? 🙈

the repo and share.

Link to npm package

License

MIT Copyright (c) pavanvamsi

Install

npm i math-stats

DownloadsWeekly Downloads

70

Version

0.4.1

License

MIT

Unpacked Size

14.9 kB

Total Files

12

Last publish

Collaborators

  • pavanvamsi