deno.land / x / simplestatistics@v7.8.3 / test / quantilesorted.test.js

quantilesorted.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("../dist/simple-statistics.js");
test("quantileSorted", function (t) { // Data and results from // [Wikipedia](http://en.wikipedia.org/wiki/Quantile#Quantiles_of_a_population) t.test("can get proper quantiles of an even-length list", function (t) { const even = [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]; t.equal(ss.quantileSorted(even, 0.25), 7); t.equal(ss.quantileSorted(even, 0.5), 9); t.equal(ss.quantileSorted(even, 0.75), 15); t.end(); }); t.end();});
simplestatistics

Version Info

Tagged at
a year ago