View on GitHub

/** * * Covariance is computed incrementally with arrival of each pair of `x` and `y` * values from a stream of data. * * The [`compute()`](http://winkjs.org/wink-statistics/Stream.html#compute) requires * two numeric arguments `x` and `y`. * * The [`result()`](http://winkjs.org/wink-statistics/Stream.html#result) returns * an object containing sample covariance `cov`, along with * `meanX`, `meanY` and `size` of data i.e. number of x & y pairs. It also contains * population covariance `covp`. * * @memberof streaming# * @return {Stream} Object containing methods such as `compute()`, `result()` & `reset()`. * @example * var covariance = cov(); * covariance.compute( 10, 80 ); * covariance.compute( 15, 75 ); * covariance.compute( 16, 65 ); * covariance.compute( 18, 50 ); * covariance.compute( 21, 45 ); * covariance.compute( 30, 30 ); * covariance.compute( 36, 18 ); * covariance.compute( 40, 9 ); * covariance.result(); * // returns { size: 8, * // meanX: 23.25, * // meanY: 46.5, * // cov: -275.8571, * // covp: -241.375 * // } */

Please help! Open an issue on GitHub if this assessment is incorrect.