pearsonCorrelation(
first,second):number
Defined in: packages/distribution/src/sample-statistics.ts:263
Pearson product-moment correlation coefficient, clamped to [-1, 1] against floating-point overshoot.
Parameters
Section titled “Parameters”second
Section titled “second”Returns
Section titled “Returns”number
Throws
Section titled “Throws”INVALID_SAMPLE when the lengths differ, a sample holds fewer than 2
values, or a value is non-finite; ZERO_VARIANCE when either sample is constant.