What Are the Steps for Calculating Residuals in a Regression Model?

  • Context: Undergrad 
  • Thread starter Thread starter joe007
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the steps for calculating residuals in a regression model, specifically in the context of analyzing traffic volume and accident rates on highways. Participants are seeking clarification on how to compute individual residuals and interpret the results.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant presents data on traffic volume and accident rates and requests assistance in calculating residuals and interpreting a residual plot.
  • Another participant attempts to calculate the first residual but confuses the variables in their equation, leading to an incorrect result.
  • A third participant clarifies the definition of a residual as the difference between the predicted and actual y values, suggesting that the original equation may have been misapplied.
  • A later reply questions the accuracy of the calculated value for Syy, suggesting potential arithmetic errors without providing a definitive correction.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct calculation of residuals and the interpretation of the regression model. There is no consensus on the arithmetic accuracy or the correct approach to calculating residuals.

Contextual Notes

Participants have not resolved the discrepancies in their calculations, and there are indications of potential arithmetic errors in the provided values. The discussion does not clarify the assumptions or definitions used in the calculations.

joe007
Messages
23
Reaction score
0
calculating residuals help!

Along 14 separate sections of highway measurements of trac volume (x) and rate of
accidents (y) were taken.

x; 303, 294, 242, 236 ,267, 213, 233, 292 ,287 ,215 ,231 ,195 ,255 ,298
y; 30, 27, 23, 20, 26, 20, 22, 29, 27, 20, 23, 20, 26 ,27

(a)Calculate the coefficient of correlation between trac volume and acci-
dent rate.
Sxy=1566.57
Sxx=16759.214
Syy=164.857
well i used the formula: r=Sxy/sqrt(Sxx*Syy)=0.94247

(b)Obtain residuals and sketch a residual plot (residuals against trac
volume). Explain what the plot tells us about the t of the regression

i know the general formula f(x)=a+bx, where i found a=0.509 and b=0.0934

but how do i obtain individual residuals
 
Physics news on Phys.org


anyone have any idea on residuals well i tried this for the first residual at x=303 and
y=30 f(x)=303-(0.509+0.09(30)) =2.2 but R tells me it it 1.67

can u tell me what's wrong with this cheers :)
 


A "residual" is a differences between the predicted y value and the actual y value. You have subtracted something from "303", which is an x value. Perhaps you wrote an equation that predicts x in terms of y instead of vice-versa.
 


yep sorry it shud be 30-(0.509+0.09(303)) but i get a weird answer
 


I didn't check your arithmetic, but 164.857 looks too small for Syy. Maybe you made arithmetical errors.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K