cov(ds: Series): number {
    if (!(ds instanceof Series))
      throw new Error('ds must be a Series');

    if (ds.length !== this.length)
      throw new Error('Series must be of equal length');

    let n = 0;
    let mean1 = 0;
    let mean2 = 0;
    let m12 = 0;

    this.values.forEach((v1, idx) => {
      n += 1;
      const d1 = (v1 - mean1) / n;
      mean1 += d1;
      const d2 = (ds.values.get(idx) - mean2) / n;
      mean2 += d2;

      m12 += ((((n - 1) * d1) * d2) - (m12 / n));
    });

    return (n / (n - 1)) * m12;
  }
Calculate the covariance between this `Series` and another `Series` or iterable

pandas equivalent: [Series.cov](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.cov.html)

@param {Series} ds
   Series with which to calculate covariance

@returns {number}

@example
const ds1 = new Series([1, 2, 3, 4, 5]);
const ds2 = new Series([2, 4, 6, 8, 10]);

// Returns 5
ds1.cov(ds2);

// Also returns 5
ds2.cov(ds1);