Skip to content

coefficientOfVariation

coefficientOfVariation(x): number

Defined in: src/coefficient_of_variation.js:16

Thecoefficient of variation_ is the ratio of the standard deviation to the mean. .._coefficient of variation: https://en.wikipedia.org/wiki/Coefficient_of_variation

any[]

input

number

coefficient of variation

coefficientOfVariation([1, 2, 3, 4]).toFixed(3); // => 0.516
coefficientOfVariation([1, 2, 3, 4, 5]).toFixed(3); // => 0.527
coefficientOfVariation([-1, 0, 1, 2, 3, 4]).toFixed(3); // => 1.247