A collection of common statistics formulas.
npm i stat-functions
yarn add stat-functions
Import stat-functions methods into your project.
import { sum, mean } from 'stat-functions';
Pass in dataset as an array of numbers (along with other arguments if applicable).
sum([ 1, 2, 3 ]); // 6
percentile([ 1, 2, 3 ], .3); // 1