CURVE FITTING 1 Curve Fitting Often we have

  • Slides: 18
Download presentation
CURVE FITTING 1

CURVE FITTING 1

Curve Fitting § Often, we have data points and we want to find an

Curve Fitting § Often, we have data points and we want to find an equation that “fits” the data § Simplest equation is that of a straight line 1/25/2022 2

Curve Fitting The problem of determining an equation of an approximate curve which passes

Curve Fitting The problem of determining an equation of an approximate curve which passes through as many points as possible is said to be curve fitting. The basis problem is to find an equation of the curve shows the best fit with the data. 1/25/2022 3

Curve Fitting 1/25/2022 4

Curve Fitting 1/25/2022 4

Mathematical Background 1/25/2022 5

Mathematical Background 1/25/2022 5

Mathematical Background ØStandard deviation: The most common measure of a spread for a sample.

Mathematical Background ØStandard deviation: The most common measure of a spread for a sample. 1/25/2022 6

Curve Fitting < Linear Regression < Polynomial Regression < Multiple Linear Regression 1/25/2022 7

Curve Fitting < Linear Regression < Polynomial Regression < Multiple Linear Regression 1/25/2022 7

Curve Fitting § Consider these five data points: 1/25/2022 8

Curve Fitting § Consider these five data points: 1/25/2022 8

Linear Curve Fit Poor Fit 1/25/2022 9

Linear Curve Fit Poor Fit 1/25/2022 9

Second–Order Polynomial Fit Better, but still not very good 1/25/2022 10

Second–Order Polynomial Fit Better, but still not very good 1/25/2022 10

Third-Order Polynomial Fit Perfect Fit! These point were calculated from the equation: 1/25/2022 11

Third-Order Polynomial Fit Perfect Fit! These point were calculated from the equation: 1/25/2022 11

LINEAR REGRESSION We want to find the curve that will fit the data. Candidate

LINEAR REGRESSION We want to find the curve that will fit the data. Candidate lines for curve fit No exact solution but many approximated 1/25/2022 solutions 12

LINEAR REGRESSION Error Between Model and Observation 1/25/2022 13

LINEAR REGRESSION Error Between Model and Observation 1/25/2022 13

LINEAR REGRESSION Criteria for a “Best” Fit Find the BEST line which minimize the

LINEAR REGRESSION Criteria for a “Best” Fit Find the BEST line which minimize the sum of error for all data BEST line with error minimized? We can use the error, defined as: However, the errors cancel one another and still be wrong. 1/25/2022 14

LINEAR REGRESSION ERROR Definition To avoid ± signs cancellation, the error may be defined

LINEAR REGRESSION ERROR Definition To avoid ± signs cancellation, the error may be defined as: But, the error minimization is going to have problems. The solution is the minimization of the sum of squares. This will give a least square solution. 1/25/2022 15

LINEAR REGRESSION Least-Square Fit of a Straight Line Minimize sum of the square of

LINEAR REGRESSION Least-Square Fit of a Straight Line Minimize sum of the square of the errors Differentiate with respect to each coefficient: 1/25/2022 16

LINEARREGRESSION Setting derivatives = 0 1/25/2022 17

LINEARREGRESSION Setting derivatives = 0 1/25/2022 17

LINEARREGRESSION Solve equations simultaneously 1/25/2022 18

LINEARREGRESSION Solve equations simultaneously 1/25/2022 18