als-statistics
Version:
Modular JS statistics toolkit for Node.js and the browser: descriptive stats, correlations (Pearson/Spearman/Kendall), t-tests & ANOVA (Student/Welch), reliability (Cronbach’s alpha), regression (linear/logistic), clustering (DBSCAN/HDBSCAN), and table/co
16 lines (14 loc) • 605 B
JavaScript
import { EPS } from "../settings.js";
import { Analyze } from "../../lib/index.js";
const { CDF } = Analyze;
import { describe, it } from 'node:test';
import { nearlyEqual, hasDataOrSkip, splitGroups, toRecordFromArray } from '../helpers.js'
export function testCDF(g) {
describe('CDFs (Analyze.CDF)', () => {
it('phi(0), t(2,10), f(3,2,20)', () => {
nearlyEqual(CDF.phi(0), g.cdf.phi0, EPS.cdf, 'phi(0)');
nearlyEqual(CDF.t(2, 10), g.cdf.t_2_df10, 5e-9, 't(2,10)');
nearlyEqual(CDF.f(3, 2, 20), g.cdf.f_3_df2_20, 5e-9, 'f(3,2,20)');
});
});
}