Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org

Correlation and regression calculator

google play badge app store badge

Enter two data sets and this calculator will find the equation of the regression line and correlation coefficient. The calculator will generate a step by step explanation along with the graphic representation of the data sets and regression line.

solution

You entered the following data:

$$\begin{array}{c|cccccccccccccccccccccccccccc}X&17&23&24&11&30&24&1&24&11&3&7&11&2&11&1&16&30&17&7&35&37&37&44&45&46&49&51&59\\Y&55600&28600&34600&30088&29088&42000&25855&35000&41220&33220&35645&29288&31111&24022&36000&34353&33300&33200&29088&23433&23100&27600&18800&17600&25000&21800&23800&19200\end{array}$$

The equation of the regression line is:

$$y~=~36297 ~-~ 259.6 \cdot x$$

The graph of the regression line is:

explanation

We will find an equation of the regression line in 4 steps.

Step 1: Find $X \cdot Y$ and $X^2$ as it was done in the table below.

$X$$Y$$X\cdot Y$$X \cdot X$ 
17 55600 945200 289
23 28600 657800 529
24 34600 830400 576
11 30088 330968 121
30 29088 872640 900
24 42000 1008000 576
1 25855 25855 1
24 35000 840000 576
11 41220 453420 121
3 33220 99660 9
7 35645 249515 49
11 29288 322168 121
2 31111 62222 4
11 24022 264242 121
1 36000 36000 1
16 34353 549648 256
30 33300 999000 900
17 33200 564400 289
7 29088 203616 49
35 23433 820155 1225
37 23100 854700 1369
37 27600 1021200 1369
44 18800 827200 1936
45 17600 792000 2025
46 25000 1150000 2116
49 21800 1068200 2401
51 23800 1213800 2601
59 19200 1132800 3481

Step 2: Find the sum of every column:

$$ \sum{X} = 673 ~,~ \sum{Y} = 841611 ~,~ \sum{X \cdot Y} = 18194809 ~,~ \sum{X^2} = 24011 $$

Step 3: Use the following equations to find $a$ and $b$:

$$ \begin{aligned} a &= \frac{\sum{Y} \cdot \sum{X^2} - \sum{X} \cdot \sum{XY} }{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 841611 \cdot 24011 - 673 \cdot 18194809}{ 28 \cdot 24011 - 673^2} \approx 36297 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 28 \cdot 18194809 - 673 \cdot 841611 }{ 28 \cdot 24011 - \left( 673 \right)^2} \approx -259.6\end{aligned}$$

Step 4: Substitute $a$ and $b$ in regression equation formula

$$ \begin{aligned} y~&=~a ~+~ b \cdot x \\y~&=~36297 ~-~ 259.6 \cdot x\end{aligned}$$

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 17 23 24 11 30 24 1 24 11 3 7 11 2 11 1 16 30 17 7 35 37 37 44 45 46 49 51 59 , 55600 28600 34600 30088 29088 42000 25855 35000 41220 33220 35645 29288 31111 24022 36000 34353 33300 33200 29088 23433 23100 27600 18800 17600 25000 21800 23800 19200 , reg , g , , , , Regression line X = [ 17 23 24 11 30 24 1 24 11 3 7 11 2 11 1 16 30 17 7 35 37 37 44 45 46 49 51 59 ] , Y = [ 55600 28600 34600 30088 29088 42000 25855 35000 41220 33220 35645 29288 31111 24022 36000 34353 33300 33200 29088 23433 23100 27600 18800 17600 25000 21800 23800 19200 ]

Comment (optional)

Share Result

You can copy and paste the link wherever you need it.

Correlation and Regression Calculator
Input X and Y values separated by comma or blank space
help ↓↓ examples ↓↓
Use data grit to input x and y values
Find the equation of the regression line
Find the correlation coefficient
Hide steps

New service on Mathportal

You can hire our experts to do your math homework.

We provide complete, handwritten, step-by-step solutions.

Get a free quote
working...
examples
example 1:ex 1:

Consider the following set of points: ${(-3 , -4), \, (2 , 3), \, (7 , 11)}$

a) Find the regression line for the given data points.

b) Plot the given points and the regression line.

example 2:ex 2:

The values of $X$ and their corresponding values of $Y$ are shown in the table below:

$$ \begin{array}{c|ccccc} X & ~1~ & ~2~ & ~3~ & ~4~ & ~5 \\ Y & ~4~ & ~8~ & ~9~ & ~11~& ~16 \end{array} $$

Find a Pearson correlation coefficient.

Search our database of more than 200 calculators

Was this calculator helpful?

Yes No
438 265 904 solved problems