Linear Model vs Least-Squares Regression Line
Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.
Linear model
Regression and correlation
A linear model is a straight-line equation that uses an explanatory variable x to predict a response variable y, written y-hat = a + bx.
A linear model claims that a response is well described by a straight line plus scatter around it. It is written , where (read y-hat) is the value the line returns, is the y-intercept, is the slope, and each observed differs from by a residual. Any straight line through a scatterplot is a linear model; the least-squares regression line is the particular one that minimizes the sum of the squared residuals.
Six students study 1, 2, 3, 4, 5 and 6 hours and score 60, 72, 65, 78, 71 and 86, and the least-squares model is . Drop the hat and write and the equation becomes false for all six of them: it asserts scores of 62, 66, 70, 74, 78 and 82 when the students actually scored 60, 72, 65, 78, 71 and 86. The hat is what turns a false equation into an honest prediction.
So the misreading to name is "the data follow the equation." They do not, and no data ever do. A linear model is a summary of the pattern, and the leftover scatter is part of the description rather than a defect in it. A second version of the same slip is treating the model as a fact about the world instead of about these observations: refit on a different sample and and come out different.
Nothing in the arithmetic checks whether a line belongs on the data. Feed a clean parabola into a regression routine and it returns a slope, an intercept and a correlation without complaint. The form of the scatterplot and the shape of the residual plot are what justify the model, and the model speaks only for the range of the data covered.
Linear regression models are topic 5.3 in Unit 5, Regression Analysis.
Least-squares regression line
Regression and correlation
The least-squares regression line is the straight line through a scatterplot that makes the sum of the squared residuals as small as possible.
The least-squares regression line is the one line that the least-squares criterion selects out of all the straight lines you could draw: the line minimizing , the total of the squared vertical residuals. It is written (read y-hat for ), and its two coefficients come from the summary statistics, with slope and intercept , where is x-bar, the mean of the explanatory values.
Six students study 1, 2, 3, 4, 5 and 6 hours and score 60, 72, 65, 78, 71 and 86. Here , , , and , so points per hour and . The fitted line is , its residuals are -2, 6, -5, 4, -7 and 4, and their squares total 146. No other straight line drives that total below 146.
The picture to correct is the one where the best-fit line threads through as many points as it can. This line passes through none of the six, and its smallest miss is 2 points. The point it does pass through is the point of averages , since , and that holds for every least-squares line because it is the intercept formula rearranged. Quality of fit is a statement about all the residuals at once, never about how many points were hit.
Two limits come with the line. The formulas return one as long as the -values are not all identical, curved data included, so the existence of a line is no evidence that a line belongs on the data. And squaring the misses leaves the fit with no resistance, so a single observation far out in can move a long way.
Least-squares regression is topic 5.5 in Unit 5, Regression Analysis.
A physics lab runs this procedure almost every week. Data is rearranged so the relationship plots as a straight line, a least-squares line is fitted to it, and a physical constant is read off the slope: linearization.