ADVERTISEMENT
FEEDBACK

Adblocker Detected

ad
Uh Oh! It seems you’re using an Ad blocker!

We always struggled to serve you with the best online calculations, thus, there's a humble request to either disable the AD blocker or go with premium plans to use the AD-Free version for calculators.

Disable your Adblocker and refresh your web page 😊

Linear Regression Calculator

Linear Regression Calculator

Enter X Values (Separated By Comma)

Enter Y Values (Separated By Comma)

Estimate: ? (Separated By Comma) optional

ADVERTISEMENT

The linear regression calculator find the linear regression by using the least square method. Get instant calculations for a line of best fit along with graphical interpretation.

What Is Linear Regression?

“Linear regression is the predictive analysis in which the value of a variable is predicted by considering another variable”

A linear regression always shows that there is a linear relationship between the variables. To readily get the linear regression calculations, our linear regression calculator is the most trusted tool that you can rely on.

Linear Regression Formula:

You can evaluate the line representing the points by using the following linear regression formula for a given data:

ŷ=bX+a

where;

ŷ = dependent variable to be determined

b= slope of the line

X = independent variable

a = intercept (the value of y when X = 0)

A regression equation calculator uses the same mathematical expression to predict the results. You can determine the value of a and b by subjecting them to the following equations:

a = MY − (b × MX)

Where;

Mx = mean value for x

My = mean value for y

Value of b = SP/SSx

Where;

SP (∑xy) = (X – Mx)*(Y – My)

SSx (∑x²) = (X – Mx)^2

How To Find Line of Best Fit?

Let us solve a couple of examples to better understand the linear regression analysis:

Example:

Find the least squares regression line for the data set as follows:

{(2, 9), (5, 7), (8, 8), (9, 2)}.

Also, work for the estimated value of y for the value of X to be 2 and 3.

Solution:

Sum of X = 24

Sum of Y = 26

The mean is evaluated as :

Mean of X = Mx = 2 + 5 + 8 + 9/4 = 6

Mean of Y = My = 9 + 7 + 8 + 2/4 = 6.5

Now, we have to calculate the following quantities:

X – Mx Y – My (X – Mx)2 (X – Mx)*(Y – My)
-4 2.5 16 -10
-1 0.5 1 -0.5
2 1.5 4 3
3 4.5 9 -13.5

SSx (∑x²) = (X – Mx)2

= 16+1+4+9

= 30

SP (∑xy) = (X – Mx)*(Y – My)

= -10-0.5+3-13.5

= -21

Now, we have to determine the linear regression equation:

ŷ= bX+a

Determining the value of a and b as follows:

b = SP/SSx

= -21 / 30

= -07

a = MY−(b×MX)

= 6.5 – (-.07 * 6)

=10.7

Now, putting all the values in linear regression formula:

ŷ = -0.7x + 10.7

For given values of X, the estimated values of Y are as follows:

Estimate Estimated Y
2 9.3
3 8.6

The graphical plot of line of best fit is as follows: