Find the regression line of x on y with a GDC, choose the right regression line for a prediction, and use the facts that both lines pass through the mean point and coincide only when r = ±1.
Each is in the Maths AA glossary, with every other term in the subject.
The least squares line that minimises the sum of the squares of the horizontal distances from the data points to the line. It is used to predict from a given value of .
14 exam-style questions on this subtopic, written in the style of the IB papers. The first has its markscheme open. Counted on
A librarian surveys a group of students. For each student, the number of hours spent reading each week, , and their score in a reading test, , are recorded.
For these data, the regression line of on is
One of 27 short multiple-choice questions on 4.10. Pick an answer to see why it's right or wrong.
The diagram shows a line fitted to a scatter of points, with the horizontal distance from each point to the line. The line minimises the sum of the squares of these distances. Which line is it?

With a free account, Augment remembers where you stopped and what you have practiced.
Choose the correct regression line for a prediction and use it to estimate from a given value of .
Find the mean point from the equations of the two regression lines.
Describe how the two regression lines depend on the value of , and state when they coincide.
The regression line of on is built to predict from a known value of . Many situations need the reverse: estimating a father's height from his son's, or the body weight of an animal from the weight of one of its organs. When both variables vary naturally and either may be the one that is known, there are two regression lines, one for each direction of prediction.
The two lines answer different questions, so they generally have different equations. Understanding why they differ, and which one to use, prevents one of the most common errors in statistics.
The regression line of on is the line that makes the sum of the squares of the vertical distances from the points to the line as small as possible. Vertical distances are errors in , so this line gives the best predictions of when is known.
To predict when is known, the errors that matter are errors in , which are horizontal distances. The line that makes the sum of the squares of the horizontal distances as small as possible is a different line, the regression line of on . Unless every point lies exactly on a straight line, the two lines are not the same.

The regression line of x on y is written with as the subject, , to show that it gives in terms of . Here is the change in for each increase of one unit in , on average, and is the predicted value of when .
A GDC calculates the regression line of on with the same linear regression function as for on , with the roles of the two lists swapped.
Enter the -values in list 1 and the -values in list 2, as before.
Run linear regression with list 2 as the "x-list" and list 1 as the "y-list". The calculator then treats as the independent variable.
The calculator displays the result as "", because it always uses those letters. Write it with the original variables: the gradient it gives is and the intercept is , so the line is .
The value of is the same whichever way round the lists are entered.
The table gives the body weight, kg, and heart weight, g, of ten adult cats.
Body weight, (kg) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Heart weight, (g) |
Data: ten of the 144 cats measured by R. A. Fisher, Biometrics, 1947.
The rule depends only on which variable is known and which is to be estimated.
Known value | To estimate | Use | Form |
|---|---|---|---|
regression line of on | |||
regression line of on |
Rearranging one line to make the other variable the subject does not give the other line. The rearranged line minimises errors in the wrong direction, so its predictions are biased, and the weaker the correlation, the larger the error.
The heights of fathers and their adult sons, collected in the 1880s, show the effect clearly. The correlation is weak (), so the two regression lines cross at a wide angle at the mean point.

The correct answer to part 1 shows an effect that Galton called "regression towards the mean", and which gave regression its name. Very tall sons tend to have fathers who are tall, but closer to average than the sons themselves; very tall fathers, in the same way, tend to have sons closer to average. Because the correlation is far from perfect, each prediction is pulled towards the mean of the variable being predicted.
Each regression line passes through the mean point . Since this point lies on both lines, it is the point where they intersect. When the equations of both lines are known, and can be found by solving them as a pair of simultaneous equations, without a GDC.
The same fact gives questions in which a missing data value is found from the line of on , exactly as with the line of on .
How far apart the two lines are depends on the strength of the correlation. If every point lies on one straight line ( or ), the vertical and horizontal distances are all for that line, so it is the best line in both directions and the two regression lines are the same. As decreases, the lines open out like a pair of scissors about the mean point. When , the line of on is horizontal () and the line of on is vertical (): knowing one variable then gives no information about the other, so the best estimate is simply its mean.

The reason can be seen from the gradients. Writing and for the standard deviations of the two variables, the gradients of the two lines are
These formulas are not needed for calculations, which are done on a GDC, but they explain three facts. Both gradients have the same sign as . Their product is . And the rearranged line of on has gradient in the "" form, which equals only when , that is, when .
Questions on this subtopic usually build on a regression question from 4.4: after finding the line of on and making a prediction, a later part gives a value of and asks for an estimate of , which needs the second regression line.
The table gives the heights, in centimetres, of ten fathers, , and their adult sons, .
Father, (cm) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Son, (cm) |
Data: ten of the families measured by F. Galton, 1886, converted to centimetres and rounded.
I can explain why the regression line of on minimises horizontal distances, and why it differs from the line of on .
I can find the regression line of on with a GDC and write it correctly in the form .
I can choose the correct regression line for a prediction and say why rearranging the other line is wrong.
I can find the mean point by solving the equations of the two regression lines simultaneously.
I can use the mean point and the line of on to find a missing data value.
I can state that the two lines coincide only when , and describe how the angle between them changes as decreases.
One of the students reads for 8 hours each week. Use an appropriate regression line to estimate this student's score in the test.
2 marks
use of the regression line of on (M1)
A1
Another student scored 70 in the test. Use an appropriate regression line to estimate the number of hours this student reads each week.
2 marks
use of the regression line of on (M1)
State whether Pearson's product-moment correlation coefficient for these data is positive or negative. Give a reason for your answer.
1 mark
positive, since both regression lines have a positive gradient R1
The members of a running club record their resting heart rate, beats per minute, and the time, minutes, that they take to run 1 km.
For these data, the regression line of on is and the regression line of on is .
Find the mean resting heart rate and the mean time to run 1 km for the members of the club.
4 marks
One member of the club has a resting heart rate of 52 beats per minute. Use an appropriate regression line to estimate the time this member takes to run 1 km.
2 marks
The following table shows the distance from the coast, km, and the annual rainfall, mm, at eight weather stations in a region.
Distance from coast ( km) | 5 | 18 | 32 | 47 | 60 | 78 | 95 | 120 |
|---|---|---|---|---|---|---|---|---|
Annual rainfall ( mm) | 1420 | 1310 | 1180 | 1120 | 980 | 890 | 760 | 640 |
The regression line of on has equation . Find the value of and the value of
Regression with the lists swapped (list 2 as the independent list) gives gradient and intercept . Written with as the subject:
3. Heart weight is to be predicted from body weight, so use on with the unrounded values:
4. Body weight is to be predicted from heart weight, so use on :
Both values ( kg and g) lie inside the ranges of the data, so these are interpolations. The correlation is only moderate, so they are rough estimates.
(With the unrounded coefficients, , so about cm.)
2. Rearranging gives , so
This is not appropriate. The line of on minimises errors in the son's height, not in the father's. Its estimate, 207 cm, is taller than every father in the data, while the correct estimate, about 180 cm, is only a little above the mean of 175.6 cm.
2. Now is known and is to be estimated, so use the line of on :
Then .
Check in the second equation: . The mean point is .
To draw both lines on the same axes, write the second with as the subject: gives .
The line passes through , so
The five -values add up to :
which is the same line.
2. Here and , so
Both gradients are positive, so is positive: (3 s.f.), a moderate positive correlation.
3. The father's height is known, so use on :
4. Swap the lists (sons as the independent list): gradient , intercept , so
5. The son's height is known and the father's is to be estimated, so use on :
(Rearranging the line of on would give cm, which earns no marks here.)
6. Both lines pass through the mean point. From the GDC (or by adding each row and dividing by 10):
Then . The mean 5 km time is 25 minutes and the mean 10 km time is 53 minutes.
2. The 10 km time is known, so use on :
3. The 5 km time is known, so use on :
4. The line of on minimises errors in and is used to predict from ; the line of on minimises errors in and is used to predict from .
Note: Award (M0)A0 for rearranging the line of on to obtain .
2 marks
A new weather station in the region records an annual rainfall of 1050 mm. Use your answer to part (a) to estimate the distance of this station from the coast.
2 marks
Write down the value of , Pearson's product-moment correlation coefficient, for these data.
1 mark