function covariance( arr, mx, my, bool ) {
	var N;
	var C;
	var i;

	N = arr.length;
	C = 0.0;
	for ( i = 0; i < N; i++ ) {
		C += ( arr[i][0]-mx ) * ( arr[i][1]-my );
	}
	if ( bool ) {
		return C / N;
	}
	if ( N === 1 ) {
		return 0.0;
	}
	return C / (N-1);
}
Computes the covariance using textbook formula.

@private
@param {ArrayArray} arr - input array
@param {number} mx - `x` mean
@param {number} my - `y` mean
@param {boolean} bool - boolean indicating whether to compute the population covariance
@returns {number} covariance