17. Simple Linear Regression
Math 115
Example 1: Predicting Used Car Prices
A consumer website collected data on used Honda Civics for sale. They found a linear relationship between the car’s age (in years) and its listing price (in dollars). The least squares regression line is:
\[\widehat{price} = 22500 - 1850 \times age\]
where price is in dollars and age is in years.
(a) Interpret the slope in the context of this problem.
(b) Interpret the intercept in the context of this problem. Does this interpretation make sense?
(c) Predict the price of a 5-year-old Honda Civic.
(d) One of the cars in the dataset is a 5-year-old Civic listed at $14,200. Calculate the residual for this car.
(e) Based on the residual, is this car overpriced or underpriced compared to what the model predicts?
(a) Interpret the slope:
The slope is \(b_1 = -1850\).
For each additional year of age, we expect the price of a used Honda Civic to decrease by $1,850, on average.
(b) Interpret the intercept:
The intercept is \(b_0 = 22500\).
The predicted price of a 0-year-old (brand new) Honda Civic is $22,500.
This interpretation is somewhat reasonable — it represents the predicted price of a new car according to this model. However, we should be cautious because the data likely only includes cars that are at least 1-2 years old, so this may be a slight extrapolation.
(c) Predict the price of a 5-year-old Civic:
\[\widehat{price} = 22500 - 1850 \times 5 = 22500 - 9250 = \$13,250\]
The model predicts a 5-year-old Honda Civic would be listed at $13,250.
(d) Calculate the residual:
The residual is the difference between the observed value and the predicted value:
\[e = y - \hat{y} = \text{Observed} - \text{Predicted}\]
\[e = 14200 - 13250 = \$950\]
The residual is $950.
(e) Overpriced or underpriced?
Since the residual is positive ($950 > 0), the observed price ($14,200) is higher than what the model predicts ($13,250).
This car is overpriced by $950 compared to the model’s prediction for a typical 5-year-old Civic.
Example 2: Screen Time and Sleep
A health researcher studied the relationship between daily screen time (hours spent on phones, tablets, and computers) and sleep quality among college students. The scatterplot below shows the data with the least squares regression line.
The coefficient of determination is \(R^2 = 0.59\).
(a) Interpret \(R^2 = 0.59\) in the context of this problem.
(b) Calculate the correlation coefficient \(r\).
(c) Describe the relationship between screen time and sleep quality (direction and strength).
(a) Interpret R²:
\(R^2 = 0.59\) means:
59% of the variability in sleep quality scores can be explained by the linear relationship with daily screen time.
The remaining 41% of the variability in sleep quality is due to other factors not captured by this model (stress, caffeine intake, exercise habits, etc.).
(b) Calculate the correlation coefficient:
For simple linear regression, \(R^2 = r^2\), so:
\[r^2 = 0.59\] \[r = \pm\sqrt{0.59} = \pm 0.8\]
Looking at the scatterplot, the relationship is negative (as screen time increases, sleep quality decreases). Therefore:
\[r = -0.77\]
(c) Describe the relationship:
Direction: Negative — as daily screen time increases, sleep quality tends to decrease.
Strength: The correlation of \(r = -0.77\) indicates a strong negative linear relationship.
In context: Students who spend more time on screens tend to have lower sleep quality scores. The relationship is fairly strong, with screen time explaining about 59% of the variation in sleep quality.
Example 3: Matching Correlations to Scatterplots
Below are four scatterplots (A, B, C, D) showing different relationships between two variables, each with a least squares regression line. Match each scatterplot to its correlation coefficient from the list: r = 0.95, r = 0.45, r = -0.72, r = -0.15
Matching:
| Plot | Correlation | Reasoning |
|---|---|---|
| A | r = 0.45 | Positive slope (upward trend), moderate scatter around the line |
| B | r = -0.72 | Negative slope (downward trend), points fairly close to the line |
| C | r = 0.95 | Positive slope, points very tightly clustered around the line |
| D | r = -0.15 | Slight negative slope, very weak relationship with lots of scatter |
How to approach this:
First, identify the direction:
- Positive slope (line goes up) → positive r
- Negative slope (line goes down) → negative r
Plots A and C have positive slopes → r = 0.95 or r = 0.45
Plots B and D have negative slopes → r = -0.72 or r = -0.15
Then, assess the strength:
- Points tightly clustered around line → |r| close to 1
- Points widely scattered → |r| close to 0
Plot C has very tight clustering → r = 0.95
Plot A has moderate scatter → r = 0.45
Plot B has moderate-to-tight clustering → r = -0.72
Plot D has very loose scatter → r = -0.15