Skip to content

sampleCorrelation

sampleCorrelation(x, y): number

Defined in: src/sample_correlation.js:15

The correlation is a measure of how correlated two datasets are, between -1 and 1

number[]

first input

number[]

second input

number

sample correlation

sampleCorrelation([1, 2, 3, 4, 5, 6], [2, 2, 3, 4, 5, 60]).toFixed(2);
// => '0.69'