line of regression by the method of least squares
r = regression_y_on_x(x,y)
vector of real numbers
vector of real numbers
vector of two real numbers
regression_y_on_x(x,y)
returns the vector of coefficients
a
and b
of the regression line for
y
on x
by the method of least squares,
with linear equation Y=aX+b
, where
x
and y
are vectors of numbers with the same
dimension and x
is a vector of numbers not all equal.