Lesson 2 of 7 · 15 min

The line from summary statistics

Find the least-squares line from r, the two standard deviations and the two means using the formula-book rules, and work backwards from the slope to r.

What you will be able to do

  • Use m=rsysxm = r\frac{s_y}{s_x} to find the slope of the least-squares line.
  • Use c=yˉ−mxˉc = \bar{y} - m\bar{x} to find the intercept, keeping the unrounded slope.
  • Rearrange the slope rule to find rr, and then R2R^2.

A research report rarely prints its raw data. A study of 120 Queensland Year 12 students might give only the summary: the mean and standard deviation of arm span, the mean and standard deviation of height, and rr. That is still enough to find the least-squares line — and your formula book has the rules.

In the QCAA formula book
m=rsysxc=yˉ−mxˉm = r\frac{s_y}{s_x} \qquad c = \bar{y} - m\bar{x}

Here sxs_x and sys_y are the sample standard deviations of the xx and yy values, and xˉ\bar{x} and yˉ\bar{y} are their means.

The slope rule says: start at the mean point. Move one standard deviation of xx to the right. If rr were 1 the line would rise by a full standard deviation of yy; with a weaker association it rises by only rr of one.

The line passes through (xˉ,yˉ)(\bar{x}, \bar{y}). A run of sxs_x gives a rise of rsyr s_y, so the slope is rsysx\frac{r s_y}{s_x}.

Key idea

Two consequences of the rules

  • The slope has the same sign as rr. Standard deviations are always positive, so a negative association gives a negative slope.
  • The line passes through (xˉ,yˉ)(\bar{x}, \bar{y}). Rearranging c=yˉ−mxˉc = \bar{y} - m\bar{x} gives yˉ=mxˉ+c\bar{y} = m\bar{x} + c.

For a data set, r=0.75r = 0.75, sx=4s_x = 4 and sy=12s_y = 12. Find the slope of the least-squares line.

Worked example

The least-squares line from summary statistics

  • Simple familiar
  • Technology active

A study of 120 Queensland Year 12 students recorded each student's arm span and height. The summary statistics are:

MeanStandard deviation
Arm span, xx (cm)172.49.6
Height, yy (cm)171.09.1

and r=0.92r = 0.92. Determine the equation of the least-squares line for predicting height from arm span, with coefficients correct to two decimal places.

3 steps

Try it yourself first, then check the working one step at a time.

Method

  1. m=rsysxm = r\frac{s_y}{s_x}, with the response variable's standard deviation on top.

  2. c=yˉ−mxˉc = \bar{y} - m\bar{x}, using the unrounded slope.

  3. Round at the end and write the equation in context.

Watch out for

  • Using sxsy\frac{s_x}{s_y} instead of sysx\frac{s_y}{s_x}.

  • Rounding the slope before calculating the intercept.

Common mistake

Rounding the slope too early

In the arm span example, using the rounded slope 0.87 gives c=171−0.87×172.4=21.01c = 171 - 0.87 \times 172.4 = 21.01 instead of 20.65. A small change in mm is multiplied by xˉ=172.4\bar{x} = 172.4. Keep the unrounded slope in your calculator's memory and round only the final answers.

A least-squares line has slope m=2.25m = 2.25. The means are xˉ=20\bar{x} = 20 and yˉ=50\bar{y} = 50. Find the yy-intercept cc.

The slope rule also works backwards. If you know the slope and both standard deviations, rearrange for rr:

r=msxsyr = m\frac{s_x}{s_y}

Then square rr for the coefficient of determination.

Worked example

Work backwards from the slope to rr and R2R^2

  • Complex familiar
  • Technology active

For a class of General Mathematics students, the least-squares line for predicting exam mark (%) from hours of study per week has a slope of 2.4. The standard deviation of hours of study is 3.5 hours and the standard deviation of exam marks is 12.0%.

a) Determine the correlation coefficient rr.

b) Determine and interpret the coefficient of determination.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Rearrange m=rsysxm = r\frac{s_y}{s_x} to r=msxsyr = m\frac{s_x}{s_y}.

  2. The sign of rr matches the sign of the slope.

  3. Square rr and interpret R2R^2 as the percentage of variation in the response explained by the explanatory variable.

Watch out for

  • Calculating msysxm\frac{s_y}{s_x}, which gives 8.23 — impossible for rr, which must lie between −1-1 and 1.

  • Reversing the variables in the interpretation of R2R^2.

The least-squares line for a data set is y=1.5x+4y = 1.5x + 4, and xˉ=6\bar{x} = 6. What is yˉ\bar{y}?

Exam tip

Show the substitution

Write the rule, then the numbers, then the answer: m=rsysx=0.92×9.19.6=0.872m = r\frac{s_y}{s_x} = 0.92 \times \frac{9.1}{9.6} = 0.872. If you make an arithmetic slip, the substitution still earns the method mark.

Summary

  • m=rsysxm = r\frac{s_y}{s_x} and c=yˉ−mxˉc = \bar{y} - m\bar{x} are in the formula book.

  • The slope has the same sign as rr, and the line passes through (xˉ,yˉ)(\bar{x}, \bar{y}).

  • Keep the unrounded slope when you calculate the intercept.

  • Work backwards with r=msxsyr = m\frac{s_x}{s_y}, then R2=r2R^2 = r^2.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 2 of 70% read

Save your progress with a free account