[][src]Function peroxide::statistics::stat::cor

pub fn cor(v1: &Vector, v2: &Vector) -> f64

Pearson's correlation coefficient

Examples

extern crate peroxide;
use peroxide::*;

let a = c!(1,2,3);
let b = c!(3,2,1);
assert!(nearly_eq(cor(&a, &b),-1));