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

ADVERTISEMENT

Enter X Values (Separated By Comma)

Enter Y Values (Separated By Comma)

Estimate: ? (Separated By Comma) optional

ADVERTISEMENT
ADVERTISEMENT

The linear regression calculator calculates the simple linear regression by using the least square method. Get instant calculations for a line of best fit along with graphical interpretation. The calculator also shows complete steps for the work it does!

What Is Linear Regression In Statistics?

“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 Equation:

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

The online linear regression calculator uses all these formulas to predict the results.

How To Find Line of Best Fit?

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

Example # 01:

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:

Using free best fit line calculator assists you to generate estimated values for which you have to plot the line of best fit.

How Linear Regression Calculator Works?

The online regression line calculator is quite simple to use an requires you to input the following values to calculate instant results.

Input:

  • Enter the values of x
  • After this, Enter the values of y
  • If asked, then input the values of X to determine estimated values of Y
  • Click ‘Calculate

Output:

  • Sum of X and Y
  • Mean of X and Y
  • Regression line equation
  • Step-by-step calculations
  • A rectangular plot of the regression line

FAQ’s:

Where Regression Analysis Is Used?

Linear regression has a vast use in the field of finance, biology, mathematics, and statistics.

What Is Residual In Regression?

The difference between an observed value of the response variable and the value of the response variable predicted from the regression line is known as residual in the regression line.

References:

From the source of wikipedia: Interpretation, Extensions, General linear models, Heteroscedastic models, Generalized linear models, Trend line, Machine learning, Economics, Finance.

From the source of khan academy: Fitting a line to data, Equations of trend lines, Estimating the line of best fit.