Skip to content
Regression Residuals

Regression Residuals

Download: RegressionResiduals_init.xlsx

Introduction

Residuals are an important set of statistics in regression analysis: they represent the variation of the yy variable that is not explained by the regression model. For a given data set they can be calculated as

ei =yi−y^i=yi−b1xi−b0 \begin{align*} e_i\ &= y_i - \hat{y}_i\\ &= y_i - b_1 x_i - b_0 \tag{SLR model} \end{align*}

where y^i\hat{y}_i (read as “y-hat”) are the values predicted by the regression model for the values xix_i (ie, the “fitted” values). If the chosen regression model correctly represents the systematic variation of variable yy due to variable xx then the residuals represent the random variability in yy.

Residuals are used for a wide variety of purposes in regression analysis, including diagnosing whether we have in fact chosen the correct regression model. In this screencast we show how to calculate and interpret the standard deviation of the residuals, sress_\text{res}.

Learning Goals

  • learn how to calculate residuals eie_i for a fitted regression model
  • learn how to calculate and interpret the standard deviation of the residuals and its degrees of freedom

Tasks

  • Use SLOPE and INTERCEPT functions to calculate b1b_1 and b0b_0, which are the least-squares estimates of regression model parameters β1\beta_1 and β0\beta_0
  • Use those values to calculate fitted y^i\hat{y}_i and eie_i values for the calibration data
  • Assuming that all measurements share the same standard deviation σ\sigma (ie assume homogeneous variance), calculate seven different estimates of the shared σ\sigma along with their DOFs. State the assumptions for each.
  • Compare the standard deviation of the residuals as calculated with STDEV.S and STEYX and understand why they are different. Which is sress_\text{res}?

When you are finished, your Excel worksheet should look like the image below.

Calibration data with residuals plotted around zero below the fitted line, and a table comparing group SDs, pooled SD (0.105) and s_res (0.108)