Regression_trafficapplications

Regression_trafficapplications - CEE 3604: Introduction to...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CEE 3604: Introduction to Transportation Engineering Applications of Linear Regression Drs. H. Baik and A. Trani Spring 2004
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CEE 3604 Slide 2 The Basic Question Suppose we have 10 data points, (i.e., n=10) What is the equation of a line, y = ax + b , that represents these data points? Procedure: Find parameters a and b . Estimate the goodness of this fit >>(R 2 ) x (=time, min.) y_obs (=temp, K) 0 298 1 299 2 301 3 304 4 306 5 309 6 312 7 316 8 319 9 322
Background image of page 2
CEE 3604 Slide 3 Find Parameters a and b in y = a x+ b . Minimize Prediction Error (or S um of the S quare of the D eviation, SSD ) ! ! ! = = = " " = + = = " = = n 1 i 2 i obs i i i pred i n 1 i 2 pred i obs i n 1 i 2 ) ) b ax (y SSD i.e., b. ax y eq. line the from obtained for x y of value predicted y where, ) y (y Error) n (Predictio SSD y = ax + b y i obs y i pred (=ax i +b) x i We like to minimize SSD by selecting appropriate values of coefficients a & b.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CEE 3604 Slide 4 Normal Equations to Find a and b To minimize SSD ! ! ! ! ! ! ! = = = = = = = + = = " = # # + = = " = # # = # # = # # n 1 i n 1 i i obs i n 1 i i obs i n 1 i n 1 i n 1 i i 2 i obs i i i n 1 i i obs i (2) bn x a y 0, 1) ( b) - ax - (y 2 b SSD (1) x b x a y x 0, ) x ( b) - ax - (y 2 a SSD 0 b SSD a SSD ) ) ) b ax (y ( n 1 i 2 i obs i ! = " " = ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! = = = = = = = = = = = = = = = = " " # $ % % ( = " " # $ % % ( = ) ) * + , , - . " " # $ % % ( = / ( / n 1 i 2 n 1 i i 2 i n 1 i n 1 i n 1 i i obs i obs i i n 1 i 2 n 1 i i 2 i n 1 i n 1 i n 1 i i obs i obs i i n 1 i n 1 i 2 n 1 i i 2 i n 1 i n 1 i i obs i obs i i n 1 i i x n 1 x x y n 1 - y x x x n x y - y x n a so, x x n a x y - y x : x (2) n (1) n x a y b : (2) From n 1 i n 1 i i obs i ! ! = = " =
Background image of page 4
CEE 3604 Slide 5 What if b = 0, i.e., y = ax? To minimize SSD x a y x 0, ) x ( ) ax - (y 2 da dSSD 0 da dSSD n 1 i n 1 i 2 i obs i i i n 1 i i obs i ! ! ! = = = = = " = = ) ) ax (y ( n 1 i 2 i obs i ! = " = x y x a so, n 1 i 2 i n 1 i obs i n 1 i i ! ! ! = = = =
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CEE 3604 Slide 6  Using a spreadsheet like Excel to compute a and b the long way using equations shown in slide 4 of this handout  Using the ‘ Trend Line’ in chart option  Using tools\data analysis\Regression  Use Matlab curve fit analysis procedure An example
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/31/2011 for the course CEE 3604 taught by Professor Katz during the Fall '08 term at Virginia Tech.

Page1 / 39

Regression_trafficapplications - CEE 3604: Introduction to...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online