Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculating residuals help

  1. Aug 25, 2011 #1
    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.
    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
  2. jcsd
  3. Aug 25, 2011 #2
    Re: calculating residuals help!!

    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 whats wrong with this cheers :)
  4. Aug 25, 2011 #3

    Stephen Tashi

    User Avatar
    Science Advisor

    Re: calculating residuals help!!

    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.
  5. Aug 26, 2011 #4
    Re: calculating residuals help!!

    yep sorry it shud be 30-(0.509+0.09(303)) but i get a weird answer
  6. Aug 26, 2011 #5

    Stephen Tashi

    User Avatar
    Science Advisor

    Re: calculating residuals help!!

    I didn't check your arithmetic, but 164.857 looks too small for Syy. Maybe you made arithmetical errors.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook