Practice Least Squares Regression Line in Math

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

The unique straight line y^=a+bx\hat{y} = a + bx that minimizes the sum of squared vertical distances (residuals) between the observed data points and the line.

You have a scatter plot with points scattered around a general trend. The LSRL is the line that gets as close as possible to all the points simultaneouslyβ€”it's the 'best' straight line through the cloud. 'Best' means it minimizes the total squared prediction error.

Showing a random 20 of 50 problems.

Example 1

medium
A slope is computed as b=rsysxb = r \frac{s_y}{s_x} with b=3b = 3 and sysx=5\frac{s_y}{s_x} = 5. Find rr.

Example 2

challenge
A regression on temperature (xx, in ∘^\circC) gives y^=2+0.5x\hat{y} = 2 + 0.5x. If temperature is re-expressed in tenths of a degree (xβ€²=10xx' = 10x), what is the new slope?

Example 3

medium
For the LSRL passing through (xˉ,yˉ)=(3,6.6)(\bar{x},\bar{y}) = (3, 6.6) with slope 1.71.7, write the equation.

Example 4

hard
A regression has slope b=3b=3. If yy is rescaled to yβ€²=2yy' = 2y, what is the new slope?

Example 5

medium
Given xˉ=4\bar{x}=4, yˉ=20\bar{y}=20, r=0.8r=0.8, sx=2s_x=2, sy=5s_y=5, find the LSRL.

Example 6

medium
A line passes through (xˉ,yˉ)=(8,30)(\bar{x},\bar{y}) = (8, 30) with slope b=2.5b = 2.5. Find its equation.

Example 7

easy
In y^=7βˆ’2x\hat{y} = 7 - 2x, what is the y-intercept?

Example 8

hard
The LSRL for predicting weight (yy, kg) from height (xx, cm) is y^=βˆ’100+0.8x\hat{y} = -100 + 0.8x. Interpret the slope and intercept, predict weight for height=175 cm, and explain why extrapolating to height=50 cm is problematic.

Example 9

challenge
Given that the LSRL of yy on xx has slope byxb_{yx} and the LSRL of xx on yy has slope bxyb_{xy}, show byxβ‹…bxy=r2b_{yx} \cdot b_{xy} = r^2.

Example 10

medium
In y^=200βˆ’0.5x\hat{y} = 200 - 0.5x, yy is weight (lb) and xx is age in days for a dieting program. Interpret the intercept and say whether it is meaningful.

Example 11

medium
Two data points lie exactly on y^=2+3x\hat{y} = 2 + 3x: (1,?)(1, ?) and (4,?)(4, ?). Find both predicted values.

Example 12

medium
What does it mean if r2=1r^2 = 1 for a regression?

Example 13

easy
In y^=10+4x\hat{y} = 10 + 4x where yy is cost in dollars and xx is hours, interpret the slope.

Example 14

hard
The LSRL has the property of minimizing βˆ‘ei2=βˆ‘(yiβˆ’y^i)2\sum e_i^2 = \sum (y_i - \hat{y}_i)^2. Explain why minimizing squared residuals (rather than absolute residuals) is preferred, and name two consequences of this choice.

Example 15

medium
Find the least-squares regression line for: (x,y)(x,y): (1,2),(2,4),(3,5),(4,4),(5,5)(1,2), (2,4), (3,5), (4,4), (5,5). Use b=rsysxb = r \frac{s_y}{s_x} and a=yΛ‰βˆ’bxΛ‰a = \bar{y} - b\bar{x}.

Example 16

medium
A model y^=100+5x\hat{y} = 100 + 5x predicts plant height (cm) from days xx. Why is predicting height at x=10,000x = 10{,}000 days unwise?

Example 17

medium
Using y^=26+1.2x\hat{y} = 26 + 1.2x, predict yy at x=30x = 30.

Example 18

medium
Compute slope: r=βˆ’0.6r = -0.6, sy=12s_y = 12, sx=4s_x = 4.

Example 19

medium
Why is predicting yy at an xx-value far outside the observed range dangerous? Give one example.

Example 20

medium
Given five data points (1,3),(2,5),(3,7),(4,8),(5,10)(1,3), (2,5), (3,7), (4,8), (5,10), compute xˉ\bar{x} and yˉ\bar{y}.