time-to-botec/squiggle/node_modules/jstat/test/test/ztest-test.js
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

28 lines
672 B
JavaScript

var vows = require('vows');
var assert = require('assert');
var suite = vows.describe('jStat');
require('../env.js');
suite.addBatch({
'ztest ': {
'topic': function() {
return jStat;
},
'(value, mean, sd, sides) pattern works': function(jStat) {
var p = jStat.ztest(1.96, 0, 1, 2);
assert.equal(p < 0.05, true);
},
'(zscore, sides) pattern works': function(jStat) {
var p = jStat.ztest(1.96, 2);
assert.equal(p < 0.05, true);
},
'(value, array, sides, flag) pattern works': function(jStat) {
var p = jStat.ztest(1.96, [1, -1], 2);
assert.equal(p < 0.05, true);
}
}
});
suite.export(module);