Regression modeling represents the association between two quantitative variables with a fitted equation, typically a least-squares line , constructed from a scatterplot or data set and evaluated with residuals and . The slope and intercept are interpreted in context, predictions are distinguished from observed values, and the limitations of interpolation, extrapolation, and correlation as evidence of causation are recognized. This treatment is limited to single-predictor linear models; multivariable regression, advanced nonlinear models, and formal inferential procedures are not included.
A linear regression model describes the relationship between a quantitative explanatory variable and a quantitative response variable using
where:
A teacher records the number of hours five students studied and their test scores.
| Study time, (hours) | Score, |
|---|---|
| 1 | 52 |
| 2 | 55 |
| 3 | 61 |
| 4 | 64 |
| 5 | 68 |
A scatterplot would show an approximately straight, upward pattern. This suggests using a linear regression model: students who study more hours tend to have higher scores.
For these data, the means are
The least-squares slope is
The intercept is
Therefore, the regression model is
The least-squares line is chosen because it makes the sum of the squared residuals as small as possible.
The slope is . In context:
For each additional hour of studying, the predicted test score increases by about points.
The intercept is . This means:
A student who studies hours is predicted to score about points.
The intercept may not be especially meaningful if hours was not represented in the data, but it is needed to define the line.
To predict the score for a student who studies hours, substitute :
The predicted score is about points. Since hours is between the observed values of and , this is an interpolation, which is generally more reliable than predicting outside the observed range.
The predicted score is not necessarily the student’s actual score. It is the value given by the model.
A residual is
or observed value minus predicted value.
For the student who studied hours,
The actual score was , so the residual is
The model overpredicted this student’s score by points.
For all five students, the residuals are approximately
Residuals close to indicate predictions close to the observed values. A residual plot with no clear pattern supports using a linear model. A curved pattern or a pattern that spreads out would suggest that a line may not be appropriate.
For this model,
This means that about of the variation in test scores is explained by the linear relationship with study time in this data set. The remaining variation is due to other factors and random differences.
A high does not prove that studying causes higher scores. These data show an association, but other variables—such as prior knowledge, attendance, or motivation—could also affect scores.
Finally, avoid extrapolation: predicting a score for someone who studies hours would be outside the observed range and may be unreliable.
Click a topic below to practice the foundational skills you'll need, learn the steps, or master this skill
Earned ?