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
Parameters
Section titled “Parameters”any[]
input
Returns
Section titled “Returns”number
coefficient of variation
Example
Section titled “Example”coefficientOfVariation([1, 2, 3, 4]).toFixed(3); // => 0.516coefficientOfVariation([1, 2, 3, 4, 5]).toFixed(3); // => 0.527coefficientOfVariation([-1, 0, 1, 2, 3, 4]).toFixed(3); // => 1.247