Download presentation
Presentation is loading. Please wait.
Published byMarshall Hill Modified over 6 years ago
1
Dr. Md. Mashiur Rahman Department of Physics University of Chittagong
Curve Fitting Dr. Md. Mashiur Rahman Department of Physics University of Chittagong
2
Md. Mashiur Rahman Department of Physics, CU. Slide: 02
What is Curve Fitting ? Algorithms to find out a curve which represents a given set of data, the best. x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 02
3
Md. Mashiur Rahman Department of Physics, CU. Slide: 03
What is Curve Fitting ? Algorithms to find out a curve which represents a given set of data, the best. x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 03
4
Md. Mashiur Rahman Department of Physics, CU. Slide: 04
What is Curve Fitting ? Algorithms to find out a curve which represents a given set of data, the best. x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 04
5
Md. Mashiur Rahman Department of Physics, CU. Slide: 05
What is Curve Fitting ? Algorithms to find out a curve which represents a given set of data, the best. x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 05
6
Curve Fitting Algorithm
Data set: Fitted curve: Error or deviation: x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 06
7
Curve Fitting Algorithm
Error or deviation: Best Fitted curve should have minimum deviation from each of the given set of data. The most common method: Lease Square Fitting Md. Mashiur Rahman Department of Physics, CU. Slide: 07
8
Md. Mashiur Rahman Department of Physics, CU. Slide: 08
Least Square Method Developed by French Mathematician Adrien-Marie Legendre in 1805 for the study of the orbits of comets. Theme: Summation of Square of Errors should be Least. is minimum Md. Mashiur Rahman Department of Physics, CU. Slide: 08
9
Fitting a Straight Line by LSM
Fitted curve: Straight Line Polynomial: degree 1 is minimum Least Square Method: is minimum w.r.t. a0 and a1 Md. Mashiur Rahman Department of Physics, CU. Slide: 09
10
Fitting a Straight Line by LSM
This condition satisfies the minimum of S w.r.t. a0 Md. Mashiur Rahman Department of Physics, CU. Slide: 10
11
Fitting a Straight Line by LSM
This condition satisfies the minimum of S w.r.t. a1 Md. Mashiur Rahman Department of Physics, CU. Slide: 11/10
12
Fitting a Straight Line by LSM
Normal Equations By solving the above two equations for a0 and a1 , we can get the best fitted straight line: Md. Mashiur Rahman Department of Physics, CU. Slide: 12
13
Fitting a Straight Line by LSM
Normal Equations 1st normal equation can be written as: Centroid Least Square Fitted Line passes through the centroid of the data set. Md. Mashiur Rahman Department of Physics, CU. Slide: 13
14
Fitting a Straight Line by LSM
In terms of matrix, we can write: Determinant of X Md. Mashiur Rahman Department of Physics, CU. Slide: 14
15
Md. Mashiur Rahman Department of Physics, CU. Slide: 15
Problem-1 Find the best fitted line by least square method for the following set of data: x 2 10 14 18 23 29 34 y 6 30 26 44 37 78 69 Least square method requires that the best fitted straight line should satisfy the following normal equations: Md. Mashiur Rahman Department of Physics, CU. Slide: 15
16
Md. Mashiur Rahman Department of Physics, CU. Slide: 16
Problem-1 Table: Coefficients for Normal Equations x y x2 xy 2 6 4 12 10 30 100 300 14 26 196 364 18 44 324 792 23 37 529 851 29 78 841 2262 34 69 1156 2346 130 290 3150 6927 Md. Mashiur Rahman Department of Physics, CU. Slide: 16
17
Md. Mashiur Rahman Department of Physics, CU. Slide: 17
Problem-1 Now the Normal Equations become, Solutions are So, the best fitted line becomes, Md. Mashiur Rahman Department of Physics, CU. Slide: 17
18
Md. Mashiur Rahman Department of Physics, CU. Slide: 18
Problem-1 x y 2 6 10 30 14 26 18 44 23 37 29 78 34 69 Md. Mashiur Rahman Department of Physics, CU. Slide: 18
19
Md. Mashiur Rahman Department of Physics, CU. Slide: 19
Problem-1 x y y(x) 2 6 6.712 10 30 23.472 14 26 31.852 18 44 40.231 23 37 50.706 29 78 63.276 34 69 73.751 Md. Mashiur Rahman Department of Physics, CU. Slide: 19
20
Md. Mashiur Rahman Department of Physics, CU. Slide: 20
Problem-1 x y y(x) 2 6 6.712 10 30 23.472 14 26 31.852 18 44 40.231 23 37 50.706 29 78 63.276 34 69 73.751 Md. Mashiur Rahman Department of Physics, CU. Slide: 20
21
Md. Mashiur Rahman Department of Physics, CU. Slide: 21
To excel in Computational Physics Practise! Practise!! Practise!!! Md. Mashiur Rahman Department of Physics, CU. Slide: 21
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.