Download presentation
Presentation is loading. Please wait.
Published byPhyllis Preston Modified over 9 years ago
2
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002
3
Lecture’s Goals Discrete Least Square Approximation –Linear –Quadratic –Higher order Polynomials –Nonlinear Continuous Least Square –Orthogonal Polynomials –Gram Schmidt -Legendre Polynomial
4
Approximation Methods Interpolation matches the data points exactly. In case of experimental data, this assumption is not often true. Approximation - we want to consider the curve that will fit the data with the smallest “error”. What is the difference between approximation and interpolation?
5
Least Square Fit Approximations Suppose we want to fit the data set. We would like to find the best straight line to fit the data?
6
Least Square Fit Approximations The problem is how to minimize the error. We can use the error defined as: However, the errors can cancel one another and still be wrong.
7
Least Square Fit Approximations We could minimax the error, defined as: The error minimization is going to have problems.
8
Least Square Fit Approximations The solution is the minimization of the sum of squares. This will give a least square solution. This is known as the maximum likelihood principle.
9
Least Square Approximations Assume: The error is defined as:
10
Least Square Error The sum of the errors: Substitute for the error
11
Least Square Error How do you minimize the error? Take the derivative with the coefficients and set it equal to zero.
12
Least Square Error The first component, a
13
Least Square Error The second component, b
14
Least Square Coefficients The equations can be rewritten
15
Least Square Coefficients The equations can be rewritten
16
Least Square Coefficients The coefficients are defined as:
17
Least Square Example Given the data: Using the results into table of the values:
18
Least Square Example The equation is:
19
Least Square Error How do you minimize the error for a quadratic fit? Take the derivative with the coefficients and set it equal to zero.
20
Least Square Coefficients for Quadratic fit The equations can be written as:
21
Least Square of Quadratic Fit The matrix can be solved using a Gaussian elimination and the coefficients can be found.
22
Quadratic Least Square Example Given a set of data The linear results:
23
Quadratic Least Square Example
24
The results are: a = 0.225, b = -1.018, c = 0.998 y = 0.225x 2 -1.018x + 0.998
25
Polynomial Least Square The technique can be used to all forms of polynomials of the form:
26
Polynomial Least Square Solving large sets of linear equations are not a simple task. They can have the undesirable property known as ill-conditioning. The results of this method is that round-off errors in solving for the coefficients cause unusually large errors in the curve fits.
27
Polynomial Least Square How do you measure the error of higher order polynomials?
28
Polynomial Least Square Or measure of the variance of the problem Where, n is the degree polynomial and N is the number of elements and Y k are the data points and,
29
Polynomial Least Square Example Example 2 can be fitted with cubic equation and the coefficients are: a 0 =1.004 a 1 = -1.079 a 2 = 0.351 a 3 = - 0.069
30
Polynomial Least Square Example However, if we were to look at the higher order polynomials such the sixth and seventh order. The results are not all that promising.
31
Polynomial Least Square Example The standard deviation of the polynomial fit shows that the best fit for the data is the second order polynomial.
32
Summary The linear least squared method is straight forward to determine the coefficients of the line.
33
Summary The quadratic and higher order polynomial curve fits use a similar technique and involve solving a matrix of (n+1) x (n+1).
34
Summary The higher order polynomials fit required that one selects the best fit for the data and a means of measuring the fit is the standard deviation of the results as a function of the degree of the polynomial.
35
Homework Check the Homework webpage
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.