Least-Squares Regression Line
The least-squares line is the straight line that minimises the sum of squared vertical distances to the data points. It is used to describe linear trends, to make predictions and as the simplest regression model.
LaTeX
\hat y=a+bx,\qquad b=\frac{\sum(x_i-\bar x)(y_i-\bar y)}{\sum(x_i-\bar x)^2},\quad a=\bar y-b\bar xVariables
- predicted value
- slope
- intercept
- means of x and y
Example
Fit a line to .
- , , so .
- .
Answer: .