Tanvesh
Tanvesh
Masters in Structural Engineering | Research Interest - Artificial Intelligence and Machine learning in Civil Engineering | Youtuber | Teacher | Currently working as Research Scholar at NIT Goa

Table of Contents

Contact Us:

If you find any error in this calculator, your feedback would be highly appreciated.

Kindly mail to support@dcbaonline.com

Linear regression calculator for regression coefficient, correlation, mean square error, mean absolute error, root mean squared error, residual squared error.

Linear Regression Calculator

Find more calculator:

1 – dimensional data statistical analysis.

Youtube Channel

 

How to use calculator

This linear regression calculator can be used for linear regression analysis of two data ranges. It can calculate the regression coefficients, correlation between the data, various types of evaluation metrics and summation and statistical parameter for the given data.

  1. Enter the numbers separated by comma or separated by space or vertically stacked data copied from excel.
  2. User can input whole number (eg: 2,3 etc.) or decimal numbers (eg: 3.5, 9.2 etc.), but care should be taken that fraction should not be put (eg: 3/7, 2/3 etc.)

Regression coefficients

In linear regression analysis the points are scattered in 2D plane and to predict any unknown value a best fit line has to be plotted amongst the scattered points.

There are multiple ways to draw a line through the scattered points but the best fit line would be that line which has the error minimized for the predicted values.

The equation of the best fit line is given as = Ax + B; where A and B are called as the regression coefficients.

Coefficient A is given as:

A=\frac{\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)\left(y_{i}-\bar{y}\right)}{\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)^{2}}

Coefficient B is given as:

B=\bar{y}-A * \bar{x}

where x bar and y bar are the mean values of x and y data ranges.

Correlation

Correlation relates to the degree to which two data ranges correlate to each other.

A correlation coefficient ranges from -1 to 1, where -1 will be for two series which are perfectly opposite to each other and +1 will be for the two series which are exactly identical to each other. The correlation formula is given as:

R=\frac{\sum\left(x_{i}-\bar{x}\right)\left(y_{i}-\bar{y}\right)}{\sqrt{\sum\left(x_{i}-\bar{x}\right)^{2} \sum\left(y_{i}-\bar{y}\right)^{2}}}

Evaluation metrics in regression models

To evaluate the performance and reliability of a regression there are several evaluation metrics which have to be determined in order to have the best prediction of unknown value. Following five performance evaluation metrics are mostly used.

Mean absolute error

M A E=\frac{1}{n} \sum_{i=1}^{n}\left|y_{i}-\widehat{y}_{i}\right|

Mean squared error

M S E=\frac{1}{n} \sum_{i=1}^{n}\left(y_{i}-\widehat{y}_{i}\right)^{2}

Root mean squared error

R M S E=\sqrt{\frac{1}{n} \sum_{i=1}^{n}\left(y_{i}-\widehat{y}_{i}\right)^{2}}

Residual absolute error

R A E=\frac{\sum_{i=1}^{n}\left|y_{i}-\widehat{y}_{i}\right|}{\sum_{i=1}^{n}\left|y_{i}-\bar{y}\right|}

Residual squared error

R S E=\frac{\sum_{i=1}^{n}\left(y_{i}-\widehat{y}_{i}\right)^{2}}{\sum_{i=1}^{n}\left(y_{i}-\bar{y}\right)^{2}}

Other parameters

This linear regression calculator can also calculate the summation of both series, summation of the product of both series

error: Content is protected !!