Calculating Residuals Statistics