Probability and Statistics PS GTU 3130006 Unit5 Curve
Probability and Statistics (PS) GTU # 3130006 Unit-5 Curve Fitting by Numerical Methods Humanities & Science Department Darshan Institute of Engineering & Technology, Rajkot Daxa. jani@darshan. ac. in 9727747320
Why curve fitting is needed?
Football ticket price in India Year 7000 Price (in ₹) 5900 Que. Find the polynomial for given data. 4200 Que. Predict a price of the ticket for year 2021. 2000 2012 Prof. Daxa B. Jani 2014 2016 2018 #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 3
What is curve fitting ? Curve fitting is the process of finding the ‘best-fit’ curve for a given set of data. It is the representation of the relationship between two variables by means of an algebraic equation. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 4
Curve Fitting There are two general approaches for curve fitting: Interpolation Prof. Daxa B. Jani Curve Fitting #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 5
When we need curve fitting ? In our daily life, we come across many situations where we often require to find a relationship between two or more variables. For example, weight and height of a person, demand supply, expenditure depends on income, etc. These relation, in general, may be expresses by polynomial or they may have exponential or logarithmic relationship. In order to determine such relationship, first it is require to collect the data showing corresponding values of the variables under consideration. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 6
Fitting Straight Line Curve Fitting Parabola Fitting General Curves Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 7
So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis to find the value of A and B. 8
M-1 Ex-1: Fit a straight line for the following data. x y 1 14 2 27 3 40 4 55 5 68 Solution: So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis to find the value of A and B. 9
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 10
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 11
x y 2 2 5 4 6 6 9 9 11 10 Solution: So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis to find the value of A and B. 12
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 13
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 14
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 15
Fitting Straight Line Curve Fitting Parabola Fitting General Curves Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 16
So, we need to find the value of and to find the value of A, B and C. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 17
M-2 Ex-4: Fit a second degree polynomial for y on x to the following data. x y -1 5 0 6 1 2 3 21 50 93 Solution: So, we need to find the value of and to find the value of A, B and C. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 18
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 19
The normal equations for the second degree polynomial are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 20
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 21
M-2 Ex-2: Fit a second degree polynomial for y on x to the following data. Find y(2. 4). x 1 2 3 4 5 y 5 12 26 60 97 Solution: and So, we need to find the value of A, B and C. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 22
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 23
The normal equations for the second degree polynomial are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 24
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 25
Fitting Straight Line Curve Fitting Parabola Fitting General Curves Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 26
Fitting General Curve Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 27
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 28
x y 1 5 7 9 12 10 15 12 15 21 Solution: Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 29
So, we need to find the value of and to find the value of A and b. Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 30
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 31
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 32
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 33
x y 1 0. 5 2 2 3 4. 5 4 8 5 12. 5 Solution: Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 34
So, we need to find the value of and to find the value of A and b. Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 35
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 36
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 37
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 38
x y 2 8. 3 3 15. 4 4 33. 1 5 6 65. 2 126. 4 Solution: Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 39
So, we need to find the value of and to find the value of A and B. Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 40
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 41
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 42
Special types of curves Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 43
So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis to find the value of A and B. 44
x y -1 2 0 5 1 3 2 0 Solution: So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 45
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 46
The normal equations for the given curve are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 47
So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis to find the value of a and b. 48
x y 1 2 -1. 51 0. 99 3 3. 88 4 7. 66 Solution: So, we need to find the value of Prof. Daxa B. Jani and #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 49
Therefore, by using this data we can find normal equations. Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 50
The normal equations for the given curve are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 51
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 52
P V 50 60 70 80 90 64. 7 51. 3 40. 5 25. 9 78 Solution: Now, take log both the sides, Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 53
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 54
The normal equations for the straight line are Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 55
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 56
Prof. Daxa B. Jani #3130006 (PS) Unit 5 –Curve Fitting by Numerical Analysis 57
- Slides: 57