Ch4_3 - Next Previous Section 4.3: Linear Regression...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Next Previous Section 4.3: Linear Regression Section 4.3: Linear Regression 11 5 10 15 20 25 30 35 40 45 50 4 6 8 10 12 14 x y x y 5.1 0.6 5.9 2.5 6.5 13 8 21 9.5 25 10.5 31 12 45 data Minimize the sum of the distances between best fit line and the data. Section 4.3: Linear Regression (Curve Fitting) Next Previous Section 4.3: Linear Regression Section 4.3: Linear Regression 22 Paired Data x1,y 1 d 1 d 2 d 3 y = mx + b d 1 = y1 - y(x1) = y1 – ( mx1 + b) Note that difference between actual and predicted y value at point 1 is given by: Or in general, for all points, i, we can write: d i = yi - y(xi) = yi - (mxi + b) We now sum the squares of all the differences di (assume n pairs of data) Straight line to be “fit” to the data y x Straight line & y = mx + b Next Previous Section 4.3: Linear Regression Section 4.3: Linear Regression 33 Minimizing differences: least squares regression x1,y 1 d 1 d 2 d 3 y=mx + b y x Regression of y upon x ∑ + +- +- = i 2 i 2 i i i 2 i 2 i x m bmx 2 y mx 2 b by 2 y b m f ) ( ) , ( ® all xi and yi are known, ® only m and b are unknown ® minimize f(m,b) with respect to m and b Solving eqns. 1 and 2 simultaneously for m and b , gives: ∑ ∑ ∑ ∑-- = i 2 i i i i x x x x y y x m ) ( x m y b- = n y y i ∑ = n x x i ∑ = where, Line of regression of y upon x & y = mx + b n = number of data pairs ( 29 ( 29 x m 2 x b 2 y x 2 m b m f m b m f 2 i i i i = + +- = ∂ ∂ ⇒ = ∂ ∂ ∑ ∑ ∑ ) ( , , eqn. 1 ( 29 ( 29 x m 2 nb 2 y 2 b b m f b b m f i i = + +- = ∂ ∂ ⇒ = ∂ ∂ ∑ ∑ , , eqn. 2 Next Previous Section 4.3: Linear Regression Section 4.3: Linear Regression 44 ∑ ∑--- = 2 i i i x x y y x x m ) ( ) )( ( x m y b- = Both sets of equations give the same results. Alternate regression equations In addition, by substituting our expression for b, back into the equation y = mx + b, we can write the best fit equation as: ( 29 x x m y y- =- An alternate set of equations for calculating m and b, which may be used equally well are: where x and y are the averages of the x and y data given previously. Next...
View Full Document

This note was uploaded on 05/19/2008 for the course ENGR 25 taught by Professor All during the Spring '08 term at Lehigh University .

Page1 / 18

Ch4_3 - Next Previous Section 4.3: Linear Regression...

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

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