Skip to content

sampleVariance(values, options?): number

Defined in: packages/distribution/src/sample-statistics.ts:122

Variance by Welford’s one-pass algorithm. The divisor is length - degreesOfFreedomCorrection, so the default 1 is the unbiased sample variance and 0 is the population variance.

NumericSample

SampleMomentOptions

number

INVALID_PARAMETER when the correction is not a nonnegative integer; INVALID_SAMPLE when values holds a non-finite value or no more than degreesOfFreedomCorrection values.