4.10 Regression line of x on y
Studying this course? Keep your progress in one place.
Key facts
- on predicts from ; on predicts from . Never swap them.
- Find on the GDC with as the independent list; do not rearrange the on line.
- Both lines pass through , so they intersect there.
- The lines are the same only when .
- Predictions are reliable only with strong correlation and interpolation.
Why are there two regression lines?
One minimises vertical distances to predict ; the other minimises horizontal distances to predict .
The regression line of on is the least squares line that minimises the squared vertical distances from the points. It predicts from a given .
The regression line of on , written , minimises the squared horizontal distances. It predicts from a given .
The lines differ unless the correlation is perfect (); the weaker the correlation, the further apart they are. Ask 'which variable am I predicting?' That variable goes on the left of the line you use.
You want to predict x from a given value of y. Which line do you use?
Finding the x on y line
Swap the lists on the GDC so is the independent list, then rewrite the result as .
On a GDC, enter the data in two lists and run linear regression with the lists swapped: as the independent variable and as the dependent list. The calculator returns an equation in its own letters; rewrite it as .
For sleep hours and reaction time ms, the calculator gives , while the on line is .
Give coefficients to 3 significant figures, but keep full accuracy in the calculator for predictions.
- 1
Enter the data
two lists, x and y
- 2
Swap the lists
y independent, x dependent
- 3
Run linear regression
read the coefficients
- 4
Rewrite
as x = cy + d
Worked example
Data: . Find the on line and predict when .
- 1
Enter the -values as the independent list and the -values as the dependent list.
- 2
The calculator gives . (The on line is .)
- 3
Substitute : .
When finding the x on y line on a GDC, which list is the independent list?
The mean point
Both pass through the mean point , so they intersect there.
Every least squares regression line passes through the mean point. So:
- the two lines intersect at the mean point, and solving them simultaneously gives and ;
- if you know one mean and one line, substitute to find the other mean;
- an unknown data value can be found from a given mean, for example gives .
To verify a line passes through the mean point, substitute one mean and show you get the other.
- Both lines pass through
- Solve simultaneouslyto find and
Worked example
The regression lines are and . Find the mean point.
- 1
Substitute the first into the second: .
- 2
Expand: , so and .
- 3
Then .
and the on line is . What is ?
Prediction and reliability
When you use the correct line, the correlation is strong and the value lies within the data range.
A prediction is more reliable when the correct line is used ( on to predict ), the correlation is strong ( close to 1), and the given value lies within the range of the data (interpolation).
Predicting outside the range is extrapolation; the pattern may not continue. If the reaction times run from 248 ms to 305 ms, estimating sleep for 340 ms is extrapolation.
A strong correlation does not rescue an extrapolation. In an exam comment, refer to both and the range of the data.
Reliable
- Correct line used
- Strong correlation, |r| near 1
- Inside the data range
Unreliable
- Wrong line used
- Weak correlation
- Outside the data range
The reaction times in the data run from 248 ms to 305 ms. Which given value is interpolation?
Try an exam question
The regression line of on is and the regression line of on is . The -values in the data range from 20 to 50 and . (a) Find the mean point. (b) Use the appropriate line to estimate when . (c) Comment on the reliability of this estimate.
[4 marks]
- [1]Solves simultaneously: .
- [1] and .
- [1]Uses the on line: .
- [1]Reliable: 40 is within the range 20 to 50 (interpolation) and shows strong correlation.
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find the mean point of the data.
1 mark, marked against the mark scheme
Find the mean point of the data.
1 mark, marked against the mark scheme