Presentation is loading. Please wait.

Presentation is loading. Please wait.

Today’s class Multiple Variable Linear Regression

Similar presentations


Presentation on theme: "Today’s class Multiple Variable Linear Regression"— Presentation transcript:

1 Today’s class Multiple Variable Linear Regression
Polynomial Interpolation Lagrange Interpolation Newton Interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

2 Mid-term Exam 2 Average = 83, Standard deviation = 27
Max = 100, Min = 60 Numerical Methods Fall 2010 Lecture 21 Prof. Lei Wang ECE, UConn

3 Multiple Variable Linear Least Square Approximation
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

4 Multiple Linear Regression
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

5 General Linear Least Squares
Simple linear, polynomial, and multiple linear regressions are special cases of the general linear least squares model Linear in ai, but zi may be highly nonlinear Examples: Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

6 General Linear Least Squares
General equation in matrix form Where Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

7 General Linear Least Squares
As usual, take partial derivatives to minimize the square errors Sr This leads to the normal equations Solve this for {a} Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

8 Interpolation & Extrapolation
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) Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

9 Interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

10 Polynomial Interpolation
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

11 Linear Interpolation Errors are larger when the interval is larger.
Smaller interval provides a better estimate. Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

12 Linear Interpolation Quadratic interpolation gives a better estimate than linear interpolation when the change in a function is smooth and slowly. Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

13 Direct Method Solve the system of equations for the coefficients. It is time consuming and the coefficient matrix may be ill-conditioned. Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

14 Newton (divided difference) Interpolation polynomials
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

15 Newton (divided difference) Interpolation polynomials
x2-x0 Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

16 General Scheme for Divided Difference Coefficients
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

17 General Scheme for Divided Difference Coefficients
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

18 Example Estimate ln2 with data points at (1,0) and (4,1.386294)
Linear interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

19 Example Estimate ln2 with data points at (1,0), (4, ), and (5, ) Quadratic interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

20 Example Estimate ln2 with data points at (1,0), (4, ), (5, ), (6, ) Cubic interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

21 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 Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

22 Lagrange Interpolation Polynomials
Nth order polynomial: interpolate n+1 points The Lagrangian coefficient, Li(x) will be 1 at x=xi and 0 at all other data points Thus, fn(xi)=f(xi) for all i, meaning that the Lagrangian polynomial passes through all the data points as expected. Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

23 Lagrange Interpolating Polynomials
Linear polynomial: interpolate 2 points 2nd order polynomial: interpolate 3 points Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

24 Lagrange Interpolating Polynomials
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

25 Example Estimate ln2 with data points at (1,0), (4, ), (5, ) 2nd order Lagrangian interpolation Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

26 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 Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn

27 Next class Spline Interpolation Fourier Approximation HW8 due Dec 8
Numerical Methods Lecture 20 Prof. Jinbo Bi CSE, UConn


Download ppt "Today’s class Multiple Variable Linear Regression"

Similar presentations


Ads by Google