deno.land / x / simplestatistic@v7.7.1 / test / subtract_from_mean.test.js

subtract_from_mean.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* eslint no-shadow: 0 */
const test = require("tap").test;const ss = require("../");
test("subtractFromMean", function (t) { t.test("can remove a single value from a mean", function (t) { const values = [13, 14, 15, 8, 20, 54]; t.equal(ss.subtractFromMean(ss.mean(values), values.length, 54), 14); t.equal( ss.subtractFromMean(ss.mean(values), values.length, 54), ss.mean(values.slice(0, -1)) ); t.end(); }); t.end();});
simplestatistic

Version Info

Tagged at
2 years ago