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|cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}X&18&24&30&36&30&28&30&30&21&44&57&30&44&44&11&11&8&49&37&7&8&37&30&14&26&57&36&18&24&29&44&34&36&36&37&37&7&27&29&31&31&30&23&23&34&36&45&37&44&30&30&30&30&24&49&30&15&23&22&1&44&44&44&44&11&24&3&47&9&29&12&30&44&30&24&46&30&44&60&44&49&49&49&41&41&43&49&45&45&36&46&14&19&30&24&24&15&24&49&30&44&24&10&57&43&44&45&10&28&24&57&60&39&57&47&57&45&44&39&50&24&57&44&49&9&62&51&62&49&60&60&24&9&27&28&50&51&52&51&54&3&51&24&55&2&62&52&14&50&53&30&44&39&45&20&11&44&62&52&14&11&9&24&44&57&44&24&24&30&30&28&28&15&24\\Y&5290&5109&4611&4400&4400&4400&4320&4310&4309&4300&4300&4209&4200&4200&4160&4120&4110&4100&4100&4100&4100&4009&4009&3920&3900&3866&3810&3809&3809&3802&3800&3800&3800&3800&3800&3800&3800&3800&3800&3800&3800&3730&3709&3702&3700&3700&3700&3700&3700&3700&3700&3700&3700&3683&3660&3621&3620&3620&3605&3601&3600&3600&3600&3600&3600&3600&3581&3577&3530&3529&3524&3520&3510&3510&3505&3502&3502&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3500&3429&3422&3420&3419&3411&3410&3409&3401&3400&3400&3400&3400&3400&3400&3390&3390&3388&3377&3377&3376&3360&3350&3350&3350&3320&3319&3312&3310&3309&3300&3300&3300&3300&3300&3300&3300&3300&3300&3255&3250&3250&3250&3250&3250&3250&3243&3230&3220&3220&3210&3210&3209&3202&3202&3202&3200&3200&3200&3200&3120&3110&3100&3100&3100&3100&3100&3100&3010&3000&3000&3000&2929&2922&2920&2900&2900&2851&2803\end{array}$$

The equation of the regression line is:

$$y~=~3693 ~-~ 4.258 \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$ 
18 5290 95220 324
24 5109 122616 576
30 4611 138330 900
36 4400 158400 1296
30 4400 132000 900
28 4400 123200 784
30 4320 129600 900
30 4310 129300 900
21 4309 90489 441
44 4300 189200 1936
57 4300 245100 3249
30 4209 126270 900
44 4200 184800 1936
44 4200 184800 1936
11 4160 45760 121
11 4120 45320 121
8 4110 32880 64
49 4100 200900 2401
37 4100 151700 1369
7 4100 28700 49
8 4100 32800 64
37 4009 148333 1369
30 4009 120270 900
14 3920 54880 196
26 3900 101400 676
57 3866 220362 3249
36 3810 137160 1296
18 3809 68562 324
24 3809 91416 576
29 3802 110258 841
44 3800 167200 1936
34 3800 129200 1156
36 3800 136800 1296
36 3800 136800 1296
37 3800 140600 1369
37 3800 140600 1369
7 3800 26600 49
27 3800 102600 729
29 3800 110200 841
31 3800 117800 961
31 3800 117800 961
30 3730 111900 900
23 3709 85307 529
23 3702 85146 529
34 3700 125800 1156
36 3700 133200 1296
45 3700 166500 2025
37 3700 136900 1369
44 3700 162800 1936
30 3700 111000 900

Step 2: Find the sum of every column:

$$ \sum{X} = 5974 ~,~ \sum{Y} = 617090 ~,~ \sum{X \cdot Y} = 21015151 ~,~ \sum{X^2} = 245412 $$

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{ 617090 \cdot 245412 - 5974 \cdot 21015151}{ 174 \cdot 245412 - 5974^2} \approx 3693 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 174 \cdot 21015151 - 5974 \cdot 617090 }{ 174 \cdot 245412 - \left( 5974 \right)^2} \approx -4.258\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 18 24 30 36 30 28 30 30 21 44 57 30 44 44 11 11 8 49 37 7 8 37 30 14 26 57 36 18 24 29 44 34 36 36 37 37 7 27 29 31 31 30 23 23 34 36 45 37 44 30 30 30 30 24 49 30 15 23 22 1 44 44 44 44 11 24 3 47 9 29 12 30 44 30 24 46 30 44 60 44 49 49 49 41 41 43 49 45 45 36 46 14 19 30 24 24 15 24 49 30 44 24 10 57 43 44 45 10 28 24 57 60 39 57 47 57 45 44 39 50 24 57 44 49 9 62 51 62 49 60 60 24 9 27 28 50 51 52 51 54 3 51 24 55 2 62 52 14 50 53 30 44 39 45 20 11 44 62 52 14 11 9 24 44 57 44 24 24 30 30 28 28 15 24 , 5290 5109 4611 4400 4400 4400 4320 4310 4309 4300 4300 4209 4200 4200 4160 4120 4110 4100 4100 4100 4100 4009 4009 3920 3900 3866 3810 3809 3809 3802 3800 3800 3800 3800 3800 3800 3800 3800 3800 3800 3800 3730 3709 3702 3700 3700 3700 3700 3700 3700 3700 3700 3700 3683 3660 3621 3620 3620 3605 3601 3600 3600 3600 3600 3600 3600 3581 3577 3530 3529 3524 3520 3510 3510 3505 3502 3502 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3429 3422 3420 3419 3411 3410 3409 3401 3400 3400 3400 3400 3400 3400 3390 3390 3388 3377 3377 3376 3360 3350 3350 3350 3320 3319 3312 3310 3309 3300 3300 3300 3300 3300 3300 3300 3300 3300 3255 3250 3250 3250 3250 3250 3250 3243 3230 3220 3220 3210 3210 3209 3202 3202 3202 3200 3200 3200 3200 3120 3110 3100 3100 3100 3100 3100 3100 3010 3000 3000 3000 2929 2922 2920 2900 2900 2851 2803 , reg , g , , , , Regression line X = [ 18 24 30 36 30 28 30 30 21 44 57 30 44 44 11 11 8 49 37 7 8 37 30 14 26 57 36 18 24 29 44 34 36 36 37 37 7 27 29 31 31 30 23 23 34 36 45 37 44 30 30 30 30 24 49 30 15 23 22 1 44 44 44 44 11 24 3 47 9 29 12 30 44 30 24 46 30 44 60 44 49 49 49 41 41 43 49 45 45 36 46 14 19 30 24 24 15 24 49 30 44 24 10 57 43 44 45 10 28 24 57 60 39 57 47 57 45 44 39 50 24 57 44 49 9 62 51 62 49 60 60 24 9 27 28 50 51 52 51 54 3 51 24 55 2 62 52 14 50 53 30 44 39 45 20 11 44 62 52 14 11 9 24 44 57 44 24 24 30 30 28 28 15 24 ] , Y = [ 5290 5109 4611 4400 4400 4400 4320 4310 4309 4300 4300 4209 4200 4200 4160 4120 4110 4100 4100 4100 4100 4009 4009 3920 3900 3866 3810 3809 3809 3802 3800 3800 3800 3800 3800 3800 3800 3800 3800 3800 3800 3730 3709 3702 3700 3700 3700 3700 3700 3700 3700 3700 3700 3683 3660 3621 3620 3620 3605 3601 3600 3600 3600 3600 3600 3600 3581 3577 3530 3529 3524 3520 3510 3510 3505 3502 3502 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3500 3429 3422 3420 3419 3411 3410 3409 3401 3400 3400 3400 3400 3400 3400 3390 3390 3388 3377 3377 3376 3360 3350 3350 3350 3320 3319 3312 3310 3309 3300 3300 3300 3300 3300 3300 3300 3300 3300 3255 3250 3250 3250 3250 3250 3250 3243 3230 3220 3220 3210 3210 3209 3202 3202 3202 3200 3200 3200 3200 3120 3110 3100 3100 3100 3100 3100 3100 3010 3000 3000 3000 2929 2922 2920 2900 2900 2851 2803 ]

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
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 450 652 solved problems