8 - TEXAS A&M UNIVERSITY TEXAS A&M UNIVERSITY...

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

View Full Document Right Arrow Icon
TEXAS A&M UNIVERSITY DEPARTMENT OF MECHANICAL ENGINEERING TEXAS A&M UNIVERSITY COLLEGE STATION, TX 77843-3123 979 845 1251 FAX 979 845 3081 1 of 16 R. Langari, 2/12/06 Linear and Nonlinear Regression Objective: To find the best function that can fit a given set of data points: The choice of linear or nonlinear curve-fit or regression is up to the user but must be based on some quantifiable measure(goodness of fit.) Linear regression is the simplest choice but some types of nonlinear regression can be done using the same formulations as linear regression. x y 1 2 3 4 5 i x i y i x 1 y 1 x 2 y 2 x 3 y 3 x 4 y 4 x 5 y 5 x 1 x 2 x 3 x 4 x 5 y 1 y 5 x y x 1 x 2 x 3 x 4 x 5 y 1 y 5 DEPARTMENT OF MECHANICAL ENGINEERING TEXAS A&M UNIVERSITY COLLEGE STATION, TX 77843-3123 979 845 1251 FAX 979 845 3081 2 of 16 Linear and Nonlinear Regression R. Langari, 02/12/06 Linear Regression Find the best line, , that fits a given data set: For each we have the originally given as well as the value of given by (1) There is usually an error, between these two values, , which is the basis for finding the best and discussed next. ya xb + = 12 . 1 22 . 3 33 . 5 43 . 4 54 . 3 x i y i x y 012345 1 2 3 b 4 1 a slope offset e i y i yx i () = x i y i y i ax i b + = e i e i y i i = a b DEPARTMENT OF MECHANICAL ENGINEERING TEXAS A&M UNIVERSITY COLLEGE STATION, TX 77843-3123 979 845 1251 FAX 979 845 3081 3 of 16 Linear and Nonlinear Regression R. Langari, 02/12/06 Linear Regression Analysis The slope, and the offset, of the line are found through least squares minimization of sum of all squared errors, s: (2) Substituting for its value from (1) we have (3) which expands into (4) Now taking the derivative with respect to and setting it to zero, we have (5) Similarly for (6) a b e i 2 e i 2 i 1 = N y i i 2 i 1 = N = i e i 2 i 1 = N y i i b + 2 i 1 = N = e i 2 i 1 = N y i 2 i 1 = N a 2 x i 2 i 1 = N 2 ab x i i 1 = N Nb 2 2 y i i b + i 1 = N ++ + = a 2 i 2 i 1 = N 2 bx i i 1 = N 2 y i x i i 1 = N +0 = b 2 i i 1 = N 2 2 y i i 1 = N = DEPARTMENT OF MECHANICAL ENGINEERING TEXAS A&M UNIVERSITY COLLEGE STATION, TX 77843-3123 979 845 1251 FAX 979 845 3081 4 of 16 Linear and Nonlinear Regression R. Langari, 02/12/06 Equations of Linear Regression The two equations just derived form a set of simultaneous equations to be solved for and leading to the solution given next (7) and (8) Remarks: We can find and from the above to determine the best linear fit, for the given data set.
Background image of page 1

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

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

This note was uploaded on 12/26/2010 for the course MEEN 260 taught by Professor Langari during the Fall '08 term at Texas A&M.

Page1 / 4

8 - TEXAS A&M UNIVERSITY TEXAS A&M UNIVERSITY...

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

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