just-variance
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-variance

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-variance
yarn add just-variance

Return the standard deviation of an array or numeric argument list

import variance from 'just-variance';

variance([1, 2, 3, 2, 4, 1]); // 1.3666666667
variance(3, 2, 1); // 1
variance([100, 100, 100.1, 100]); // 0.0025
variance(1, 2, 3, 4, 5, -6); // 15.5
variance([4]); // throws
variance(['3', 2]); // throws
variance(NaN, NaN); // throws
variance(); // throws

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i just-variance

      Weekly Downloads

      6

      Version

      2.2.0

      License

      MIT

      Unpacked Size

      4.81 kB

      Total Files

      9

      Last publish

      Collaborators

      • angus-c