Skip to content

variance

variance(x): number

Defined in: src/variance.js:17

The variance is the sum of squared deviations from the mean.

This is an implementation of variance, not sample variance: see the sampleVariance method if you want a sample measure.

number[]

a population of one or more data points

number

variance: a value greater than or equal to zero. zero indicates that all values are identical.

if x’s length is 0

variance([1, 2, 3, 4, 5, 6]); // => 2.9166666666666665