The primary iterable whose elements align by index with other.
Secondary iterable supplying the paired values.
Optionalselector: Selector<TElement, number>Optional projection that extracts the numeric value for each element in source. Defaults to treating the element itself as numeric.
OptionalotherSelector: Selector<TSecond, number>Optional projection that extracts the numeric value for each element in other. Defaults to treating the element itself as numeric.
Optionalsample: booleanWhen true, computes the sample covariance dividing by n - 1; when false, computes the population covariance dividing by n. Defaults to true.
The calculated covariance.
Re-throws any error thrown while iterating either iterable or executing the selector projections.
Calculates the covariance between source and other.