Linear regression
a. Predicts an outcome variable, or dependent variable
b. Predicts using a set of independent variables
The goal of linear regression is to create a predictive line through the data.
One-variable linear regression, which just uses one independent variable to predict the dependent variable.
The best model or best choice of coefficients Beta 0 and Beta 1 has the smallest error terms or smallest residuals.
One measure of the quality of a regression line is the sum of squared errors, or SSE. This is the sum of the squared residuals or error terms.
SSE= Sq (E1) + Sq (E2) + ...Sq (EN)
Although SSE allows us to compare lines on the same data set, it's hard to interpret for two reasons.
a. The first is that it scales with n, the number of data points. If we built the same model with twice as much data, the sum of squared errors might be twice as big. But this doesn't mean it's a worse model.
b.The second is that the units are hard to understand. Some of squared errors is in squared units
of the dependent variable.
RMSE = Sqrt (SSE/N)
Baseline model, the model that does not use any variables. The baseline model predicts the average value of the dependent variable regardless of the value of the independent variable.
SST = The sum of squared errors for the baseline model is also known as the total sum of squares, commonly referred to as SST.
Sq(R) = 1 - SSE/SST
Multiple linear regression allows you to use multiple variables at once to improve the model.
Adding variable always increases value.
a. Predicts an outcome variable, or dependent variable
b. Predicts using a set of independent variables
The goal of linear regression is to create a predictive line through the data.
One-variable linear regression, which just uses one independent variable to predict the dependent variable.
The best model or best choice of coefficients Beta 0 and Beta 1 has the smallest error terms or smallest residuals.
One measure of the quality of a regression line is the sum of squared errors, or SSE. This is the sum of the squared residuals or error terms.
SSE= Sq (E1) + Sq (E2) + ...Sq (EN)
Although SSE allows us to compare lines on the same data set, it's hard to interpret for two reasons.
a. The first is that it scales with n, the number of data points. If we built the same model with twice as much data, the sum of squared errors might be twice as big. But this doesn't mean it's a worse model.
b.The second is that the units are hard to understand. Some of squared errors is in squared units
of the dependent variable.
RMSE = Sqrt (SSE/N)
Baseline model, the model that does not use any variables. The baseline model predicts the average value of the dependent variable regardless of the value of the independent variable.
SST = The sum of squared errors for the baseline model is also known as the total sum of squares, commonly referred to as SST.
Sq(R) = 1 - SSE/SST
Multiple linear regression allows you to use multiple variables at once to improve the model.
Adding variable always increases value.