Ctrl+k

Construct and interpret regression models

Regression modeling represents the association between two quantitative variables with a fitted equation, typically a least-squares line y^=a+bx\hat y=a+bx, constructed from a scatterplot or data set and evaluated with residuals and R2R^2. 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.

Detailed Explanation: Construct and interpret regression models

A linear regression model describes the relationship between a quantitative explanatory variable xx and a quantitative response variable yy using

y^=a+bx,\hat y=a+bx,

where:

  • y^\hat y is the predicted value of yy,
  • bb is the slope,
  • aa is the yy-intercept.

Worked example

A teacher records the number of hours five students studied and their test scores.

Study time, xx (hours)Score, yy
152
255
361
464
568

1. Examine the scatterplot

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.

2. Find the regression equation

For these data, the means are

xˉ=3andyˉ=60.\bar x=3 \qquad\text{and}\qquad \bar y=60.

The least-squares slope is

b=(xxˉ)(yyˉ)(xxˉ)2=4110=4.1.b=\frac{\sum (x-\bar x)(y-\bar y)} {\sum (x-\bar x)^2} =\frac{41}{10}=4.1.

The intercept is

a=yˉbxˉ=60(4.1)(3)=47.7.a=\bar y-b\bar x =60-(4.1)(3)=47.7.

Therefore, the regression model is

y^=47.7+4.1x.\boxed{\hat y=47.7+4.1x}.

The least-squares line is chosen because it makes the sum of the squared residuals as small as possible.

3. Interpret the slope and intercept

The slope is 4.14.1. In context:

For each additional hour of studying, the predicted test score increases by about 4.14.1 points.

The intercept is 47.747.7. This means:

A student who studies 00 hours is predicted to score about 47.747.7 points.

The intercept may not be especially meaningful if 00 hours was not represented in the data, but it is needed to define the line.

4. Make a prediction

To predict the score for a student who studies 4.54.5 hours, substitute x=4.5x=4.5:

y^=47.7+4.1(4.5)=66.15.\hat y=47.7+4.1(4.5)=66.15.

The predicted score is about 66.266.2 points. Since 4.54.5 hours is between the observed values of 11 and 55, 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.

5. Use residuals to judge individual predictions

A residual is

residual=yy^,\text{residual}=y-\hat y,

or observed value minus predicted value.

For the student who studied 22 hours,

y^=47.7+4.1(2)=55.9.\hat y=47.7+4.1(2)=55.9.

The actual score was 5555, so the residual is

5555.9=0.9.55-55.9=-0.9.

The model overpredicted this student’s score by 0.90.9 points.

For all five students, the residuals are approximately

0.2,  0.9,  1.0,  0.1,  0.2.0.2,\;-0.9,\;1.0,\;-0.1,\;-0.2.

Residuals close to 00 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.

6. Interpret R2R^2

For this model,

R20.989.R^2\approx 0.989.

This means that about 98.9%98.9\% 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 R2R^2 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 2020 hours would be outside the observed range and may be unreliable.

Learn by doing: Construct and interpret regression models

Click a topic below to practice the foundational skills you'll need, learn the steps, or master this skill

Practice with unlimited practice problems

Graphing - Scatter Plot (Linear) - Graph to y = mx + b Form


    ?