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

  • Thread starter joe007
  • Start date
In summary, the conversation discusses calculating residuals and creating a residual plot for a regression analysis between traffic volume and accident rate along 14 different sections of highway. The coefficient of correlation is found to be 0.94247 and the formula used is r=Sxy/sqrt(Sxx*Syy). The residual plot is used to determine the fit of the regression, with a=0.509 and b=0.0934. However, there may have been errors in calculating the individual residuals, as the value for Syy seems too small.
  • #1
joe007
23
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
  • #2


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 :)
 
  • #3


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.
 
  • #4


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


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

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

What are residuals and why are they important in calculations?

Residuals are the differences between the actual values and the predicted values in a statistical model. They are important because they indicate how well a model fits the data and can help identify any patterns or trends that the model may have missed.

How do I calculate residuals?

To calculate residuals, you subtract the predicted value from the actual value for each data point. The resulting values are the residuals for each data point in the model.

What do positive and negative residuals indicate?

Positive residuals indicate that the model has underestimated the actual value, while negative residuals indicate an overestimation. Ideally, the residuals should be evenly distributed around zero, indicating a good fit of the model to the data.

How do I interpret the values of residuals?

The values of residuals can be interpreted as the distance between the actual data point and the predicted value. A larger residual indicates a larger difference between the two, while a smaller residual indicates a closer match between the two values.

Can I use residuals to identify outliers in my data?

Yes, residuals can be used to identify outliers in data. Outliers will have larger residuals compared to the rest of the data points and can be easily identified by plotting the residuals on a graph. However, it is important to note that not all large residuals are outliers and further investigation is needed to confirm any potential outliers.

Similar threads

Back
Top