Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org

Correlation and regression calculator

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|ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc}X&49&51&39&57&49&37&45&46&62&62&37&49&48&52&57&36&52&59&36&54&38&50&37&54&37&59&43&38&59&36&60&36&44&39&14&17&30&30&11&11&23&22&30&6&30&21&24&15&30&30&24&11&22&30&28&30&30&30&24&11&24&28&28&30&30&30&11&24&24&24&24&26&29&29&30&30&6&30&20&24&30&30&24&5&30&28&4&29&30&30&30&30&22&30&7&16&30&23&28&30&30&30&30&23&20&23&21&23&2&17&21&30&30&21&11&24&1&23&4&13&30&30&15&20&30&2&4&16&11&21&30&14&21&29&4&11&3&15&30&14&16\\Y&2010&2010&2050&2085&2098&2100&2100&2100&2100&2119&2124&2150&2200&2201&2210&2238&2260&2290&2301&2319&2320&2422&2500&2500&2600&2601&2622&2671&2700&3100&3200&3209&3300&4195&2100&2100&2100&2100&2129&2131&2160&2180&2188&2201&2214&2222&2299&2300&2300&2300&2301&2309&2381&2388&2400&2400&2400&2400&2401&2450&2450&2450&2450&2450&2450&2488&2499&2500&2500&2500&2500&2500&2500&2500&2500&2500&2503&2509&2510&2520&2520&2528&2531&2550&2550&2599&2600&2600&2600&2600&2600&2601&2609&2609&2650&2650&2650&2700&2700&2700&2700&2700&2700&2722&2800&2800&2809&2809&2900&2900&2900&2900&2999&3000&3099&3100&3101&3109&3150&3150&3200&3209&3220&3300&3305&3309&3309&3309&3700&3900&4100&4109&4522&4544&4900&5000&5255&5399&7600&8100&14999\end{array}$$

The equation of the regression line is:

$$y~=~3545 ~-~ 24.21 \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$ 
49 2010 98490 2401
51 2010 102510 2601
39 2050 79950 1521
57 2085 118845 3249
49 2098 102802 2401
37 2100 77700 1369
45 2100 94500 2025
46 2100 96600 2116
62 2100 130200 3844
62 2119 131378 3844
37 2124 78588 1369
49 2150 105350 2401
48 2200 105600 2304
52 2201 114452 2704
57 2210 125970 3249
36 2238 80568 1296
52 2260 117520 2704
59 2290 135110 3481
36 2301 82836 1296
54 2319 125226 2916
38 2320 88160 1444
50 2422 121100 2500
37 2500 92500 1369
54 2500 135000 2916
37 2600 96200 1369
59 2601 153459 3481
43 2622 112746 1849
38 2671 101498 1444
59 2700 159300 3481
36 3100 111600 1296
60 3200 192000 3600
36 3209 115524 1296
44 3300 145200 1936
39 4195 163605 1521
14 2100 29400 196
17 2100 35700 289
30 2100 63000 900
30 2100 63000 900
11 2129 23419 121
11 2131 23441 121
23 2160 49680 529
22 2180 47960 484
30 2188 65640 900
6 2201 13206 36
30 2214 66420 900
21 2222 46662 441
24 2299 55176 576
15 2300 34500 225
30 2300 69000 900
30 2300 69000 900

Step 2: Find the sum of every column:

$$ \sum{X} = 3941 ~,~ \sum{Y} = 404422 ~,~ \sum{X \cdot Y} = 10635996 ~,~ \sum{X^2} = 137735 $$

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{ 404422 \cdot 137735 - 3941 \cdot 10635996}{ 141 \cdot 137735 - 3941^2} \approx 3545 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 141 \cdot 10635996 - 3941 \cdot 404422 }{ 141 \cdot 137735 - \left( 3941 \right)^2} \approx -24.21\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 49 51 39 57 49 37 45 46 62 62 37 49 48 52 57 36 52 59 36 54 38 50 37 54 37 59 43 38 59 36 60 36 44 39 14 17 30 30 11 11 23 22 30 6 30 21 24 15 30 30 24 11 22 30 28 30 30 30 24 11 24 28 28 30 30 30 11 24 24 24 24 26 29 29 30 30 6 30 20 24 30 30 24 5 30 28 4 29 30 30 30 30 22 30 7 16 30 23 28 30 30 30 30 23 20 23 21 23 2 17 21 30 30 21 11 24 1 23 4 13 30 30 15 20 30 2 4 16 11 21 30 14 21 29 4 11 3 15 30 14 16 , 2010 2010 2050 2085 2098 2100 2100 2100 2100 2119 2124 2150 2200 2201 2210 2238 2260 2290 2301 2319 2320 2422 2500 2500 2600 2601 2622 2671 2700 3100 3200 3209 3300 4195 2100 2100 2100 2100 2129 2131 2160 2180 2188 2201 2214 2222 2299 2300 2300 2300 2301 2309 2381 2388 2400 2400 2400 2400 2401 2450 2450 2450 2450 2450 2450 2488 2499 2500 2500 2500 2500 2500 2500 2500 2500 2500 2503 2509 2510 2520 2520 2528 2531 2550 2550 2599 2600 2600 2600 2600 2600 2601 2609 2609 2650 2650 2650 2700 2700 2700 2700 2700 2700 2722 2800 2800 2809 2809 2900 2900 2900 2900 2999 3000 3099 3100 3101 3109 3150 3150 3200 3209 3220 3300 3305 3309 3309 3309 3700 3900 4100 4109 4522 4544 4900 5000 5255 5399 7600 8100 14999 , reg , g , , , , Regression line X = [ 49 51 39 57 49 37 45 46 62 62 37 49 48 52 57 36 52 59 36 54 38 50 37 54 37 59 43 38 59 36 60 36 44 39 14 17 30 30 11 11 23 22 30 6 30 21 24 15 30 30 24 11 22 30 28 30 30 30 24 11 24 28 28 30 30 30 11 24 24 24 24 26 29 29 30 30 6 30 20 24 30 30 24 5 30 28 4 29 30 30 30 30 22 30 7 16 30 23 28 30 30 30 30 23 20 23 21 23 2 17 21 30 30 21 11 24 1 23 4 13 30 30 15 20 30 2 4 16 11 21 30 14 21 29 4 11 3 15 30 14 16 ] , Y = [ 2010 2010 2050 2085 2098 2100 2100 2100 2100 2119 2124 2150 2200 2201 2210 2238 2260 2290 2301 2319 2320 2422 2500 2500 2600 2601 2622 2671 2700 3100 3200 3209 3300 4195 2100 2100 2100 2100 2129 2131 2160 2180 2188 2201 2214 2222 2299 2300 2300 2300 2301 2309 2381 2388 2400 2400 2400 2400 2401 2450 2450 2450 2450 2450 2450 2488 2499 2500 2500 2500 2500 2500 2500 2500 2500 2500 2503 2509 2510 2520 2520 2528 2531 2550 2550 2599 2600 2600 2600 2600 2600 2601 2609 2609 2650 2650 2650 2700 2700 2700 2700 2700 2700 2722 2800 2800 2809 2809 2900 2900 2900 2900 2999 3000 3099 3100 3101 3109 3150 3150 3200 3209 3220 3300 3305 3309 3309 3309 3700 3900 4100 4109 4522 4544 4900 5000 5255 5399 7600 8100 14999 ]

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
show 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
437 953 122 solved problems