Skip to content

arithmeticMean

Subhajit Sahu edited this page Aug 9, 2022 · 2 revisions

Find the average of numbers.

Similar: arithmethicMean, geometricMean, harmonicMean, quadriaticMean, cubicMean.
Similar: arithmethicMean, median, modes, variance, range.


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

const xnumber = require('extra-number');


xnumber.arithmethicMean(1, 2);
// → 1.5

xnumber.arithmethicMean(1, 2, 3);
// → 2

xnumber.arithmethicMean(1, 2, 3, 4);
// → 2.5


References

Clone this wiki locally