Least-squares regression chooses a line that minimises a sum of squared residuals. The response variable determines the direction in which residuals are measured.
Regression of \(y\) on \(x\)
Predict \(y\) from \(x\). Minimise \(\sum[y_i-\widehat y(x_i)]^2\), the squared vertical residuals.
Regression of \(x\) on \(y\)
Predict \(x\) from \(y\). Minimise \(\sum[x_i-\widehat x(y_i)]^2\), the squared horizontal residuals.
Both least-squares regression lines pass through the mean point \((\bar x,\bar y)\).
Need help? Join our JC Math tuition classes.
Learn more