Skip to content

logAverage

logAverage(x): number

Defined in: src/log_average.js:12

The log average is an equivalent way of computing the geometric mean of an array suitable for large or small products.

It’s found by calculating the average logarithm of the elements and exponentiating.

number[]

sample of one or more data points

number

geometric mean

if x is empty

if x contains a negative number