UNPKG

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

28 lines (19 loc) 855 B
<title>Paired T‑Test</title> <description>Paired (dependent) samples t‑test.</description> <keywords>paired, t, test, class, pairedttest, returned, comparemeans.paired, public, fields, js, new, number</keywords> # Paired T‑Test Paired (dependent) samples t‑test. ## Class: `PairedTTest` (returned by `CompareMeans.paired`) **Constructor** ```js new PairedTTest({ A: number[], B: number[] }) ``` - Requires **at least two** arrays; internally trims to the **same length**. ### Public fields - `t: number` – t statistic. - `df: number` – degrees of freedom (`n - 1`). - `p: number` – two‑sided p‑value (Student t). - `meanDelta: number` – mean of pairwise differences. - `sdDelta: number` – sample SD of differences. - `n: number` – number of paired observations. - `diffs: number[]` – raw pairwise deltas (A[i] − B[i]).