Correlation and regression calculator

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

Result:

You entered the following data:

$$\begin{array}{c|cccccccccccccccccccccccccccccccccccc}X&48.91&49.10&45.92&38.34&33.75&33.62&37.04&41.65&46.59&45.09&49.20&47.12&59.47&60.30&59.63&47.60&49.76&48.24&53.27&66.15&80.54&91.16&95.96&98.17&105.37&102.71&99.74&101.58&102.59&97.49&98.42&92.72&96.38&102.33&107.65&105.03\\Y&95.42&95.88&93.05&94.58&98.22&99.65&98.75&100.21&97.02&96.48&95.85&97.44&95.66&96.99&94.71&98.66&95.32&95.00&90.65&88.41&87.02&86.05&82.78&81.52&79.81&80.40&79.53&80.25&79.72&81.40&80.19&80.66&80.26&80.32&82.14&81.54\end{array}$$

The equation of the regression line is:

$$y~=~109.2 ~-~ 0.2793 \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$ 
48.91 95.42 4666.9922 2392.1881
49.10 95.88 4707.708 2410.81
45.92 93.05 4272.856 2108.6464
38.34 94.58 3626.1972 1469.9556
33.75 98.22 3314.925 1139.0625
33.62 99.65 3350.233 1130.3044
37.04 98.75 3657.7 1371.9616
41.65 100.21 4173.7465 1734.7225
46.59 97.02 4520.1618 2170.6281
45.09 96.48 4350.2832 2033.1081
49.20 95.85 4715.82 2420.64
47.12 97.44 4591.3728 2220.2944
59.47 95.66 5688.9002 3536.6809
60.30 96.99 5848.497 3636.09
59.63 94.71 5647.5573 3555.7369
47.60 98.66 4696.216 2265.76
49.76 95.32 4743.1232 2476.0576
48.24 95.00 4582.8 2327.0976
53.27 90.65 4828.9255 2837.6929
66.15 88.41 5848.3215 4375.8225
80.54 87.02 7008.5908 6486.6916
91.16 86.05 7844.318 8310.1456
95.96 82.78 7943.5688 9208.3216
98.17 81.52 8002.8184 9637.3489
105.37 79.81 8409.5797 11102.8369
102.71 80.40 8257.884 10549.3441
99.74 79.53 7932.3222 9948.0676
101.58 80.25 8151.795 10318.4964
102.59 79.72 8178.4748 10524.7081
97.49 81.40 7935.686 9504.3001
98.42 80.19 7892.2998 9686.4964
92.72 80.66 7478.7952 8596.9984
96.38 80.26 7735.4588 9289.1044
102.33 80.32 8219.1456 10471.4289
107.65 82.14 8842.371 11588.5225
105.03 81.54 8564.1462 11031.3009

Step 2: Find the sum of every column:

$$ \sum{X} = 2538.59 ~,~ \sum{Y} = 3221.54 ~,~ \sum{X \cdot Y} = 220229.5907 ~,~ \sum{X^2} = 203867.3725 $$

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{ 3221.54 \cdot 203867.3725 - 2538.59 \cdot 220229.5907}{ 36 \cdot 203867.3725 - 2538.59^2} \approx 109.2 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 36 \cdot 220229.5907 - 2538.59 \cdot 3221.54 }{ 36 \cdot 203867.3725 - \left( 2538.59 \right)^2} \approx -0.2793\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 48.91,49.10,45.92,38.34,33.75,33.62,37.04,41.65,46.59,45.09,49.20,47.12,59.47,60.30,59.63,47.60,49.76,48.24,53.27,66.15,80.54,91.16,95.96,98.17,105.37,102.71,99.74,101.58,102.59,97.49,98.42,92.72,96.38,102.33,107.65,105.03 , 95.42,95.88,93.05,94.58,98.22,99.65,98.75,100.21,97.02,96.48,95.85,97.44,95.66,96.99,94.71,98.66,95.32,95.00,90.65,88.41,87.02,86.05,82.78,81.52,79.81,80.40,79.53,80.25,79.72,81.40,80.19,80.66,80.26,80.32,82.14,81.54 , reg

Comment (optional)

Share Result

Share this result with others by using the link below.

You can click here to verify link or you can just copy and paste 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 corelation 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.

Quick Calculator Search

Was this calculator helpful?

Yes No
211 190 643 solved problems