Prashnikaप्रश्निका
Code
About

Regression lines calculator

Find both regression lines and the correlation coefficient the way ISC Mathematics asks: from the pairs of data (with the deviation table), from summary numbers like Σx and Σxy, or from the two regression lines (which is which, the means and r). Add a value to estimate the other.

How to use it

  1. 1Choose what you have: the data, summary numbers (Σx, Σy, Σxy …) or the two regression lines.
  2. 2Fill in the boxes, and a value to estimate if the question asks for one.
  3. 3Press Solve for both regression lines, b_yx, b_xy and r with the working.
Start from

Answer

Regression line of y on x
y = ($-\dfrac{3}{2}$)x + 13
Regression line of x on y
x = ($-\dfrac{1}{6}$)y + $\dfrac{31}{6}$

Values

x̄ (mean of x)
4
ȳ (mean of y)
7
b_yx
$-\dfrac{3}{2}$
b_xy
$-\dfrac{1}{6}$
r (correlation)
-0.5

Graph

-5051015-505101520xymean (4, 7)y on xx on y

Dots are the data; the lines cross at the means (green ring). The dashed line is x on y.

The lines

  1. Regression line of y on x: y - 7 = ($-\dfrac{3}{2}$)(x - 4), so y = ($-\dfrac{3}{2}$)x + 13
  2. Regression line of x on y: x - 4 = ($-\dfrac{1}{6}$)(y - 7), so x = ($-\dfrac{1}{6}$)y + $\dfrac{31}{6}$
Start again

About the Regression lines calculator

What it does

Finds both regression lines and the correlation coefficient the way ISC Mathematics asks: from pairs of data (with the deviation table), from summary numbers such as Σx and Σxy, or from the two regression lines themselves (which is which, the means and r). Add a value to estimate the other variable.

The formulas

  • byx = r σy/σx = (nΣxy − ΣxΣy) / (nΣx² − (Σx)²), the slope of the line of y on x.
  • bxy = r σx/σy = (nΣxy − ΣxΣy) / (nΣy² − (Σy)²).
  • Line of y on x: y − ȳ = byx (x − x̄). Line of x on y: x − x̄ = bxy (y − ȳ).
  • r² = byx × bxy, and r has the same sign as both coefficients.
  • Both lines pass through the point of the means (x̄, ȳ).

Common questions

Which line do I use to estimate y?

The regression line of y on x. To estimate x from a value of y, use the line of x on y.

Can r be bigger than 1?

No. r always lies between −1 and 1. If you get more, check the data or which line is which.

Where do the two regression lines cross?

At the point (x̄, ȳ), the means of x and y.

Practise on real ISC questions

More Mathematics tools

All study tools →