Function kirstine::correlation

source ·
pub fn correlation(data: &Vec<(f64, f64)>) -> f64
Expand description

Pearson correlation coefficient

This is what is normally referred to when talking about finding the correlation.

The data is a vector of tuples with x and y data points. Returns a number between -1 and 1.

Wikipedia article.