AP Statistics

Unit 5

Regression Analysis

5 topics · 23 practice questions · Free response

Notes

Scatterplots

Describe direction (positive or negative), form (linear or curved), strength, and unusual features, in context. The explanatory variable goes on the $x$-axis and the response on the $y$-axis.

Correlation

The correlation $r$ measures the direction and strength of a linear relationship. $-1 \le r \le 1$.

  • $r$ has no units and doesn't change if you switch $x$ and $y$ or change units.
  • $r$ is not resistant: one outlier can change it a lot.
  • Correlation doesn't imply causation. A lurking variable may drive both.

Least-squares regression

$\hat y = a + bx$, where $\hat y$ is the predicted response.

  • Slope $\displaystyle b = r\frac{s_y}{s_x}$: "for each additional 1 [unit of $x$], the predicted [$y$] increases by $b$ [units]."
  • $y$-intercept $a$: the predicted $y$ when $x = 0$ (only meaningful if $x = 0$ makes sense).
  • The line always passes through $(\bar x, \bar y)$ and minimizes the sum of squared residuals.
  • Residual $= y - \hat y$ (actual minus predicted). Positive means the model underpredicted.
  • Residual plot: no pattern means a linear model is appropriate; a curve means it isn't.
  • $r^2$: the percent of the variation in $y$ explained by the linear model with $x$.
  • Standard deviation of residuals $s$: the typical prediction error.
  • Extrapolation (predicting outside the range of $x$ values in the data) is unreliable.

Topics in this unit

Each topic has its own short notes and practice.

Practice

Which describes $r = -0.92$?
The regression line is $\hat y = 12 + 3.5x$. What is the predicted $y$ when $x = 4$?
For the same line, a point has $x = 4$ and $y = 23$. What is its residual?
$r^2 = 0.81$ for a model predicting weight from height. Which interpretation is correct?
A residual plot shows a clear U-shaped curve. What does this suggest?
Ice cream sales and drowning deaths have a strong positive correlation. The best explanation is:
The line $\hat y = 5 + 2x$ was fit to data with $x$ from 10 to 30. Predicting $y$ at $x = 80$ is risky because of:
If $r = 0.6$, $s_x = 2$ and $s_y = 10$, what is the slope of the least-squares line?

Free response

Write your answer first, then open the scoring guide.

Free-response question

For 20 used cars, a regression of price (in thousands of dollars) on age (in years) gives $\widehat{\text{price}} = 28.4 - 1.9(\text{age})$, with $r^2 = 0.72$ and $s = 2.6$.

(a) Interpret the slope in context.

Show the answer and scoring guide

For each additional year of age, the predicted price of a used car decreases by about 1.9 thousand dollars.

Check off the points you earned:

(b) Predict the price of a 6-year-old car and find the residual for one that sold for 18.1 thousand dollars.

Show the answer and scoring guide

$28.4 - 1.9(6) = 17.0$ thousand dollars. Residual $= 18.1 - 17.0 = 1.1$ thousand; the model underpredicted by about 1,100 dollars.

Check off the points you earned:

(c) Interpret $s = 2.6$.

Show the answer and scoring guide

The actual prices typically differ from the prices predicted by the model by about 2.6 thousand dollars.

Check off the points you earned: