@stdlib/stats-base-ztest-alternatives
v0.1.1
Published
Z-test alternative hypotheses.
Readme
Alternative Hypotheses
Z-test alternative hypotheses.
Installation
npm install @stdlib/stats-base-ztest-alternativesUsage
var alternatives = require( '@stdlib/stats-base-ztest-alternatives' );alternatives()
Returns a list of Z-test alternative hypotheses.
var out = alternatives();
// e.g., returns [ 'two-sided', 'less', 'greater' ]The output array contains the following alternatives:
two-sided: mean is not equal to the null hypothesis value.less: mean is less than the null hypothesis value.greater: mean is greater than the null hypothesis value.
Examples
var contains = require( '@stdlib/array-base-assert-contains' ).factory;
var alternatives = require( '@stdlib/stats-base-ztest-alternatives' );
var isAlternative = contains( alternatives() );
var bool = isAlternative( 'two-sided' );
// returns true
bool = isAlternative( 'greater' );
// returns true
bool = isAlternative( 'beep' );
// returns falseC APIs
Usage
#include "stdlib/stats/base/ztest/alternatives.h"STDLIB_STATS_ZTEST_ALTERNATIVE
An enumeration of Z-test alternative hypotheses with the following fields:
- STDLIB_STATS_ZTEST_TWO_SIDED: mean is not equal to the null hypothesis value.
- STDLIB_STATS_ZTEST_LESS: mean is less than the null hypothesis value.
- STDLIB_STATS_ZTEST_GREATER: mean is greater than the null hypothesis value.
#include "stdlib/stats/base/ztest/alternatives.h"
const enum STDLIB_STATS_ZTEST_ALTERNATIVE v = STDLIB_STATS_ZTEST_TWO_SIDED;Notes
- Enumeration constants should be considered opaque values, and one should not rely on specific integer values.
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2026. The Stdlib Authors.
