Open the app

Regression Analysis

Unit 5 of AP Statistics, worth 10–20% of the exam. 14 questions below, each with the working. Every answer was checked by a second pass before it was published.

Scatterplots, correlation, least-squares regression, residuals, transformations, inference for the slope.

How this unit is tested

Start every regression problem by describing the scatterplot in words: form (linear or curved), direction (positive/negative), strength (weak/moderate/strong), and any outliers or unusual points — the AP reader wants all four elements stated explicitly. Once the relationship looks linear, move to correlation r and the least-squares regression line (LSRL): know that r measures strength and direction only (it says nothing about slope size), and that the LSRL minimizes the sum of squared residuals, giving slope $b_1 = r\,s_y/s_x$ and intercept $b_0 = \bar y - b_1\bar x$. After fitting a line, always check it with residuals. Compute a residual as observed minus predicted, and read a residual plot for two things: curvature (means linear model is wrong) and fanning (means variance is not constant). If the scatterplot itself is curved, consider a transformation — most commonly taking the log of y (for exponential growth) or of both x and y (for power models) — then fit the LSRL to the transformed data and remember to back-transform predictions. Finally, inference for the slope is a t-procedure just like inference for a mean, but applied to $b_1$: check the LINER conditions (Linear, Independent, Normal residuals, Equal spread, Random) before trusting a confidence interval or test, then use $t=(b_1-0)/SE_{b_1}$ with $df=n-2$. On the exam, every regression answer needs three things: correct notation, context in every interpretation sentence, and justification that conditions were checked before inference — losing any one of these costs points even with correct arithmetic.

What you have to know

Correlation coefficient
$r = \dfrac{1}{n-1}\sum \left(\dfrac{x_i-\bar x}{s_x}\right)\left(\dfrac{y_i-\bar y}{s_y}\right)$. Measures the strength and direction of a linear relationship; $-1\le r\le 1$, and r is unaffected by which variable is x or y, or by linear unit changes.
Least-squares regression line
The line that minimizes the sum of squared residuals, with slope $b_1 = r\,\dfrac{s_y}{s_x}$ and intercept $b_0 = \bar y - b_1\bar x$; the line always passes through $(\bar x,\bar y)$.
Residual
$\text{residual} = y_i - \hat y_i$ (observed minus predicted). The LSRL makes the sum of residuals zero and the sum of squared residuals as small as possible.
Coefficient of determination
$r^2$ is the proportion of the variation in y that is explained by the least-squares regression on x.
Conditions for inference on the slope (LINER)
Linear relationship (no pattern in residual plot), Independent observations, Normal distribution of residuals (or large n), Equal standard deviation of residuals across x, Random sample or random assignment.
t-test and CI for the slope
Test statistic $t = \dfrac{b_1-0}{SE_{b_1}}$ with $df=n-2$ under $H_0:\beta_1=0$; confidence interval is $b_1 \pm t^{*}\,SE_{b_1}$.

14 practice questions

  1. A scatterplot of engine size (liters) vs highway mpg shows a consistent downward linear pattern with little scatter, except one hybrid car with a small engine and unusually high mpg. Describe the association and this car's role in the data.
    Show the answer

    Answer. The association is negative, linear, and fairly strong; the hybrid car is an outlier because it deviates sharply from the overall pattern (and could be influential if it pulls the slope toward zero).

    Describing a scatterplot requires stating form, direction, strength, and outliers. A point that departs from the pattern in y for its x-value is an outlier; whether it's influential depends on its effect on the fitted line.
  2. The correlation between height in inches and weight in pounds for a group of adults is r = 0.82. If height is converted to centimeters, what is the new correlation?
    Show the answer

    Answer. 0.82 (unchanged)

    Correlation is invariant under linear transformations of either variable, including unit conversions, because r is a standardized measure of linear association.
  3. In simple linear regression, r² = 0.72 for a model predicting plant height from monthly rainfall. Which is the correct interpretation?
    Show the answer

    Answer. 72% of the variation in plant height is explained by the linear relationship with rainfall.

    r² is always interpreted as a percentage of variation in the response explained by the explanatory variable, not as the correlation itself or as prediction accuracy for individual points.
  4. A regression of monthly sales (in $1000s) on advertising spend (in $1000s) gives ŷ = 12.5 + 2.3x. Interpret the slope in context.
    Show the answer

    Answer. For each additional $1000 spent on advertising, predicted monthly sales increase by $2,300, on average.

    Slope interpretations must include units and context: it describes the average predicted change in y per one-unit increase in x.
  5. A regression predicts exam score as ŷ = 55.2 + 3.85x, where x is hours studied. A student who studied 6 hours actually scored 80. Find the residual for this student.
    Show the answer

    Answer. 1.7

    Predicted score: ŷ = 55.2 + 3.85(6) = 78.3. Residual = observed − predicted = 80 − 78.3 = 1.7, meaning the student scored 1.7 points higher than predicted.
  6. A residual plot for a fitted linear model shows a clear U-shaped (curved) pattern when residuals are plotted against x. What does this indicate, and what should be done?
    Show the answer

    Answer. The linear model is not appropriate — the true relationship is curved. A transformation of the data or a nonlinear model should be used instead.

    A random, patternless scatter of residuals supports linearity; systematic curvature in the residual plot reveals that a straight line fails to capture the relationship.
  7. A company's regression of profit on years since founding uses data from years 1 through 10 and gives ŷ = 2 + 1.5x. A student uses this equation to predict profit at year 50. What is the statistical problem with this prediction?
    Show the answer

    Answer. Extrapolation: predicting far outside the range of observed x-values, where the linear relationship may no longer hold.

    Regression models are only supported by the data used to build them; using x-values well beyond that range gives unreliable predictions.
  8. Explain the difference between an outlier and an influential point in regression.
    Show the answer

    Answer. An outlier is a point that lies far from the overall pattern (usually a large residual), while an influential point is one whose removal substantially changes the slope or intercept, typically because it has an extreme x-value (high leverage). A point can be one, both, or neither.

    Distinguishing these requires checking the effect of removing the point on the fitted line, not just its visual distance from the trend.
  9. A scatterplot of population (y) versus year (x) shows a curve that increases faster and faster, characteristic of exponential growth. Which transformation is most likely to linearize this relationship?
    Show the answer

    Answer. Taking the log of y and plotting log(y) versus x

    An exponential model y = a·b^x becomes linear after log-transforming y: log(y) = log(a) + x·log(b), so log(y) vs x should appear linear.
  10. After a log transformation, a regression gives ln(ŷ) = 1.2 + 0.05x, where x is years since 2000. Predict ŷ when x = 10.
    Show the answer

    Answer. About 5.47

    ln(ŷ) = 1.2 + 0.05(10) = 1.7, so ŷ = e^1.7 ≈ 5.47. Predictions from a transformed model must be back-transformed to the original units.
  11. A residual plot for a linear regression shows residuals fanning out — small spread for low x, much larger spread for high x. Which condition for inference about the slope is violated?
    Show the answer

    Answer. Equal standard deviation of residuals (constant variance) across values of x.

    The LINER conditions require the spread of residuals to stay roughly constant across x; a fan shape signals non-constant variance, undermining standard inference procedures.
  12. Regression output gives b1 = 3.85, SE_b1 = 0.62, df = 8, and t* for 95% confidence with df = 8 is 2.306. Construct a 95% confidence interval for the true slope β1.
    Show the answer

    Answer. (2.42, 5.28)

    CI = b1 ± t*·SE_b1 = 3.85 ± 2.306(0.62) = 3.85 ± 1.43, giving an interval from about 2.42 to 5.28.
  13. For the hypothesis test H0: β1 = 0 vs Ha: β1 ≠ 0, the output gives t = 6.21, df = 8, and p < 0.001. State the conclusion at α = 0.05.
    Show the answer

    Answer. Reject H0; there is convincing statistical evidence of a linear relationship between the explanatory and response variables (the true slope is not 0).

    Since the p-value is far below α = 0.05, the observed slope is statistically significant, so we reject the null hypothesis of no linear relationship in favor of the alternative.
  14. A study finds a strong positive correlation (r = 0.89) between monthly ice cream sales and drowning deaths. Explain why this does not imply that ice cream sales cause drownings, and identify a likely confounding variable.
    Show the answer

    Answer. Correlation does not imply causation; a lurking (confounding) variable, temperature/season, likely drives both — hot weather increases both ice cream sales and swimming (and thus drowning risk).

    Two variables can be strongly associated because a third variable influences both, without any direct causal link between the two observed variables.

What people get wrong

  1. Interpreting r² as if it were r (e.g. saying 'r² = 0.72 means a strong correlation of 0.72'). Instead, always state r² as a percentage of variation explained, and square-root it (keeping the sign of the slope) if you actually need r.
  2. Extrapolating the regression line beyond the range of observed x-values and treating the prediction as reliable. Instead, explicitly flag predictions outside the data range as extrapolation and note the relationship may not hold there.
  3. Interpreting slope or intercept without units or context, e.g. 'y increases by 3.85' instead of 'exam score increases by 3.85 points, on average, for each additional hour studied.' The AP rubric requires context in every interpretation.
  4. Running a t-test or CI for the slope without first checking the residual plot for linearity and constant spread. Instead, state explicitly that the residual plot shows no pattern and roughly constant spread before proceeding to inference.
  5. Treating a strong correlation or significant slope as proof of causation. Instead, note that only a well-designed randomized experiment can support a causal claim; observational data may involve confounding.
  6. Assuming an outlier is automatically influential (or vice versa). Instead, check whether removing the point noticeably changes the slope/intercept — only then is it influential; an outlier is just a point far from the pattern in y.

Drill this unit until it sticks

These questions come back on a schedule built from what you get wrong, alongside the rest of AP Statistics. Free, and no account needed to start.

Start AP Statistics All 5 units