diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/README.md b/lib/node_modules/@stdlib/stats/strided/ztest2/README.md
new file mode 100644
index 000000000000..6d2b53b2566e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/README.md
@@ -0,0 +1,238 @@
+
+
+
+
+# ztest2
+
+> Compute a two-sample Z-test.
+
+
+
+A Z-test commonly refers to a two-sample location test which compares the means of two independent sets of measurements `X` and `Y` when the population standard deviations are known. A Z-test supports testing three different null hypotheses `H0`:
+
+- `H0: μX - μY ≥ Δ` versus the alternative hypothesis `H1: μX - μY < Δ`.
+- `H0: μX - μY ≤ Δ` versus the alternative hypothesis `H1: μX - μY > Δ`.
+- `H0: μX - μY = Δ` versus the alternative hypothesis `H1: μX - μY ≠ Δ`.
+
+Here, `μX` and `μY` are the true population means of samples `X` and `Y`, respectively, and `Δ` is the hypothesized difference in means (typically `0` by default).
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var ztest2 = require( '@stdlib/stats/strided/ztest2' );
+```
+
+#### ztest2( NX, NY, alternative, alpha, diff, sigmax, sigmay, x, strideX, y, strideY, out )
+
+Computes a two-sample Z-test.
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+
+var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+
+var results = new Results();
+var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+The function has the following parameters:
+
+- **NX**: number of indexed elements in `x`.
+- **NY**: number of indexed elements in `y`.
+- **alternative**: [alternative hypothesis][@stdlib/stats/base/ztest/alternatives].
+- **alpha**: significance level.
+- **diff**: difference in means under the null hypothesis.
+- **sigmax**: known standard deviation of `x`.
+- **sigmay**: known standard deviation of `y`.
+- **x**: input array.
+- **strideX**: stride length for `x`.
+- **y**: input array.
+- **strideY**: stride length for `y`.
+- **out**: output [results object][@stdlib/stats/base/ztest/two-sample/results/float64].
+
+The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to perform a two-sample Z-test over every other element in `x` and `y`,
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+
+var x = [ 4.0, 0.0, 4.0, 0.0, 6.0, 0.0, 6.0, 0.0, 5.0, 0.0 ];
+var y = [ 3.0, 0.0, 3.0, 0.0, 5.0, 0.0, 7.0, 0.0, 7.0, 0.0 ];
+
+var results = new Results();
+var out = ztest2( 5, 5, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 2, y, 2, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var Float64Array = require( '@stdlib/array/float64' );
+
+var x0 = new Float64Array( [ 0.0, 4.0, 4.0, 6.0, 6.0, 5.0 ] );
+var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var y0 = new Float64Array( [ 0.0, 3.0, 3.0, 5.0, 7.0, 7.0 ] );
+var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var results = new Results();
+var out = ztest2( 5, 5, 'two-sided', 0.05, 0.0, 1.0, 2.0, x1, 1, y1, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+#### ztest2.ndarray( NX, NY, alternative, alpha, diff, sigmax, sigmay, x, strideX, offsetX, y, strideY, offsetY, out )
+
+Computes a two-sample Z-test using alternative indexing semantics.
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+
+var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+
+var results = new Results();
+var out = ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `x`.
+- **offsetY**: starting index for `y`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to perform a two-sample Z-test over every other element in `x` and `y` starting from the second element
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+
+var x = [ 0.0, 4.0, 0.0, 4.0, 0.0, 6.0, 0.0, 6.0, 0.0, 5.0 ];
+var y = [ 0.0, 3.0, 0.0, 3.0, 0.0, 5.0, 0.0, 7.0, 0.0, 7.0 ];
+
+var results = new Results();
+var out = ztest2.ndarray( 5, 5, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 2, 1, y, 2, 1, results );
+// returns {...}
+
+var bool = ( out === results );
+// returns true
+```
+
+
+
+
+
+
+
+## Notes
+
+- As a general rule of thumb, a Z-test is most reliable when `N >= 50`. For smaller sample sizes or when the standard deviation is unknown, prefer a t-test.
+- Both functions support array-like objects having getter and setter accessors for array element access (e.g., [`@stdlib/array/base/accessor`][@stdlib/array/base/accessor]).
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var normal = require( '@stdlib/random/array/normal' );
+var ztest2 = require( '@stdlib/stats/strided/ztest2' );
+
+var x = normal( 1000, 4.0, 2.0, {
+ 'dtype': 'generic'
+});
+var y = normal( 800, 3.0, 2.0, {
+ 'dtype': 'generic'
+});
+
+var results = new Results();
+var out = ztest2( x.length, y.length, 'two-sided', 0.05, 1.0, 2.0, 2.0, x, 1, y, 1, results );
+// returns {...}
+
+console.log( out.toString() );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[variance]: https://en.wikipedia.org/wiki/Variance
+
+[@stdlib/stats/base/ztest/alternatives]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/ztest/alternatives
+
+[@stdlib/stats/base/ztest/two-sample/results/float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/ztest/two-sample/results/float64
+
+[@stdlib/array/base/accessor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/accessor
+
+
+
+
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.js
new file mode 100644
index 000000000000..ed6e2f2ff196
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.js
@@ -0,0 +1,104 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+var ztest2 = require( './../lib' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'generic'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..252332305575
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/benchmark/benchmark.ndarray.js
@@ -0,0 +1,104 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var normal = require( '@stdlib/random/array/normal' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var pkg = require( './../package.json' ).name;
+var ztest2 = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'generic'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var results;
+ var x;
+ var y;
+
+ results = new Results();
+ x = normal( len, 0.0, 1.0, options );
+ y = normal( len, 0.0, 1.0, options );
+
+ return benchmark;
+
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out.statistic ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':ndarray:len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/docs/repl.txt b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/repl.txt
new file mode 100644
index 000000000000..10d26a97285b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/repl.txt
@@ -0,0 +1,143 @@
+
+{{alias}}( NX, NY, alt, alpha, diff, sigmax, sigmay, x, sx, y, sy, out )
+ Computes a two-sample Z-test.
+
+ The `N` and stride parameters determine which elements in the strided array
+ are accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use a typed
+ array view.
+
+ Parameters
+ ----------
+ NX: integer
+ Number of indexed elements in `x`.
+
+ NY: integer
+ Number of indexed elements in `y`.
+
+ alternative: string
+ Alternative hypothesis. Must be one of the following:
+
+ - two-sided: `x` has same mean as `y`.
+ - greater: `x` has larger mean than `y`.
+ - less: `x` has smaller mean than `y`.
+
+ alpha: number
+ Significance level.
+
+ diff: number
+ Difference in means under the null hypothesis.
+
+ sigmax: number
+ Known standard deviation of `x`.
+
+ sigmay: number
+ Known standard deviation of `y`.
+
+ x: Array|TypedArray|Object
+ Input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ y: Array|TypedArray|Object
+ Input array.
+
+ strideY: integer
+ Stride length for `y`.
+
+ out: Object
+ Output results object.
+
+ Returns
+ -------
+ out: Object
+ Results object.
+
+ Examples
+ --------
+ > var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+ > var x = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+ > var NX = x.length;
+ > var NY = y.length;
+ > var alt = 'two-sided';
+ > var out = new {{alias:@stdlib/stats/base/ztest/two-sample/results/float64}}();
+ > var res = {{alias}}( NX, NY, alt, 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, out );
+ > res.toString()
+
+
+{{alias}}.ndarray( NX, NY, alt, alpha, diff, sigmax, sigmay, x, sx, ox, y, sy, oy, out )
+ Computes a two-sample Z-test using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ NX: integer
+ Number of indexed elements in `x`.
+
+ NY: integer
+ Number of indexed elements in `y`.
+
+ alternative: string
+ Alternative hypothesis. Must be one of the following:
+
+ - two-sided: `x` has same mean as `y`.
+ - greater: `x` has larger mean than `y`.
+ - less: `x` has smaller mean than `y`.
+
+ alpha: number
+ Significance level.
+
+ diff: number
+ Difference in means under the null hypothesis.
+
+ sigmax: number
+ Known standard deviation of `x`.
+
+ sigmay: number
+ Known standard deviation of `y`.
+
+ x: Array|TypedArray|Object
+ Input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ offsetX: integer
+ Starting index for `x`.
+
+ y: Array|TypedArray|Object
+ Input array.
+
+ strideY: integer
+ Stride length for `y`.
+
+ offsetY: integer
+ Starting index for `y`.
+
+ out: Object
+ Output results object.
+
+ Returns
+ -------
+ out: Object
+ Results object.
+
+ Examples
+ --------
+ > var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+ > var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+ > var NX = x.length;
+ > var NY = y.length;
+ > var alt = 'two-sided';
+ > var out = new {{alias:@stdlib/stats/base/ztest/two-sample/results/float64}}();
+ > var res = {{alias}}.ndarray( NX, NY, alt, 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, out );
+ > res.toString()
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/index.d.ts
new file mode 100644
index 000000000000..c10c4d64a74c
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/index.d.ts
@@ -0,0 +1,248 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { NumericArray, Collection, AccessorArrayLike } from '@stdlib/types/array';
+
+/**
+* Input array.
+*/
+type InputArray = NumericArray | Collection | AccessorArrayLike;
+
+/**
+* Alternative hypothesis.
+*/
+type Alternative = 'two-sided' | 'greater' | 'less';
+
+/**
+* Interface describing options when serializing a results object to a string.
+*/
+interface Options {
+ /**
+ * Number of digits to display after decimal points. Default: 4.
+ */
+ digits?: number;
+
+ /**
+ * Boolean indicating whether to show the test decision. Default: true.
+ */
+ decision?: boolean;
+}
+
+/**
+* Serializes a results object as a string.
+*
+* @returns string representation
+*/
+type toString = ( options?: Options ) => string;
+
+/**
+* Serializes a results object as a JSON object.
+*
+* @returns JSON representation
+*/
+type toJSON = () => BaseResults;
+
+/**
+* Interface describing a "base" results object.
+*/
+interface BaseResults {
+ /**
+ * Boolean indicating whether the null hypothesis was rejected.
+ */
+ rejected: boolean;
+
+ /**
+ * Alternative hypothesis.
+ */
+ alternative: Alternative;
+
+ /**
+ * Significance level.
+ */
+ alpha: number;
+
+ /**
+ * p-value.
+ */
+ pValue: number;
+
+ /**
+ * Test statistic.
+ */
+ statistic: number;
+
+ /**
+ * Confidence interval.
+ */
+ ci: Float64Array;
+
+ /**
+ * Difference in means under the null hypothesis.
+ */
+ nullValue: number;
+
+ /**
+ * Sample mean of `x`.
+ */
+ xmean: number;
+
+ /**
+ * Sample mean of `y`.
+ */
+ ymean: number;
+}
+
+/**
+* Interface describing a results object.
+*/
+interface Results extends BaseResults {
+ /**
+ * Serializes results as formatted test output.
+ */
+ toString: toString;
+
+ /**
+ * Serializes results as JSON.
+ */
+ toJSON: toJSON;
+}
+
+/**
+* Interface describing `ztest2`.
+*/
+interface Routine {
+ /**
+ * Computes a two-sample Z-test.
+ *
+ * @param NX - number of indexed elements in `x`
+ * @param NY - number of indexed elements in `y`
+ * @param alternative - alternative hypothesis
+ * @param alpha - significance level
+ * @param diff - difference in means under the null hypothesis
+ * @param sigmax - known standard deviation of `x`
+ * @param sigmay - known standard deviation of `y`
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param y - input array
+ * @param strideY - stride length for `y`
+ * @param out - output results object
+ * @returns results object
+ *
+ * @example
+ * var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+ *
+ * var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+ * var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+ *
+ * var results = new Results();
+ * var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, results );
+ * // returns {...}
+ *
+ * var bool = ( out === results );
+ * // returns true
+ */
+ ( NX: number, NY: number, alternative: Alternative, alpha: number, diff: number, sigmax: number, sigmay: number, x: InputArray, strideX: number, y: InputArray, strideY: number, out: T ): Results;
+
+ /**
+ * Computes a two-sample Z-test using alternative indexing semantics.
+ *
+ * @param NX - number of indexed elements in `x`
+ * @param NY - number of indexed elements in `y`
+ * @param alternative - alternative hypothesis
+ * @param alpha - significance level
+ * @param diff - difference in means under the null hypothesis
+ * @param sigmax - known standard deviation of `x`
+ * @param sigmay - known standard deviation of `y`
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param offsetX - starting index for `x`
+ * @param y - input array
+ * @param strideY - stride length for `y`
+ * @param offsetY - starting index for `y`
+ * @param out - output results object
+ * @returns results object
+ *
+ * @example
+ * var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+ *
+ * var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+ * var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+ *
+ * var results = new Results();
+ * var out = ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, results );
+ * // returns {...}
+ *
+ * var bool = ( out === results );
+ * // returns true
+ */
+ ndarray( NX: number, NY: number, alternative: Alternative, alpha: number, diff: number, sigmax: number, sigmay: number, x: InputArray, strideX: number, offsetX: number, y: InputArray, strideY: number, offsetY: number, out: T ): Results;
+}
+
+/**
+* Computes a two-sample Z-test.
+*
+* @param NX - number of indexed elements in `x`
+* @param NY - number of indexed elements in `y`
+* @param alternative - alternative hypothesis
+* @param alpha - significance level
+* @param diff - difference in means under the null hypothesis
+* @param sigmax - known standard deviation of `x`
+* @param sigmay - known standard deviation of `y`
+* @param x - input array
+* @param strideX - stride length for `x`
+* @param y - input array
+* @param strideY - stride length for `y`
+* @param out - output results object
+* @returns results object
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*/
+declare var ztest2: Routine;
+
+
+// EXPORTS //
+
+export = ztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/test.ts b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/test.ts
new file mode 100644
index 000000000000..7986a57ba328
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/docs/types/test.ts
@@ -0,0 +1,475 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+import Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+import ztest2 = require( './index' );
+
+
+// TESTS //
+
+// The function returns a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectType Results
+ ztest2( x.length, y.length, 'greater', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectType Results
+ ztest2( x.length, y.length, 'less', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectType Results
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( '10', y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( true, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( false, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( null, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( undefined, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( [], y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( {}, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( ( x: number ): number => x, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, '10', 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, true, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, false, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, null, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, undefined, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, [], 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, {}, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, ( x: number ): number => x, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a valid string...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, '10', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, true, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, false, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, null, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, undefined, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, [], 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, {}, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, ( x: number ): number => x, 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', '10', 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', true, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', false, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', null, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', undefined, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', [], 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', {}, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', ( x: number ): number => x, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, '10', 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, true, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, false, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, null, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, undefined, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, [], 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, {}, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, ( x: number ): number => x, 1.0, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, '10', 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, true, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, false, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, null, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, undefined, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, [], 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, {}, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, ( x: number ): number => x, 1.0, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, '10', x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, true, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, false, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, null, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, undefined, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, [], x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, {}, x, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, ( x: number ): number => x, x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, 10, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, '10', 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, true, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, false, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, null, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, undefined, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, {}, 1, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, ( x: number ): number => x, 1, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, '10', y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, true, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, false, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, null, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, undefined, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, [], y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, {}, y, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, ( x: number ): number => x, y, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 10, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, '10', 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, true, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, false, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, null, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, undefined, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, {}, 1, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, ( x: number ): number => x, 1, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eleventh argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, '10', new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, true, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, false, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, null, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, undefined, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, [], new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, {}, new Float64Results() ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, ( x: number ): number => x, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a twelfth argument which is not a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, '10' ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, true ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, false ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, null ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, undefined ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, [] ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, {} ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2(); // $ExpectError
+ ztest2( x.length ); // $ExpectError
+ ztest2( x.length, y.length ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided' ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1 ); // $ExpectError
+ ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, y, 1, new Float64Results(), {} ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+ ztest2.ndarray( x.length, y.length, 'greater', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+ ztest2.ndarray( x.length, y.length, 'less', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectType Results
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( '10', y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( true, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( false, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( null, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( undefined, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( [], y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( {}, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( ( x: number ): number => x, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, '10', 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, true, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, false, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, null, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, undefined, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, [], 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, {}, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, ( x: number ): number => x, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a valid string...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, '10', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 5, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, true, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, false, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, null, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, undefined, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, [], 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, {}, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, ( x: number ): number => x, 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', '10', 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', true, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', false, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', null, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', undefined, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', [], 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', {}, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', ( x: number ): number => x, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, '10', 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, true, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, false, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, null, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, undefined, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, [], 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, {}, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, ( x: number ): number => x, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, '10', 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, true, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, false, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, null, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, undefined, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, [], 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, {}, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, ( x: number ): number => x, 1.0, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, '10', x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, true, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, false, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, null, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, undefined, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, [], x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, {}, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, ( x: number ): number => x, x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eigth argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, 10, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, '10', 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, true, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, false, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, null, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, undefined, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, {}, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, ( x: number ): number => x, 1, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, '10', 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, true, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, false, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, null, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, undefined, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, [], 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, {}, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, ( x: number ): number => x, 0, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, '10', y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, true, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, false, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, null, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, undefined, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, [], y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, {}, y, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, ( x: number ): number => x, y, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not an array-like object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, 10, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, '10', 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, true, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, false, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, null, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, undefined, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, {}, 1, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, ( x: number ): number => x, 1, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, '10', 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, true, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, false, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, null, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, undefined, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, [], 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, {}, 0, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, ( x: number ): number => x, 0, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, '10', new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, true, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, false, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, null, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, undefined, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, [], new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, {}, new Float64Results() ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, ( x: number ): number => x, new Float64Results() ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a results object...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, '10' ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, true ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, false ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, null ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, undefined ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, [] ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, {} ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+ const y = new Float64Array( 10 );
+
+ ztest2.ndarray(); // $ExpectError
+ ztest2.ndarray( x.length ); // $ExpectError
+ ztest2.ndarray( x.length, y.length ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0 ); // $ExpectError
+ ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, new Float64Results(), {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/examples/index.js b/lib/node_modules/@stdlib/stats/strided/ztest2/examples/index.js
new file mode 100644
index 000000000000..ef67a5e78259
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/examples/index.js
@@ -0,0 +1,36 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var normal = require( '@stdlib/random/array/normal' );
+var ztest2 = require( './../lib' );
+
+var x = normal( 1000, 4.0, 2.0, {
+ 'dtype': 'generic'
+});
+var y = normal( 800, 3.0, 2.0, {
+ 'dtype': 'generic'
+});
+
+var results = new Results();
+var out = ztest2( x.length, y.length, 'two-sided', 0.05, 1.0, 2.0, 2.0, x, 1, y, 1, results );
+// returns {...}
+
+console.log( out.toString() );
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/lib/index.js b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/index.js
new file mode 100644
index 000000000000..32fe01b89c4b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/index.js
@@ -0,0 +1,71 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+/**
+* Compute a two-sample Z-test.
+*
+* @module @stdlib/stats/strided/ztest2
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+* var ztest2 = require( '@stdlib/stats/strided/ztest2' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+* var ztest2 = require( '@stdlib/stats/strided/ztest2' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2.ndarray( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = main;
+
+// exports: { "ndarray": "main.ndarray" }
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/lib/main.js b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/main.js
new file mode 100644
index 000000000000..29727967f5e1
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/main.js
@@ -0,0 +1,66 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+/**
+* Computes a two-sample Z-test.
+*
+* @param {PositiveInteger} NX - number of indexed elements in `x`
+* @param {PositiveInteger} NY - number of indexed elements in `y`
+* @param {(integer|string)} alternative - alternative hypothesis
+* @param {number} alpha - significance level
+* @param {number} diff - difference in means under the null hypothesis
+* @param {PositiveNumber} sigmax - known standard deviation of `x`
+* @param {PositiveNumber} sigmay - known standard deviation of `y`
+* @param {Collection} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {Collection} y - input array
+* @param {integer} strideY - stride length for `y`
+* @param {Object} out - output results object
+* @returns {Object} results object
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, y, 1, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*/
+function ztest2( NX, NY, alternative, alpha, diff, sigmax, sigmay, x, strideX, y, strideY, out ) { // eslint-disable-line max-len, max-params
+ return ndarray( NX, NY, alternative, alpha, diff, sigmax, sigmay, x, strideX, stride2offset( NX, strideX ), y, strideY, stride2offset( NY, strideY ), out ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = ztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/lib/ndarray.js b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/ndarray.js
new file mode 100644
index 000000000000..f6cbc9f0f4c6
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/lib/ndarray.js
@@ -0,0 +1,160 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolveStr = require( '@stdlib/stats/base/ztest/alternative-resolve-str' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var quantile = require( '@stdlib/stats/base/dists/normal/quantile' ).factory;
+var cdf = require( '@stdlib/stats/base/dists/normal/cdf' ).factory;
+var mean = require( '@stdlib/stats/strided/mean' ).ndarray;
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var Float64Array = require( '@stdlib/array/float64' );
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+
+
+// VARIABLES //
+
+var normalCDF = cdf( 0.0, 1.0 );
+var normalQuantile = quantile( 0.0, 1.0 );
+
+// Initialize a workspace for storing confidence intervals:
+var WORKSPACE = new Float64Array( 2 );
+
+
+// MAIN //
+
+/**
+* Computes a two-sample Z-test using alternative indexing semantics.
+*
+* @param {PositiveInteger} NX - number of indexed elements in `x`
+* @param {PositiveInteger} NY - number of indexed elements in `y`
+* @param {(integer|string)} alternative - alternative hypothesis
+* @param {number} alpha - significance level
+* @param {number} diff - difference in means under the null hypothesis
+* @param {PositiveNumber} sigmax - known standard deviation of `x`
+* @param {PositiveNumber} sigmay - known standard deviation of `y`
+* @param {Collection} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {Collection} y - input array
+* @param {integer} strideY - stride length for `y`
+* @param {NonNegativeInteger} offsetY - starting index for `y`
+* @param {Object} out - output results object
+* @returns {Object} results object
+*
+* @example
+* var Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+*
+* var x = [ 4.0, 4.0, 6.0, 6.0, 5.0 ];
+* var y = [ 3.0, 3.0, 5.0, 7.0, 7.0 ];
+*
+* var results = new Results();
+* var out = ztest2( x.length, y.length, 'two-sided', 0.05, 0.0, 1.0, 2.0, x, 1, 0, y, 1, 0, results );
+* // returns {...}
+*
+* var bool = ( out === results );
+* // returns true
+*/
+function ztest2( NX, NY, alternative, alpha, diff, sigmax, sigmay, x, strideX, offsetX, y, strideY, offsetY, out ) { // eslint-disable-line max-len, max-params
+ var pValue;
+ var stderr;
+ var xmean;
+ var ymean;
+ var xvar;
+ var yvar;
+ var stat;
+ var alt;
+ var q;
+
+ alt = resolveStr( alternative );
+ if (
+ NX <= 0 ||
+ NY <= 0 ||
+ isnan( alpha ) ||
+ isnan( diff ) ||
+ isnan( sigmax ) ||
+ isnan( sigmay ) ||
+ sigmax <= 0.0 ||
+ sigmay <= 0.0 ||
+ alpha < 0.0 ||
+ alpha > 1.0
+ ) {
+ WORKSPACE[ 0 ] = NaN;
+ WORKSPACE[ 1 ] = NaN;
+ out.rejected = false;
+ out.alternative = alt;
+ out.alpha = NaN;
+ out.pValue = NaN;
+ out.statistic = NaN;
+ out.ci = WORKSPACE;
+ out.nullValue = NaN;
+ out.xmean = NaN;
+ out.ymean = NaN;
+ return out;
+ }
+ // Compute the standard error of the mean:
+ xvar = sigmax * sigmax;
+ yvar = sigmay * sigmay;
+ stderr = sqrt( ( xvar / NX ) + ( yvar / NY ) );
+
+ // Compute the arithmetic means of the input arrays:
+ xmean = mean( NX, x, strideX, offsetX );
+ ymean = mean( NY, y, strideY, offsetY );
+
+ // Compute the test statistic (i.e., the z-score, which is the standardized difference between the sample means of x and y, adjusted by the hypothesized difference, in units of the standard error):
+ stat = ( xmean - ymean - diff ) / stderr;
+
+ // Compute the p-value and confidence interval...
+ if ( alt === 'less' ) {
+ pValue = normalCDF( stat );
+ q = normalQuantile( 1.0 - alpha );
+ WORKSPACE[ 0 ] = NINF;
+ WORKSPACE[ 1 ] = diff + ( ( stat + q ) * stderr );
+ } else if ( alt === 'greater' ) {
+ pValue = 1.0 - normalCDF( stat );
+ q = normalQuantile( 1.0 - alpha );
+ WORKSPACE[ 0 ] = diff + ( ( stat - q ) * stderr );
+ WORKSPACE[ 1 ] = PINF;
+ } else { // alt == 'two-sided'
+ pValue = 2.0 * normalCDF( -abs( stat ) );
+ q = normalQuantile( 1.0 - ( alpha / 2.0 ) );
+ WORKSPACE[ 0 ] = diff + ( ( stat - q ) * stderr );
+ WORKSPACE[ 1 ] = diff + ( ( stat + q ) * stderr );
+ }
+ // Return test results:
+ out.rejected = ( pValue <= alpha );
+ out.alpha = alpha;
+ out.pValue = pValue;
+ out.statistic = stat;
+ out.ci = WORKSPACE;
+ out.alternative = alt;
+ out.nullValue = diff;
+ out.xmean = xmean;
+ out.ymean = ymean;
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = ztest2;
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/package.json b/lib/node_modules/@stdlib/stats/strided/ztest2/package.json
new file mode 100644
index 000000000000..6240ec3e5c01
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@stdlib/stats/strided/ztest2",
+ "version": "0.0.0",
+ "description": "Compute a two-sample Z-test.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "statistics",
+ "stats",
+ "mathematics",
+ "math",
+ "strided",
+ "strided array",
+ "typed",
+ "array",
+ "ztest",
+ "z-test",
+ "hypothesis",
+ "testing",
+ "normality"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.js b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.js
new file mode 100644
index 000000000000..e1cc9c485d7f
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.js
@@ -0,0 +1,38 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var ztest2 = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof ztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof ztest2.ndarray, 'function', 'method is a function' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.main.js b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.main.js
new file mode 100644
index 000000000000..8fc42d34d0a8
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.main.js
@@ -0,0 +1,342 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var gfill = require( '@stdlib/blas/ext/base/gfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var ztest2 = require( './../lib' );
+
+
+// VARIABLES //
+
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof ztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=two-sided)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 10.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=greater)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=less)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, y, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 2, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, 1.0, x, 2, y, 2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, -2, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 100.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, -2, y, -2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.ndarray.js b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.ndarray.js
new file mode 100644
index 000000000000..3b5f4320a124
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/strided/ztest2/test/test.ndarray.js
@@ -0,0 +1,395 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Results = require( '@stdlib/stats/base/ztest/two-sample/results/float64' );
+var isfinite = require( '@stdlib/math/base/assert/is-finite' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var gfill = require( '@stdlib/blas/ext/base/gfill' ).ndarray;
+var normalFactory = require( '@stdlib/random/array/normal' ).factory;
+var PINF = require( '@stdlib/constants/float64/pinf' );
+var NINF = require( '@stdlib/constants/float64/ninf' );
+var ztest2 = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var normal = normalFactory({
+ 'seed': 12345
+});
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof ztest2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=two-sided)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 10.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'two-sided', 0.1, 2.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=greater)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'greater', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'greater', 0.1, -1.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'greater', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( out.ci[ 1 ], PINF, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a two-sample Z-test (alternative=less)', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'less', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10000, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( x.length, y.length, 'less', 0.1, 1.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'less', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( out.ci[ 0 ], NINF, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `NX` or `NY` parameter less than or equal to `0`, the function returns `NaN` results', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+
+ results = new Float64Results();
+ x = normal( 10, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( 10, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ out = ztest2( 0, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( -1, y.length, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( x.length, 0, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ out = ztest2( x.length, -1, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 1, 0, y, 1, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), true, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 2, 0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, 1.0, x, 2, 0, y, 2, 0, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative stride parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, -2, (N-1)*2, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 1 );
+ gfill( N, NaN, y, 2, 1 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 10.0, 1.0, 1.0, x, -2, (N-1)*2, y, -2, (N-1)*2, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, true, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an offset parameter', function test( t ) {
+ var results;
+ var out;
+ var x;
+ var y;
+ var N;
+
+ N = 10000;
+ results = new Float64Results();
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 0.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 0 );
+ gfill( N, NaN, y, 2, 0 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 0.0, 1.0, 1.0, x, 2, 1, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ // Generate arrays with a sufficiently large sample size to effectively guarantee expected results:
+ x = normal( N*2, 4.0, 1.0, {
+ 'dtype': 'generic'
+ });
+ y = normal( N*2, 2.0, 1.0, {
+ 'dtype': 'generic'
+ });
+
+ gfill( N, NaN, x, 2, 0 );
+ gfill( N, NaN, y, 2, 0 );
+
+ out = ztest2( N, N, 'two-sided', 0.1, 2.0, 1.0, 1.0, x, 2, 1, y, 2, 1, results );
+ t.strictEqual( out, results, 'returns expected value' );
+ t.strictEqual( out.rejected, false, 'returns expected value' );
+ t.strictEqual( out.alternative, 'two-sided', 'returns expected value' );
+ t.strictEqual( isnan( out.statistic ), false, 'returns expected value' );
+ t.strictEqual( isnan( out.pValue ), false, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 0 ] ), true, 'returns expected value' );
+ t.strictEqual( isfinite( out.ci[ 1 ] ), true, 'returns expected value' );
+
+ t.end();
+});