# Regression Residuals Calculator

**
Instructions:
**
Use this Regression Residuals Calculator to find the residuals of a linear regression analysis for the independent and dependent data provided. Please input the data for the independent variable \((X)\) and the dependent variable (\(Y\)), in the form below:

## How to Compute Regression Residuals

Regression residuals correspond to the difference between the observed values (\(y\)) and the corresponding predicted values (\(\hat y\)).

Let us recall that if \(\hat \beta_0\) and \(\hat \beta_1\) are the corresponding estimated y-intercept and slope, respectively, then the predicted value (\(\hat y\)) for a given value \(x\) is

\[ \hat y = \hat \beta_0 + \hat \beta_1 x \]Then, the residual associated to the pair \((x,y)\) is defined using the following residual statistics equation:

\[ \text{Residual} = y - \hat y \]The residual represent how far the prediction is from the actual observed value. This means that we would like to have as small as possible residuals.

Indeed, the idea behind least squares linear regression is to find the regression parameters based on those who will minimize the sum of squared residuals.

### What does This Residual Calculator do?

What this residual calculator will do is to take the data you have provided for X and Y and it will calculate the linear regression model, step-by-step.

Then, for each value of the sample data, the corresponding predicted value will calculated, and this value will be subtracted from the observed values y, to get the residuals.

All of this will be tabulated and neatly presented to you. Also, a scatterplot of residuals versus predicted values will be presented. This residual plot is crucial to assess whether or not the linear regression model assumptions are met.

### What else can you do with these data

Usually, one initial step in conducting a linear regression analysis is to conduct a correlational analysis. You can use our correlation coefficient calculator to find the correlation coefficient, that indicates the degree of association between the two variables.

The calculation of the correlation coefficient usually goes along with the construction of a scatter plot. Using a scatterplot and the correlation coefficient we can decide whether or not it is appropriate to conduct a linear regression analysis, especially if we found out using this correlation coefficient significance calculator , that the correlation is significantly different from zero.