function testStatistic( N, x, strideX, y, strideY ) {
	var stat;
	var v1;
	var v2;
	var d;
	var i;

	stat = 0.0;
	for ( i = 0; i < N; i++ ) {
		v1 = x[ i*strideX ];
		v2 = y[ i*strideY ];
		if ( v2 === 0.0 ) {
			if ( v1 === 0.0 ) {
				continue;
			}
			return PINF;
		}
		d = v1 - v2;
		stat += ( d * d ) / v2;
	}
	return stat;
}
Computes a chi-square test statistic.

@private
@param {NonNegativeInteger} N - number of indexed elements
@param {Float64Array} x - observation frequencies
@param {integer} strideX - `x` stride length
@param {Float64Array} y - expected frequencies
@param {integer} strideY - `y` stride length
@returns {number} test statistic