Skip to content

variance

Subhajit Sahu edited this page Aug 8, 2022 · 15 revisions

Find the mean of squared deviation of numbers from its mean.

Similar: mean, median, modes, variance, range.


function variance(...xs)
// xs: a list of numbers

const xmath = require('extra-math');


xmath.variance(1, 2);
// → 0.25

xmath.variance(1, 2, 3);
// → 0.6666666666666666

xmath.variance(1, 2, 3, 4);
// → 1.25


References

Clone this wiki locally