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|ccccccccc}X&4&6&6&13&14&15&18&20&28\\Y&23433&23100&27600&18800&17600&25000&21800&23800&19200\end{array}$$

The equation of the regression line is:

$$y~=~24868 ~-~ 189.3 \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$ 
4 23433 93732 16
6 23100 138600 36
6 27600 165600 36
13 18800 244400 169
14 17600 246400 196
15 25000 375000 225
18 21800 392400 324
20 23800 476000 400
28 19200 537600 784

Step 2: Find the sum of every column:

$$ \sum{X} = 124 ~,~ \sum{Y} = 200333 ~,~ \sum{X \cdot Y} = 2669732 ~,~ \sum{X^2} = 2186 $$

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{ 200333 \cdot 2186 - 124 \cdot 2669732}{ 9 \cdot 2186 - 124^2} \approx 24868 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 9 \cdot 2669732 - 124 \cdot 200333 }{ 9 \cdot 2186 - \left( 124 \right)^2} \approx -189.3\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 4 6 6 13 14 15 18 20 28 , 23433 23100 27600 18800 17600 25000 21800 23800 19200 , reg , g , , , , Regression line X = [ 4 6 6 13 14 15 18 20 28 ] , Y = [ 23433 23100 27600 18800 17600 25000 21800 23800 19200 ]

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 414 509 solved problems