Skip to content
IB Diploma ProgrammeSL & HL

Regression of x on y

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Regression of x on y notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Regression of x on y notes as text: skim, search, and jump between subtopics.

~14 min read

1. What "x on y" means

The regression line of x on y is the line fitted to predict x from a value of y. The variable after "on" is the input. The variable before "on" is the one you estimate.

Its equation has x as the subject. It is a different line from the regression line of y on x, and the two lines are not rearrangements of each other.

Before you use a line, write down which variable it estimates. The command term "estimate" asks for an approximate value: here, the value the chosen line gives.

regression line of x on y: x = cy + d

regression line of y on x: y = ax + b

Worked example 12 marks

Do not use a calculator. The regression line of p on d is p = 120 - 0.4d. The regression line of d on p is d = 280 - 1.5p. Estimate the value of p when d = 240.

  1. 1

    p is the variable being estimated, so use the line of p on d and substitute d = 240: p = 120 - 0.4(240) (M1) [1]

  2. 2

    p = 120 - 96 = 24 A1 [1]

  3. 3

    check: the line of d on p would need p as an input, so it is the wrong line here

2. Finding the line with technology

Use the graphic display calculator to find the line. Enter the two lists so that the variable you want to estimate is the one the calculator treats as the dependent variable, then read off the gradient and the intercept.

Entering the lists the other way round gives the other line, the regression line of y on x. The calculator will not warn you.

Keep the full values on the calculator and give the final line to three significant figures. Write the equation out with the estimated variable as its subject.

x = cy + d

Worked example 13 marks

A cafe records the outside temperature, T ^(°)C, and the number of hot drinks sold, D, on six days.

Find the equation of the regression line of T on D.

Hot drinks sold, D625549413022
Temperature, T ^(°)C479121518
  1. 1

    enter D as the input list and T as the output list, then use linear regression (M1) [1]

  2. 2

    gradient = -0.341 (A1) [1]

  3. 3

    intercept = 25.6, so T = -0.341D + 25.6 (A1) [1]

  4. 4

    check: the means are barD = 43.17 and barT = 10.83, and -0.34103 × 43.17 + 25.554 = 10.83, so the line passes through the mean point

3. Using the line to make a prediction

To predict, choose the line whose subject is the quantity you want, substitute the value you are given, and work out the result. The markscheme credits an attempt to substitute the value into the regression line with that quantity as its subject.

Choosing the wrong line loses both marks, even when the arithmetic is right.

Give the answer to three significant figures.

Worked example 12 marks

In a study, measurements for arm span, A cm, and foot length, F cm, are taken from a large group of adults.

For this group, the regression line of F on A is found to be F = 0.335A - 32.6, and the regression line of A on F is found to be A = 2.89F + 99.3. Each regression line passes through the mean point.

By using an appropriate regression line, find an estimate of the arm span for an adult with a foot length of 19.8 cm.

  1. 1

    attempt to substitute F = 19.8 into the regression line for A on F (M1) [1]

  2. 2

    A = 2.89(19.8) + 99.3 = 156.522, so the arm span is 157 cm A1 [1]

  3. 3

    note: the line of F on A rearranged gives 156.4… = 156, and the markscheme awards M0A0 for choosing the wrong line

4. Two lines and the mean point

Both regression lines pass through the mean point, (barx, bary). When both equations are given, the mean point is where the lines intersect, so you find it by solving them together.

The markscheme credits the recognition that the lines intersect at the mean point. Substitute one equation into the other, solve for one variable, then substitute back for the other.

mean point = (barx, bary)

Worked example 13 marks

For a group of adults, the regression line of F on A is F = 0.335A - 32.6, and the regression line of A on F is A = 2.89F + 99.3, where A cm is arm span and F cm is foot length. Each regression line passes through the mean point.

For this group of adults, find the mean arm span and the mean foot length.

  1. 1

    recognition that the lines intersect at the mean point (may be seen on a sketch) (M1) [1]

  2. 2

    substitute: F = 0.335(2.89F + 99.3) - 32.6, so 0.03185F = 0.6655 and F = 20.8948…, then A = 2.89(20.8948…) + 99.3 = 159.686…

  3. 3

    the mean arm span = 160 cm A1 [1]

  4. 4

    the mean foot length = 20.9 cm A1 [1]

5. When the x on y line cannot be used

A line of x on y is fitted to predict x. The syllabus warns that you cannot always reliably predict y from a value of x when you use an x on y line.

Rearranging the line to make y the subject does not repair this. The result is a different value from the one the regression line of y on x gives. In the markscheme's own example the two differ, 156 and 157.

To estimate y from x, use the regression line of y on x. The command term explain needs a reason as well as the instruction.

Worked example 12 marks

The regression line of x on y is x = 0.6y + 4. A student rearranges this line to make y the subject and uses it to estimate y when x = 10.

Explain why this estimate may not be reliable, and state what the student should use instead.

  1. 1

    the line of x on y is fitted to predict x from y, so it cannot always reliably predict y from x (R1) [1]

  2. 2

    use the regression line of y on x (A1) [1]

  3. 3

    for reference, the rearranged line gives y = (10 - 4)/0.6 = 10, which is the unreliable value

Recap

  • The regression line of x on y predicts x from y. Its equation is of the form x = cy + d.
  • Find it with technology: enter the lists so that x is the dependent one. The wrong order gives the other line.
  • To predict, choose the line whose subject is the quantity you want, then substitute.
  • Both regression lines pass through the mean point, so it is where they intersect.
  • An x on y line cannot always reliably predict y from x. Use the y on x line, not a rearrangement.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State which variable is estimated when the regression line of x on y is used.1 mark
    Answer
    1. x.

    Trap: Answering y because it is the value you are given. The variable before 'on' is the one estimated.

  2. The regression line of h on w is h = 0.5w + 120. The regression line of w on h is w = 1.6h - 140. Estimate w when h = 175. A. 110 B. 140 C. 207.5 D. 2801 mark
    Answer
    1. w is estimated, so use the line of w on h: w = 1.6(175) - 140 = 140. The answer is B.
    2. A: (175 - 120)/0.5 = 110 rearranges the wrong line. C: 0.5(175) + 120 = 207.5 puts 175 into the line of h on w as if it were w. D: 1.6 × 175 = 280 forgets to subtract 140.

    Trap: Rearranging the line of h on w gives 110, the distractor for the wrong line.

  3. Do not use a calculator. The regression line of x on y is x = 3y - 5. Calculate the value of x when y = 4.2 marks
    Answer
    1. Substitute y = 4: x = 3(4) - 5.
    2. x = 7.

    Trap: Putting 4 in place of x and solving 4 = 3y - 5, which answers a different question.

  4. A park records the daily number of visitors, v, and the maximum temperature, T ^(°)C. The regression line of v on T is v = 12T + 40. A manager rearranges the line to estimate T on a day with 300 visitors. (a) Calculate the manager's estimate. [1] (b) Explain why this estimate may not be reliable, and state what the manager should use instead. [2]3 marks
    Answer
    1. (a)
    2. T = (300 - 40)/12 = 21.7 ^(°)C.
    3. (b)
    4. The line of v on T is fitted to predict v from T, so it cannot always reliably predict T from v.
    5. The manager should use the regression line of T on v.

    Trap: Treating a rearranged line as if it were the regression line of T on v. It is a different line.

  5. Do not use a calculator. The regression line of x on y is x = 0.5y + 2 and the regression line of y on x is y = x + 1. Find the mean point.3 marks
    Answer
    1. Both lines pass through the mean point, so it is where they intersect.
    2. x = 0.5(x + 1) + 2, so 0.5x = 2.5 and x = 5.
    3. y = 5 + 1 = 6. The mean point is (5, 6). Check: 0.5(6) + 2 = 5.

    Trap: Using one line alone. One line has infinitely many points, so only the intersection is the mean point.

  6. A cyclist records the distance cycled, d km, and the energy used, C kcal, on five rides. (a) Find the equation of the regression line of d on C. [2] (b) Hence estimate the distance cycled on a ride that uses 450 kcal. [2] | Energy, C (kcal) | 210 | 340 | 520 | 640 | 790 | | --- | --- | --- | --- | --- | --- | | Distance, d (km) | 3 | 5 | 8 | 10 | 12 |4 marks
    Answer
    1. (a)
    2. Enter C as the input list and d as the output list and use linear regression.
    3. d = 0.0158C - 0.281.
    4. (b)
    5. Use the stored values: d = 0.015762… × 450 - 0.28119….
    6. d = 6.81 km.

    Trap: Rounding the gradient and intercept first gives 0.0158 × 450 - 0.281 = 6.83. Keep the full calculator values until the end.

  7. The regression line of r on t is r = 0.5t + 10. The regression line of t on r is t = 1.2r - 8. (a) Estimate t when r = 30. [2] (b) A student rearranges the line of r on t to estimate t when r = 30. Find the student's estimate and state which estimate should be used. [2]4 marks
    Answer
    1. (a)
    2. t is estimated, so use the line of t on r: t = 1.2(30) - 8.
    3. t = 28.
    4. (b)
    5. t = (30 - 10)/0.5 = 40.
    6. Use 28, from the regression line of t on r. The rearranged line is not the line for estimating t.

    Trap: Taking the rearranged value 40 because the arithmetic is easy. Choose the line by its subject, not by the working.

  8. Do not use a calculator. The regression line of y on x is y = 1.5x + 2. The regression line of x on y is x = 0.4y + k. The mean of x is 8. Determine the mean of y and the value of k.4 marks
    Answer
    1. The mean point lies on both lines.
    2. On the line of y on x: bary = 1.5(8) + 2 = 14.
    3. On the line of x on y: 8 = 0.4(14) + k.
    4. k = 8 - 5.6 = 2.4.

    Trap: Putting 8 in for y in the line of x on y. The 8 is a value of x.

  9. Do not use a calculator. Each week a recycling centre records the mass of glass collected, g tonnes, and the mass of paper collected, p tonnes. The regression line of p on g is p = 0.8g + 12. The regression line of g on p is g = 0.45p + k. The mean mass of paper is 4 tonnes more than the mean mass of glass. (a) Determine the mean mass of glass and the mean mass of paper. [3] (b) Find the value of k. [2] (c) Estimate the mass of glass collected in a week when 50 tonnes of paper is collected. [2]7 marks
    Answer
    1. (a)
    2. The mean point lies on the line of p on g, and barp = barg + 4.
    3. barg + 4 = 0.8barg + 12, so 0.2barg = 8 and barg = 40 tonnes.
    4. barp = 40 + 4 = 44 tonnes. Check: 0.8(40) + 12 = 44.
    5. (b)
    6. The mean point lies on the line of g on p: 40 = 0.45(44) + k.
    7. k = 40 - 19.8 = 20.2.
    8. (c)
    9. g is estimated, so use the line of g on p: g = 0.45(50) + 20.2.
    10. g = 22.5 + 20.2 = 42.7 tonnes.

    Trap: In (c), rearranging p = 0.8g + 12 gives g = (50 - 12)/0.8 = 47.5: the wrong line, which the markscheme awards M0A0.

  10. A factory records the running time of a machine, x hours, and the energy used, y kWh, on six days. (a) Find the equation of the regression line of x on y. [2] (b) Use your line to estimate the running time on a day when 5.0 kWh is used. [2] (c) The manager wants to estimate the energy used in 28 hours of running. She plans to rearrange the line from part (a). Evaluate her plan, and find the estimate she should use. [3] | Time, x (hours) | 12 | 15 | 18 | 22 | 25 | 30 | | --- | --- | --- | --- | --- | --- | --- | | Energy, y (kWh) | 3.1 | 4.6 | 3.9 | 5.6 | 5.5 | 7.4 |7 marks
    Answer
    1. (a)
    2. Enter y as the input list and x as the output list.
    3. x = 4.15y - 0.473.
    4. (b)
    5. x = 4.14745… × 5.0 - 0.47305… = 20.3 hours.
    6. (c)
    7. The line of x on y is fitted to predict x, so it cannot always reliably predict y from x: the plan is not sound. Rearranging would give y = (28 + 0.47305…)/(4.14745…) = 6.87 kWh.
    8. Use the regression line of y on x, y = 0.213x + 0.693.
    9. y = 0.21265… × 28 + 0.69277… = 6.65 kWh.

    Trap: Rearranging the x on y line gives 6.87 kWh, not the 6.65 kWh that the regression line of y on x gives.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Rearranging F = 0.335A - 32.6 to estimate A, giving 156 cmThe regression line for A on F, giving 157 cm
Taking the line of y on x when asked for the line of x on yThe line of x on y has x as the subject and y as the input
Finding the mean point from one regression lineRecognition that the lines intersect at the mean point
A rearranged x on y line predicts y from x just as wellAn x on y line cannot always reliably predict y from x, so use the y on x line

Frequently asked questions

What does the regression line of x on y mean?
The regression line of x on y is the line fitted to predict x from a value of y. The variable after "on" is the input, and the variable before "on" is the one you estimate. Its equation has x as the subject, in the form x = cy + d. It is a different line from the regression line of y on x, and the two are not rearrangements of each other.
How do I find the regression line of x on y with a calculator?
Enter y as the input list and x as the output list, then use linear regression. Read off the gradient and the intercept and write the line with x as the subject. For a factory's running time x hours against energy y kWh, the line is x = 4.15y - 0.473. Entering the lists the other way round gives the other line, and the calculator will not warn you.
How do I use a regression line to predict a value?
Choose the line whose subject is the quantity you want to estimate, substitute the value you are given, and give the answer to three significant figures. To estimate arm span from a foot length of 19.8 cm, use the regression line for A on F: A = 2.89(19.8) + 99.3 = 156.522, so the arm span is 157 cm. Choosing the wrong line loses both marks.
How do I find the mean point from two regression lines?
Both regression lines pass through the mean point (barx, bary), so it is where the two lines intersect. Solve the two equations together. For F = 0.335A - 32.6 and A = 2.89F + 99.3, substituting gives F = 20.8948… and A = 159.686…, so the mean arm span is 160 cm and the mean foot length is 20.9 cm. Recognising the intersection earns the first mark.
When can I not use an x on y line to estimate y?
An x on y line is fitted to predict x from y, so it cannot always reliably predict y from a value of x. Rearranging it to make y the subject does not repair this. For x = 0.6y + 4 with x = 10, the rearranged value y = 10 is unreliable. Use the regression line of y on x instead, and explain the reason as well as the instruction.
Why does rearranging a regression line give a different answer from the other regression line?
A rearranged line is not the regression line of the other variable, so the two values differ. The markscheme's own example gives 156 cm from the rearranged line of F on A, but 157 cm from the regression line for A on F, and the rearranged answer earns M0A0. Choose the line by its subject, not by the working.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters