/* eslint-disable no-invalid-this */

/* harmony default export */

/* harmony import */

/*#__PURE__*/

/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Compute a one-sample z-Test.
*
* @module @stdlib/stats/ztest
*
* @example
* var ztest = require( '@stdlib/stats/ztest' );
* var normal = require( '@stdlib/random/base/normal' ).factory;
*
* var rnorm;
* var out;
* var i;
* var x;
* var y;
*
* rnorm = normal( 1.0, 2.0, {
*     'seed': 786
* });
*
* // One-sample z-test:
* x = new Array( 300 );
* for ( i = 0; i < x.length; i++ ) {
*     x[ i ] = rnorm();
* }
* out = ztest( x, 2.0 );
*/

/**
* Computes a one-sample z-test.
*
* @param {NumericArray} x - data array
* @param {PositiveNumber} sigma - known standard deviation
* @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 {number} [options.mu=0] - mean under H0
* @throws {TypeError} x argument has to be a typed array or array of numbers
* @throws {TypeError} sigma argument has to be a positive number
* @throws {TypeError} options has to be simple object
* @throws {TypeError} alpha option has to be a number primitive
* @throws {RangeError} alpha option has to be a number in the interval `[0,1]`
* @throws {TypeError} alternative option has to be a string primitive
* @throws {Error} alternative option must be `two-sided`, `less` or `greater`
* @throws {TypeError} mu option has to be a number primitive
* @throws {TypeError} sigma option has to be a positive number
* @returns {Object} test result object
*
* @example
* var arr = [ 4, 4, 6, 6, 5 ];
* var out = ztest( arr, 1.0, {
*     'mu': 5
* });
*
* @example
* var arr = [ 4, 4, 6, 6, 5 ];
* var out = ztest( arr, 1.0, {
*     'alternative': 'greater'
* });
*/

/**
* Pretty-print output of test.
*
* @param {Object} [opts] - options object
* @param {PositiveInteger} [opts.digits=4] - number of digits after the decimal point
* @param {boolean} [opts.decision=true] - boolean indicating whether to print the test decision
* @throws {TypeError} options argument must be an object
* @throws {TypeError} must provide valid options
* @returns {string} formatted output
*/

/**
* Validates function options.
*
* @private
* @param {Object} opts - destination for validated options
* @param {Options} options - function options
* @param {number} [options.alpha] - significance level
* @param {string} [options.alternative] - alternative hypothesis (`two-sided`, `less` or `greater`)
* @param {number} [options.mu] - mean under H0
* @returns {(null|Error)} null or an error
*/

/***/

// EXPORTS //

// MAIN //

// MODULES //

// PROPERTIES //

// VARIABLES //

// eslint-disable-line stdlib/no-redeclare
