Skip to content

covariance(first, second, options?): number

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

Covariance by Welford’s one-pass co-moment update. The divisor is length - degreesOfFreedomCorrection; the default 1 is the unbiased sample covariance.

NumericSample

NumericSample

SampleMomentOptions

number

INVALID_PARAMETER when the correction is not a nonnegative integer; INVALID_SAMPLE when the lengths differ, a value is non-finite, or the length does not exceed the correction.