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|ccccccccccccccccccccccccccccccccccc}X&12&1&4&26&29&29&25&3&1&1&25&17&29&19&27&23&19&12&17&26&29&1&18&3&26&19&23&5&18&5&17&22&4&1&2\\Y&2000&2019&2047&2089&2100&2100&2100&2107&2110&2119&2200&2200&2200&2212&2250&2300&2301&2319&2350&2400&2400&2400&2400&2400&2500&2501&2560&2600&2700&2701&2800&2900&2910&3433&4050\end{array}$$

The equation of the regression line is:

$$y~=~2593 ~-~ 11.14 \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$ 
12 2000 24000 144
1 2019 2019 1
4 2047 8188 16
26 2089 54314 676
29 2100 60900 841
29 2100 60900 841
25 2100 52500 625
3 2107 6321 9
1 2110 2110 1
1 2119 2119 1
25 2200 55000 625
17 2200 37400 289
29 2200 63800 841
19 2212 42028 361
27 2250 60750 729
23 2300 52900 529
19 2301 43719 361
12 2319 27828 144
17 2350 39950 289
26 2400 62400 676
29 2400 69600 841
1 2400 2400 1
18 2400 43200 324
3 2400 7200 9
26 2500 65000 676
19 2501 47519 361
23 2560 58880 529
5 2600 13000 25
18 2700 48600 324
5 2701 13505 25
17 2800 47600 289
22 2900 63800 484
4 2910 11640 16
1 3433 3433 1
2 4050 8100 4

Step 2: Find the sum of every column:

$$ \sum{X} = 538 ~,~ \sum{Y} = 84778 ~,~ \sum{X \cdot Y} = 1262623 ~,~ \sum{X^2} = 11908 $$

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{ 84778 \cdot 11908 - 538 \cdot 1262623}{ 35 \cdot 11908 - 538^2} \approx 2593 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 35 \cdot 1262623 - 538 \cdot 84778 }{ 35 \cdot 11908 - \left( 538 \right)^2} \approx -11.14\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 12 1 4 26 29 29 25 3 1 1 25 17 29 19 27 23 19 12 17 26 29 1 18 3 26 19 23 5 18 5 17 22 4 1 2 , 2000 2019 2047 2089 2100 2100 2100 2107 2110 2119 2200 2200 2200 2212 2250 2300 2301 2319 2350 2400 2400 2400 2400 2400 2500 2501 2560 2600 2700 2701 2800 2900 2910 3433 4050 , reg , g , , , , Regression line X = [ 12 1 4 26 29 29 25 3 1 1 25 17 29 19 27 23 19 12 17 26 29 1 18 3 26 19 23 5 18 5 17 22 4 1 2 ] , Y = [ 2000 2019 2047 2089 2100 2100 2100 2107 2110 2119 2200 2200 2200 2212 2250 2300 2301 2319 2350 2400 2400 2400 2400 2400 2500 2501 2560 2600 2700 2701 2800 2900 2910 3433 4050 ]

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 745 607 solved problems