L3 - Least Squares Method Flashcards
Give the Simple Linear Regression function…
Yb(x) = b0 + b1x + error
What is the formula for the Y-intercept of the regression line?
b0 = y median - (b1 * x median)
What is the formula for the slope of the regression line?
b1 = r * (sy / sx)
What is the goal of the simple regression function?
To achieve as small error as possible.
What is the formula for the error of the simple linear regression function?
Transpose the simple linear regression function with respect to E
Error = Yb(x) - b0 - b1x
What does MSE find?
The average error between the regression line and the data points.
Why do we square the errors for MSE?
- We only want to deal with positive values.
- If we summed, the positive and negative values would cancel each other out.
What is the advantage of MSE?
- Sensitive to anomalies, thus can reduce their effect.
What is the goal of MSE? What must we tune to obtain this?
- Achieve an error as close to 0 as possible.
- We tune b0 and b1 to do this.
What is the Least Square Method?
- A method of linear regression in which we tune b0 and b1 in order to obtain the lowest SSE ( Sum of Squared Error )
What are the 4 steps to the Least Squares Method?
- Transpose the system of equations with respect to Error.
- Square and sum equations. Minimise as much as possible.
- Calculate partial derivatives with respect to b0 and b1
- Use elimination to solve the remaining system of equations.
- Result is b0 and b1 with the smallest error.
What do we compare the Least Squares Method against?
The mean of Y, which is the most basic regression line.
What are the 2 types of variations encountered in LSM?
Unexplained Variations - The error that can’t be explained by the independent variable.
Explained Variations - The error that can be explained by the independent variable.
How do we calculate the Total Variation of LSM?
Total Variation = Unexplained variation + explained variation
What is the Sum of Squared Residual (SSR)?
Measures the level of variance in the error of a regression model.