Pearson's correlation coefficient
Assume this instance of Correlation came from summing together Correlation.apply((x_i, y_i)) for i in 1...n.
Assume this instance of Correlation came from summing together Correlation.apply((x_i, y_i)) for i in 1...n.
(m, b) where y = mx + b is the line with the least squares fit of the points (x_i, y_i). See, e.g. https://mathworld.wolfram.com/LeastSquaresFitting.html.
A class to calculate covariance and the first two central moments of a sequence of pairs of Doubles, from which the pearson correlation coeifficient can be calculated.
m{i}x denotes the ith central moment of the first projection of the pair. m{i}y denotes the ith central moment of the second projection of the pair. c2 the covariance equivalent of the second central moment, i.e. c2 = Sum_(x,y) (x - m1x)*(y - m1y).