Skip to main content
Module

x/simplestatistics/index.js>sampleCorrelation

simple statistics for node & browser javascript
Go to Latest
function sampleCorrelation
import { sampleCorrelation } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

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

Examples

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

Parameters

x

first input

y

second input