function vartest( x, y, options ) {
	var estimate;
	var alpha;
	var ratio;
	var beta;
	var cint;
	var opts;
	var pval;
	var stat;
	var xvar;
	var yvar;
	var alt;
	var err;
	var out;
	var dfX;
	var dfY;

	if ( !isTypedArrayLike( x ) && !isNumberArray( x ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a numeric array. Value: `%s`.', x ) );
	}
	if ( !isTypedArrayLike( y ) && !isNumberArray( y ) ) {
		throw new TypeError( format( 'invalid argument. Second argument must be a numeric array. Value: `%s`.', y ) );
	}
	opts = {};
	if ( options ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	ratio = opts.ratio || 1.0;
	if ( opts.alpha === void 0 ) {
		alpha = 0.05;
	} else {
		alpha = opts.alpha;
	}
	if ( alpha < 0.0 || alpha > 1.0 ) {
		throw new RangeError( format( 'invalid option. `%s` option must be a number on the interval: [0, 1]. Option: `%f`.', 'alpha', alpha ) );
	}
	dfX = x.length - 1;
	dfY = y.length - 1;

	xvar = variance( x.length, 1, x, 1 );
	yvar = variance( y.length, 1, y, 1 );

	estimate = xvar / yvar;
	stat = estimate / ratio;
	pval = fCDF( stat, dfX, dfY );

	alt = opts.alternative || 'two-sided';
	switch ( alt ) {
	case 'two-sided':
		pval = 2.0 * min( pval, 1.0 - pval );
		beta = alpha / 2.0;
		cint = [
			estimate / fQuantile( 1.0 - beta, dfX, dfY ),
			estimate / fQuantile( beta, dfX, dfY )
		];
		break;
	case 'greater':
		pval = 1.0 - pval;
		cint = [
			estimate / fQuantile( 1.0 - alpha, dfX, dfY ),
			PINF
		];
		break;
	case 'less':
		cint = [
			0.0,
			estimate / fQuantile( alpha, dfX, dfY )
		];
		break;
	default:
		throw new Error( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'alternative', [ 'two-sided', 'less', 'greater' ].join( '", "' ), alt ) );
	}
	out = {};
	setReadOnly( out, 'rejected', pval <= alpha );
	setReadOnly( out, 'alpha', alpha );
	setReadOnly( out, 'pValue', pval );
	setReadOnly( out, 'statistic', stat );
	setReadOnly( out, 'ci', cint );
	setReadOnly( out, 'alternative', alt );
	setReadOnly( out, 'xvar', xvar );
	setReadOnly( out, 'yvar', yvar );
	setReadOnly( out, 'dfX', dfX );
	setReadOnly( out, 'dfY', dfY );
	setReadOnly( out, 'method', 'F test for comparing two variances' );
	setReadOnly( out, 'nullValue', ratio );
	setReadOnly( out, 'print', print );
	return out;
}
Computes a two-sample F-test for equal variances.

@param {NumericArray} x - first data array
@param {NumericArray} y - second data array
@param {Options} [options] - function options
@param {number} [options.alpha=0.05] - significance level
@param {string} [options.alternative='two-sided'] - alternative hypothesis (`two-sided`, `less` or `greater`)
@param {PositiveNumber} [options.ratio=1] - ratio of population variances under H0
@throws {TypeError} x argument has to be a typed array or array of numbers
@throws {TypeError} y argument has to be a typed array or array of numbers
@throws {TypeError} options must be an object
@throws {TypeError} alpha option has to be a number
@throws {RangeError} alpha option has to be a number in the interval `[0,1]`
@throws {TypeError} alternative option has to be a string
@throws {Error} alternative option must be `two-sided`, `less` or `greater`
@throws {TypeError} ratio option has to be a number
@returns {Object} test result object

@example
var x = [ 610, 610, 550, 590, 565, 570 ];
var y = [ 560, 550, 580, 550, 560, 590, 550, 590 ];

var out = vartest( x, y );