Skip to content

elstats/covariance

Repository files navigation

Covariance

Calculate covariance

Installation

$ npm i @elstats/covariance

Usage

import covariance from '@elstats/covariance';

const X = [1, 3, 3, 4, 4, 6, 7, 5, 8, 9];
const Y = [9, 6, 7, 5, 5, 4, 3, 2, 2, 2];

covariance(X, Y);
// -4.8

License

MIT