Regression analysis practice problems AP Statistics, Unit 5
Scatterplots, correlation, the least-squares regression line, residuals and r2, and the cautions of extrapolation and influential points. Try each question before you look: use the hint if you are stuck, then reveal the worked solution one step at a time.
On this page
Key equations for regression analysis
| ŷ = a + bx | least-squares regression line |
|---|---|
| b = r(sy/sx) | slope |
| a = ȳ − b x̄ | intercept: the line passes through (x̄, ȳ) |
| residual = y − ŷ | actual minus predicted |
The formulas and tables are provided in the exam. Answers within 2.5% are marked correct (5% for probabilities), so values from a table or a calculator both count. The full sheet is in our AP Statistics formula sheet.
Warm-up questions
Quick checks on the core ideas. If these feel easy, go straight to the exam-style questions.
Hint
Substitute x = 5.
Worked solution
- ŷ = 3 + 2 × 5 = 13.
Hint
Residual = actual − predicted.
Worked solution
- Residual = 15 − 13 = 2. The point lies above the line.
Hint
r2 is the coefficient of determination.
Worked solution
- r2 measures the share of the variation in the response explained by the regression on x.
- The answer is C. Here r = ±0.9, not 0.81.
Exam-style questions
Questions at the level of the AP Statistics exam. The ones marked Challenge combine more than one idea.
Hint
b = r(sy/sx).
Worked solution
- b = 0.8 × 10/4.
- b = 2.
Hint
The line passes through (x̄, ȳ).
Worked solution
- a = ȳ − b x̄ = 50 − 2 × 20.
- a = 10.
Hint
Square r.
Worked solution
- r2 = (−0.6)2 = 0.36, so 36%.
Hint
Is 30 inside the range of ages used to build the line?
Worked solution
- The line was fitted for ages 2 to 10; growth stops in adulthood, so the pattern does not continue.
- Predicting at age 30 is extrapolation: B.
Hint
Use your calculator's linear regression, or r = Σ(zxzy)/(n − 1).
Worked solution
- x̄ = 3, ȳ = 4. Σ(x − x̄)(y − ȳ) = 6, Σ(x − x̄)2 = 10, Σ(y − ȳ)2 = 6.
- r = 6/√(10 × 6) = 6/7.746.
- r = 0.775.
Free-response practice
One original question in the style of the exam's free-response section. Answer it in full, with working, before you open the scoring guide.
Regression style · 10 points · about 22 minutes
A café records the daily high temperature x (°C) and the number of iced drinks sold y on 20 randomly chosen days. Computer output gives the least-squares line ŷ = −12.5 + 4.2x, with r = 0.91 and s = 6.3.
- (a) Interpret the slope in context.
- (b) Predict sales on a day with a high of 25°C, and find the residual if 96 iced drinks were sold.
- (c) Calculate and interpret r2.
- (d) Interpret s = 6.3 in context.
- (e) The café manager says hot weather causes more iced drink sales. Can the data support this? Explain.
Write your full answer on paper first, then open the scoring guide and tick each point you earned.
Scoring guide and model answer
Part (a)
For each additional 1°C in daily high temperature, the predicted number of iced drinks sold increases by about 4.2.
Part (b)
ŷ = −12.5 + 4.2(25) = 92.5. Residual = 96 − 92.5 = 3.5.
Part (c)
r2 = 0.912 = 0.828. About 82.8% of the variation in daily iced drink sales is explained by the linear relationship with daily high temperature.
Part (d)
The actual number of iced drinks sold typically differs from the number predicted by the line by about 6.3 drinks.
Part (e)
Not from these data alone: this is an observational study, so other variables (such as weekends or school holidays) may be confounded with temperature.
Your mark: 0 of 10
Common mistakes in regression analysis
- Interpreting the slope without “predicted” or “on average”.
- Calculating the residual as predicted minus actual.
- Treating a strong correlation as proof of causation.
- Using the line to predict far outside the range of the data.
Keep going
Revise the ideas behind these questions:
Then try real exam questions: AP Statistics past papers, with official scoring guidelines. · All AP Statistics units