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.
Parameters
Section titled “Parameters”second
Section titled “second”options?
Section titled “options?”Returns
Section titled “Returns”number
Throws
Section titled “Throws”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.