Wiki Page, Math 13 - Perez Sandbox : Module 9 - Wrap Up "Fitting a Line"

Wiki Page
2026-01-17T21:15:57-08:00

Let’s Summarize

Fitting a line

The line that best summarizes a linear relationship is the least-squares regression line. The least-squares line is the best fit for the data because it gives the best predictions with the least amount of overall error. The most common measurement of overall error is the sum of the squares of the errors (SSE). The least-squares line is the line with the smallest SSE.

We use the least-squares regression line to predict the value of the response variable from a value of the explanatory variable.

Prediction for values of the explanatory variable that fall outside the range of the data is called extrapolation. These predictions are unreliable because we do not know if the pattern observed in the data continues outside the range of the data. Avoid making predictions outside the range of the data.

The slope of the least-squares regression line is the average change in the predicted values of the response variable when the explanatory variable increases by 1 unit. The vertical intercept is the predicted initial value when x=0.

We use technology (StatCrunch) to find the equation of a least squares regression line.

Assessing the fit of a line

When a scatterplot has a linear form, the least-squares regression line is the line that best fits the data. However, that does not mean that the regression line is a good fit (it is the best we can do, but it may not be that good.)

Statisticians use two different measures to assess the fit of the regression line:

R-sq : the square of the correlation coefficient

Standard error of the regression : the standard deviation of the prediction errors

R-squared: R-sq gives us information about whether we have the right explanatory variable in our linear regression model. A large r-sq value tells us that the explanatory variable explains a large proportion of the changes in Y; our linear model based on X is good at explaining the variability in Y. A small r-sq value suggests that we may want to use a different explanatory variable.

Standard error of the regression: Standard error is the standard deviation of the prediction errors. is roughly a measure of the average amount that the predicted Y-values deviate from the observed Y-values, which is an estimate of the average distance that the data points are from the line. In other words, is roughly the average amount of prediction error for the regression line.

Mark this page as done, then click the "Next" or > button to continue.

Content by the Open Learning Initiative and licensed under CC BY.