The least-squares regression line

About this lesson

Grade 8 › Associations in data

To save a PDF, choose “Save as PDF” in the print dialog.

The least-squares regression line

Associations in data. scatter plots, line of best fit, trends, two-way tables, association

Warm-up

Three quick questions from earlier lessons.

Discover

If r=1r = 1, every point is on a line. A student 1 SD above the mean in xx is then 1 SD above the mean in yy. If r=0.5r = 0.5, how many SDs above the mean in yy would you predict?

  1. 0.5 SD
  2. 1 SD

Key idea

The line that minimizes the sum of squared residuals.

Least-squares regression line y^=a+bx\hat{y} = a + bx with slope b=r sysxb = r\,\dfrac{s_y}{s_x} and intercept a=yˉ−bxˉa = \bar{y} - b\bar{x}; it always passes through (xˉ,yˉ)(\bar{x}, \bar{y}).

Worked example

r=0.6r = 0.6, xˉ=10\bar{x} = 10, sx=2s_x = 2, yˉ=50\bar{y} = 50, sy=8s_y = 8.

  1. Step 1The data.
  2. Step 2The point of means (x̄, ȳ) = (10, 50).
  3. Step 3The line ŷ = 26 + 2.4x passes through it.
  4. Step 4Residuals: no other line makes the sum of their squares smaller.

b=2.4b = 2.4
0.6 × 8/2.
a=26a = 26
50 − 2.4 × 10.
y^=26+2.4×12=54.8\hat{y} = 26 + 2.4 \times 12 = 54.8
At x = 12.

Your turn, guided

Your turn: r=0.5r = 0.5, sx=4s_x = 4, sy=6s_y = 6. The slope.

b=0.75b = 0.75
0.5 × 6/4.

Practice ★

  1. r=0.6r = 0.6, sx=15s_x = 15 and sy=16s_y = 16. Find the slope of the least-squares regression line of yy on xx.
  2. r=0.5r = 0.5, sx=11s_x = 11 and sy=17s_y = 17. Find the slope of the least-squares regression line of yy on xx.
  1. The regression line is y^=27+9x\hat{y} = 27 + 9x. Predict yy for x=7x = 7.

Watch out!

Practice ★★

  1. The least-squares line has slope 22, and xˉ=37\bar{x} = 37, yˉ=52\bar{y} = 52. Find its intercept.
  2. The least-squares line has slope 55, and xˉ=28\bar{x} = 28, yˉ=53\bar{y} = 53. Find its intercept.
  1. Boss problem. r=0.8r = 0.8, xˉ=15\bar{x} = 15, sx=4s_x = 4, yˉ=42\bar{y} = 42, sy=8s_y = 8.

Exit ticket

Three questions to check you have got it.

  1. r=0.6r = 0.6, sx=15s_x = 15 and sy=16s_y = 16. Find the slope of the least-squares regression line of yy on xx.
  2. r=0.5r = 0.5, sx=11s_x = 11 and sy=17s_y = 17. Find the slope of the least-squares regression line of yy on xx.
  3. r=0.9r = 0.9, sx=19s_x = 19 and sy=12s_y = 12. Find the slope of the least-squares regression line of yy on xx.

Summary card

Least-squares line

b=r sy/sxb = r\,s_y/s_x, a=yˉ−bxˉa = \bar{y} - b\bar{x}, through (xˉ,yˉ)(\bar{x}, \bar{y}).

Watch out: sys_y on top.

CC BY-SA 4.0