Skip to main content
Module

x/simplestatistics/test/sum_nth_power_deviations.test.js

simple statistics for node & browser javascript
Go to Latest
File
/* eslint no-shadow: 0 */
const test = require("tap").test;const ss = require("../dist/simple-statistics.js");
test("sumNthPowerDeviations", function (t) { t.equal(ss.sumNthPowerDeviations([0, 0, 0], 2), 0); t.equal(ss.sumNthPowerDeviations([0, 1], 2), 0.5); t.equal(ss.sumNthPowerDeviations([0, 1], 3), 0); t.equal(ss.sumNthPowerDeviations([0, 1, 2], 2), 2); t.end();});