Exam 2 Average: 85.6 Median: 87.0 Maximum: 100.0 Minimum: 55.0 Standard Deviation: 10.42 Fall 2011 1
Today s class Multiple Variable Linear Regression Polynomial Interpolation Lagrange Interpolation Newton Interpolation 2
Multiple Variable Linear Least Square Approximation 3
Multiple Linear Regression 4
General Linear Least Squares Simple linear, polynomial, and multiple linear regressions are special cases of the general linear least squares model Linear in a i, but z i may be highly nonlinear Examples: 5
General Linear Least Squares General equation in matrix form Where 6
General Linear Least Squares As usual, take partial derivatives to minimize the square errors S r This leads to the normal equations Solve this for {a} 7
Interpolation & Extrapolation Interpolation data to be found are within the range of observed data. Extrapolation data to be found are beyond the range of observation data. (may not be reliable) 8
Interpolation 9
Polynomial Interpolation 10
Linear Interpolation Errors are larger when the interval is larger. Smaller interval provides a better estimate. 11
Linear Interpolation Quadratic interpolation gives a better estimate than linear interpolation when the change in a function is smooth and slowly. 12
Direct Method Solve the system of equations for the coefficients. It is time consuming and the coefficient matrix may be ill-conditioned. 13
Newton (divided difference) Interpolation polynomials f 1 ( x) f ( x0) f ( x1 ) f ( x0) x x 0 = x 1 x 0 14
Newton (divided difference) Interpolation polynomials x 2 -x 0 x 2 -x 0 15
General Scheme for Divided Difference Coefficients 16
General Scheme for Divided Difference Coefficients 17
Example Estimate ln2 with data points at (1,0) and (4,1.386294) Linear interpolation 18
Example Estimate ln2 with data points at (1,0), (4,1.386294), and (5,1.609438) Quadratic interpolation 19
Example Estimate ln2 with data points at (1,0), (4,1.386294), (5,1.609438), (6,1.791759) Cubic interpolation 20
Newton s Interpolating Polynomial Error Similar to Taylor series remainder Proportional to n+1th finite divided difference Also proportional to the distance of the data points from x 21
Lagrange Interpolation Polynomials Nth order polynomial: interpolate n+1 points The Lagrangian coefficient, L i (x) will be 1 at x=x i and 0 at all other data points Thus, f n (x i )=f(x i ) for all i, meaning that the Lagrangian polynomial passes through all the data points as expected. 22
Lagrange Interpolating Polynomials Linear polynomial: interpolate 2 points 2nd order polynomial: interpolate 3 points 23
Lagrange Interpolating Polynomials 24
Example Estimate ln2 with data points at (1,0), (4,1.386294), (5,1.609438) 2nd order Lagrangian interpolation 25
Lagrange & Newton Interpolation The forms of the Lagrangian and Newton polynomials look different, but they are actually equivalent if the data points are the same The Lagrangian coefficients are easier to calculate since the divided difference computation is not required However, if you are adding new data points, the Newton method is more efficient since the earlier coefficients remain the same 26
Next class Spline Interpolation Fourier Approximation HW8 due Dec 8 27