Skip to content

Quantitative Aptitude · Correlation and Regression

Regression Lines and Equations for CA Foundation

Updated 1 October 2026 · Fact-checked

Regression is a method of estimating one variable from another using a fitted line. The line of Y on X is Y − Ȳ = b_yx (X − X̄). The line of X on Y is X − X̄ = b_xy (Y − Ȳ). Find the means and the regression coefficient, substitute, then estimate.

Understand Regression Lines and Equations

Correlation tells you how strongly two variables move together. Regression goes one step further. It gives you an equation so you can estimate the value of one variable when you know the other.

The variable you estimate is the dependent variable. The variable you use to estimate it is the independent variable. In the line of Y on X, Y is dependent and X is independent. In the line of X on Y, the roles swap.

There are two regression lines because there are two different estimation problems. The line of Y on X is fitted by minimising the squares of vertical gaps between points and the line. The line of X on Y minimises the squares of horizontal gaps. So the two lines are different unless the correlation is perfect (r = +1 or −1). In that case they coincide.

Both lines always pass through the point (X̄, Ȳ), the means of the two variables. The slope of each line is a regression coefficient. The slope of Y on X is b_yx. The slope of X on Y is b_xy.

Correlation vs regression: correlation measures the strength and direction of a linear relationship, and it is symmetric in X and Y. Regression gives an equation for estimation, and it is not symmetric, because Y on X differs from X on Y. Common uses are forecasting sales from advertising spend, estimating demand from price, and estimating cost from output.

Key formulas to remember

Regression line of Y on X
Y − Ȳ = b_yx (X − X̄)
Use this to estimate Y when X is given.
Regression line of X on Y
X − X̄ = b_xy (Y − Ȳ)
Use this to estimate X when Y is given.
Regression coefficient of Y on X
b_yx = r × σy ÷ σx = (nΣXY − ΣX ΣY) ÷ (nΣX² − (ΣX)²)
The denominator uses the X values only.
Regression coefficient of X on Y
b_xy = r × σx ÷ σy = (nΣXY − ΣX ΣY) ÷ (nΣY² − (ΣY)²)
The denominator uses the Y values only.
Link with correlation
r² = b_xy × b_yx, so r = ±√(b_xy × b_yx)
r has the same sign as both regression coefficients. Both b values always have the same sign.
Point of intersection
Both lines pass through (X̄, Ȳ)
Solve the two line equations together to get the means.
Check on the coefficients
b_xy × b_yx ≤ 1
If the product is more than 1, you have assigned the lines the wrong way round.

How to solve Regression Lines and Equations questions

Use this method whether the question gives raw data, summary sums, or the two line equations.

  1. 1Decide what is to be estimated. That variable is the dependent one. Choose the line of Y on X or X on Y to match.
  2. 2Write down the needed values: n, ΣX, ΣY, ΣXY, ΣX² (and ΣY² if needed), or r, σx, σy and the means.
  3. 3Find the means: X̄ = ΣX ÷ n and Ȳ = ΣY ÷ n.
  4. 4Compute the correct regression coefficient. For b_yx the denominator is nΣX² − (ΣX)². For b_xy it is nΣY² − (ΣY)².
  5. 5Substitute into Y − Ȳ = b_yx (X − X̄) or X − X̄ = b_xy (Y − Ȳ) and simplify to the form Y = a + bX.
  6. 6Put the given value of the independent variable into the equation to get the estimate.
  7. 7If two line equations are given, find the means by solving them together. Then assign which is Y on X and which is X on Y by checking that b_xy × b_yx ≤ 1.

Quickest way: Sums-and-means shortcut with option checks

When to use it: Use it in MCQs where summary sums are given or where two line equations are given.

  1. From sums, compute only the one coefficient the question needs. Do not compute both.
  2. Compute the numerator nΣXY − ΣXΣY first. Its sign tells you the sign of the slope and of r, and you can cross out options with the wrong sign.
  3. Plug the means into each option. The correct line must satisfy Ȳ = a + b X̄. This removes wrong options fast.
  4. For two given lines, solve them as simultaneous equations for the means. Do not bother with the coefficients if only the means are asked.
  5. For r from two lines, try one line as Y on X and the other as X on Y. Keep the choice where the product of slopes is at most 1.
  6. If the algebra gets long and no option can be eliminated, skip. A wrong answer costs 0.25 marks.

Common mistakes in Regression Lines and Equations

  • Using the line of Y on X to estimate X.

    Students memorise one line and use it for every question.

    Fix: Ask which variable you are estimating. That is the dependent variable, and its line goes on the left side: Y on X to find Y, X on Y to find X.

  • Using the wrong denominator for b_xy.

    Students copy the b_yx formula and only swap the symbols halfway.

    Fix: For b_xy both the denominator terms use Y: nΣY² − (ΣY)². The numerator stays the same.

  • Writing (ΣX)² as ΣX² in the denominator.

    The two look alike and are easy to confuse under time pressure.

    Fix: ΣX² means square each value then add. (ΣX)² means add then square. Compute both separately and label them.

  • Taking r = b_xy × b_yx.

    Students forget that the product is r², not r.

    Fix: Take the square root of the product. Give r the common sign of the two regression coefficients.

  • Assigning two given lines to Y on X and X on Y arbitrarily.

    Students assume the first line given is Y on X.

    Fix: Try one assignment, find both slopes, and multiply. If the product exceeds 1, swap the assignment.

  • Finding the means by averaging the intercepts or slopes of the two lines.

    Students do not recall that the lines intersect at the means.

    Fix: Solve the two line equations simultaneously. The solution is (X̄, Ȳ).

Worked examples

Example 1

For 5 pairs of observations: n = 5, ΣX = 15, ΣY = 40, ΣXY = 130, ΣX² = 55. Using the regression line of Y on X, the estimated value of Y when X = 6 is: (a) 9 (b) 10 (c) 11 (d) 12

Show the solution
  1. X̄ = 15 ÷ 5 = 3 and Ȳ = 40 ÷ 5 = 8.
  2. Numerator: nΣXY − ΣXΣY = 5 × 130 − 15 × 40 = 650 − 600 = 50.
  3. Denominator: nΣX² − (ΣX)² = 5 × 55 − 15² = 275 − 225 = 50.
  4. b_yx = 50 ÷ 50 = 1.
  5. Line: Y − 8 = 1 × (X − 3), so Y = X + 5.
  6. At X = 6: Y = 6 + 5 = 11.

Answer: (c) 11

Example 2

The two regression lines are 3X + 2Y = 26 and 6X + Y = 31. The means X̄ and Ȳ are respectively: (a) 4 and 7 (b) 7 and 4 (c) 3 and 8 (d) 5 and 5

Show the solution
  1. Both lines pass through (X̄, Ȳ), so solve them together.
  2. From 6X + Y = 31: Y = 31 − 6X.
  3. Put this into 3X + 2Y = 26: 3X + 62 − 12X = 26, so −9X = −36 and X = 4.
  4. Then Y = 31 − 6 × 4 = 7.
  5. Check in the first line: 3 × 4 + 2 × 7 = 12 + 14 = 26, which is correct.

Answer: (a) 4 and 7

Example 3

For the same lines, 3X + 2Y = 26 and 6X + Y = 31, the correlation coefficient r is: (a) −0.25 (b) −0.5 (c) 0.25 (d) 0.5

Show the solution
  1. Try 3X + 2Y = 26 as Y on X: Y = 13 − 1.5X, so b_yx = −1.5.
  2. Then 6X + Y = 31 is X on Y: X = 31/6 − Y/6, so b_xy = −1/6.
  3. Product: (−1.5) × (−1/6) = 0.25, which is at most 1, so this assignment is valid.
  4. (The other assignment gives slopes −6 and −2/3 with product 4, which is more than 1, so it is rejected.)
  5. r² = 0.25, so |r| = 0.5.
  6. Both regression coefficients are negative, so r is negative: r = −0.5.

Answer: (b) −0.5

Exam tips

  • Read which variable is to be estimated before doing any calculation. Many wrong options are the answer from the other line.
  • Questions often give two line equations and ask for the means, r, or one coefficient. Practise solving them quickly as simultaneous equations.
  • Check the sign first. If both slopes are negative, r is negative, and you can drop positive options at once.
  • Remember that r² = b_xy × b_yx and that the product must not exceed 1. This is a favourite trap in MCQs.
  • Do not use long calculations when the question gives r, σx, σy and the means. Use b_yx = r σy ÷ σx directly.

Practice questions from Correlation and Regression

Regression Lines and Equations: frequently asked questions

What is the difference between correlation and regression?

Correlation measures the strength and direction of a linear relationship between two variables. Regression gives an equation to estimate one variable from the other. Correlation is symmetric, while the regression of Y on X differs from that of X on Y.

Why are there two regression lines?

One line minimises the squared vertical gaps and is used to estimate Y from X. The other minimises the squared horizontal gaps and is used to estimate X from Y. They coincide only when r is +1 or −1.

How do I find the regression equation from data?

Compute the means and the regression coefficient from the sums. Then write Y − Ȳ = b_yx (X − X̄) and simplify. Use the b_xy form with Y-based sums for the line of X on Y.

What are the main uses of regression analysis?

It is used to estimate or forecast a variable, such as sales from advertising or cost from output. It also shows how much the dependent variable changes for a unit change in the independent variable.