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
24 lines (16 loc) • 586 B
Markdown
<title>Pearson Correlation</title>
<description>## Class: `Pearson`</description>
<keywords>pearson, correlation, class, public, fields, js, new, x, number, y, population, false</keywords>
# Pearson Correlation
## Class: `Pearson`
**Constructor**
```js
new Pearson({ X: number[], Y: number[] }, population=false)
```
- When `population=true`, covariance uses population denominator.
### Public fields
- `covariance: number`
- `df: number` – `n - 2`
- `r: number` – correlation coefficient in `[-1, 1]`
- `t: number` – test statistic
- `p: number` – two‑sided p‑value