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 to find the slope of the least-squares line.
- Use to find the intercept, keeping the unrounded slope.
- Rearrange the slope rule to find , and then .
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 . That is still enough to find the least-squares line — and your formula book has the rules.
Here and are the sample standard deviations of the and values, and and are their means.
The slope rule says: start at the mean point. Move one standard deviation of to the right. If were 1 the line would rise by a full standard deviation of ; with a weaker association it rises by only of one.
The line passes through . A run of gives a rise of , so the slope is .
Key idea
Two consequences of the rules
- The slope has the same sign as . Standard deviations are always positive, so a negative association gives a negative slope.
- The line passes through . Rearranging gives .
For a data set, , and . Find the slope of the least-squares line.
Worked example
The least-squares line from summary statistics
A study of 120 Queensland Year 12 students recorded each student's arm span and height. The summary statistics are:
| Mean | Standard deviation | |
|---|---|---|
| Arm span, (cm) | 172.4 | 9.6 |
| Height, (cm) | 171.0 | 9.1 |
and . Determine the equation of the least-squares line for predicting height from arm span, with coefficients correct to two decimal places.
Step 1: Find the slope
The formula book rule. goes on top because (height) is the response variable.
Step 2: Find the intercept with the unrounded slope
The slope is multiplied by 172.4, so rounding it to 0.87 first would give , which is wrong to two decimal places.
Step 3: Write the equation
Try it yourself first, then check the working one step at a time.
Answer
(both in cm).
Method
, with the response variable's standard deviation on top.
, using the unrounded slope.
Round at the end and write the equation in context.
Watch out for
Using instead of .
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 instead of 20.65. A small change in is multiplied by . Keep the unrounded slope in your calculator's memory and round only the final answers.
A least-squares line has slope . The means are and . Find the -intercept .
The slope rule also works backwards. If you know the slope and both standard deviations, rearrange for :
Then square for the coefficient of determination.
Worked example
Work backwards from the slope to and
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 .
b) Determine and interpret the coefficient of determination.
Step 1: Rearrange the slope rule
, so .
Multiply both sides by and divide by .
Step 2: Substitute
The slope is positive, so is positive: a moderate positive linear association.
Step 3: Square for R²
Step 4: Interpret in context
49% of the variation in exam marks can be explained by the variation in hours of study per week.
Try it yourself first, then check the working one step at a time.
Answer
and : 49% of the variation in exam marks can be explained by the variation in hours of study per week.
Method
Rearrange to .
The sign of matches the sign of the slope.
Square and interpret as the percentage of variation in the response explained by the explanatory variable.
Watch out for
Calculating , which gives 8.23 — impossible for , which must lie between and 1.
Reversing the variables in the interpretation of .
The least-squares line for a data set is , and . What is ?
Exam tip
Show the substitution
Write the rule, then the numbers, then the answer: . If you make an arithmetic slip, the substitution still earns the method mark.
Summary
and are in the formula book.
The slope has the same sign as , and the line passes through .
Keep the unrounded slope when you calculate the intercept.
Work backwards with , then .
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.