CHAPTER 07 · TOPIC 01
Simple Linear Regression
Learn least squares, residual diagnostics, sums-of-squares decomposition, coefficient tests, and prediction with one quantitative predictor.
On this page
- Questions Simple Linear Regression Can Answer
- Start with the Scatterplot and Residuals
- Population Model and Fitted Sample Line
- Interpreting the Intercept and Slope
- Least Squares
- Model Assumptions
- Decomposing Variation in Y into Model and Error
- Regression ANOVA Table and Overall F Test
- The reason why the degrees of freedom are n−1, 1, and n−2
- Residual Standard Deviation and Coefficient Tests
- F=t² with slope test
- Distinguishing Explanation from Prediction
Simple regression analysis models a linear relationship between one quantitative explanatory variable, X, and a quantitative outcome variable, Y. The slope represents the direction and magnitude of the association and is used to explain the average response and predict new observations.
Questions Simple Linear Regression Can Answer#
- How much does the average of Y change when X increases by 1 unit?
- Is there evidence that the linear relationship is different from 0?
- How much variation in Y does the model explain?
- Can a given X predict the average response or individual values?
Start with the Scatterplot and Residuals#
Look first at curvature, clusters, outliers, high-leverage points, and changes in spread. The difference between the observed value at each point and the regression line is the residual.
Population Model and Fitted Sample Line#
Interpreting the Intercept and Slope#
β₁ is the amount of change in Y average when X increases by 1 unit. β₀ is the average at X=0, but if 0 is outside the observation range or has no practical meaning, do not force it to be interpreted. Centering allows you to move the intercept within the observation range.
Least Squares#
Model Assumptions#
- The mean of Y is linearly related to X
- Observations and errors are independent
- The error variance is constant across levels of X
- For small-sample inference on coefficients, the errors are approximately normal
- Strong outliers and influence points do not dominate the results
Decomposing Variation in Y into Model and Error#
Regression ANOVA Table and Overall F Test#
| source of variation | sum of squares | degrees of freedom | mean square |
| regression | SSR | 1 | SSR/1 |
| error | SSE | n−2 | SSE/(n−2) |
| total | SST | n−1 | — |
The reason why the degrees of freedom are n−1, 1, and n−2#
The total deviation uses one degrees of freedom to estimate the mean. The regression part is determined by one slope and has 1 degrees of freedom, and the residual has n-2 degrees of freedom because it estimates two parameters: the intercept and the slope.
Residual Standard Deviation and Coefficient Tests#
F=t² with slope test#
Distinguishing Explanation from Prediction#
The confidence interval for the mean response given X represents the uncertainty in the population mean line. The prediction interval for a new individual will always be wider because individual error is also added. Extrapolation outside the observation range should be handled with caution as there is no guarantee of a linear relationship.
- Check the scatter plot and study design
- Estimate coefficients and confidence intervals
- Diagnose residuals, influence points, linearity, and homoscedasticity
- Report F, slope t, p-value, R², residual standard deviation
- Clarify the prediction target and scope of application without interpreting association as causation