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

The equation of the regression line is:

$$y~=~3127 ~-~ 15.52 \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$ 
3 5255 15765 9
11 5000 55000 121
4 4900 19600 16
29 4544 131776 841
21 4522 94962 441
39 4195 163605 1521
14 4109 57526 196
30 4100 123000 900
21 3900 81900 441
11 3700 40700 121
2 3309 6618 4
4 3309 13236 16
16 3309 52944 256
30 3305 99150 900
44 3300 145200 1936
20 3300 66000 400
15 3220 48300 225
36 3209 115524 1296
30 3209 96270 900
60 3200 192000 3600
30 3200 96000 900
4 3150 12600 16
13 3150 40950 169
23 3109 71507 529
1 3101 3101 1
36 3100 111600 1296
24 3100 74400 576
11 3099 34089 121
21 3000 63000 441
30 2999 89970 900
2 2900 5800 4
17 2900 49300 289
21 2900 60900 441
30 2900 87000 900
21 2809 58989 441
23 2809 64607 529
20 2800 56000 400
23 2800 64400 529
23 2722 62606 529
59 2700 159300 3481
23 2700 62100 529
28 2700 75600 784
30 2700 81000 900
30 2700 81000 900
30 2700 81000 900
30 2700 81000 900
38 2671 101498 1444
7 2650 18550 49
16 2650 42400 256
30 2650 79500 900

Step 2: Find the sum of every column:

$$ \sum{X} = 3866 ~,~ \sum{Y} = 368324 ~,~ \sum{X \cdot Y} = 9973627 ~,~ \sum{X^2} = 136158 $$

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{ 368324 \cdot 136158 - 3866 \cdot 9973627}{ 137 \cdot 136158 - 3866^2} \approx 3127 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 137 \cdot 9973627 - 3866 \cdot 368324 }{ 137 \cdot 136158 - \left( 3866 \right)^2} \approx -15.52\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

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

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 387 644 solved problems