This library has a few modules that help you easily calculate things like variance, standard deviation, mean, median and mode.
- NPM/PNPM:
npm install @santi100a/statlib
orpnpm install @santi100a/statlib
- Yarn:
yarn add @santi100a/statlib
const statlib = require('@santi100a/statlib');
statlib.average([1, 2, 3, 4, 5]); // => 3
statlib.median([1, 2, 3, 4, 5]); // => [3]