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|cccccc}X&8.5&7.1&7.2&5.6&5.6&4.0\\Y&1.3&2.3&3.4&4.8&6.1&8.3\end{array}$$

The equation of the regression line is:

$$y~=~14.37 ~-~ 1.58 \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$ 
8.5 1.3 11.05 72.25
7.1 2.3 16.33 50.41
7.2 3.4 24.48 51.84
5.6 4.8 26.88 31.36
5.6 6.1 34.16 31.36
4.0 8.3 33.2 16

Step 2: Find the sum of every column:

$$ \sum{X} = 38 ~,~ \sum{Y} = 26.2 ~,~ \sum{X \cdot Y} = 146.1 ~,~ \sum{X^2} = 253.22 $$

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{ 26.2 \cdot 253.22 - 38 \cdot 146.1}{ 6 \cdot 253.22 - 38^2} \approx 14.37 \\ \\b &= \frac{ n \cdot \sum{XY} - \sum{X} \cdot \sum{Y}}{n \cdot \sum{X^2} - \left(\sum{X}\right)^2} = \frac{ 6 \cdot 146.1 - 38 \cdot 26.2 }{ 6 \cdot 253.22 - \left( 38 \right)^2} \approx -1.58\end{aligned}$$

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

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

Report an Error !

Script name : correlation-and-regression-calculator

Form values: 8.5,7.1,7.2,5.6,5.6,4.0 , 1.3,2.3,3.4,4.8,6.1,8.3 , expl , reg , g , , , Regression line X = [ 8.5,7.1,7.2,5.6,5.6,4.0 ] , Y = [ 1.3,2.3,3.4,4.8,6.1,8.3 ]

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

New service on Mathportal

You can hire our experts to do your math homework.

We provide complete, handwritten, step-by-step solutions.

Get a free quote
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 432 230 solved problems