Professional Documents
Culture Documents
Curve Fitting 1
Curve Fitting 1
Sidra Raees
LECTURE 05
Department of Mathematics, NED University of
Engineering & Technology, Karachi
1
Curve fitting is the process of constructing a curve, or
mathematical functions, which possess closest proximity to the
series of data. By the curve fitting we can mathematically
construct the functional relationship between the observed fact
and parameter values, etc. It is highly effective in
mathematical modeling some natural processes.
It is a statistical technique use to drive coefficient values for
equations that express the value of one (dependent) variable as
a function of another (independent variable).
3. Exponential curve
𝑦 = 𝑎𝑏 𝑥 or 𝑦 = 𝑎𝑒 𝑏𝑥
σ 𝑦 = 𝑛𝑎 + 𝑏 σ 𝑥
σ 𝑥𝑦 = 𝑎 σ 𝑥 + 𝑏 σ 𝑥 2
2
Σ𝑒𝑖 = Σ 𝑦𝑖 − 𝑦ෝ𝑖
Solution:
Let the equation of the straight line to be fitted to the
data, be 𝑦 = 𝑎 + 𝑏𝑥, where a and b are to be evaluated.
The normal equations for determining a and b are
σ 𝑦 = 𝑛𝑎 + 𝑏 σ 𝑥
σ 𝑥𝑦 = 𝑎 σ 𝑥 + 𝑏 σ 𝑥 2
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
7
𝒙 𝒚 𝒙𝒚 𝒙𝟐
1 3 3 1
2 4 8 4
3 6 18 9
4 9 36 16
5 10 50 25
σ 𝑥 = 15 σ 𝑦 = 32 σ 𝑥𝑦 = 115 σ 𝑥 2 = 55
1 3 2.6 0.16
2 4 4.5 0.25
3 6 6.4 0.16
4 9 8.3 0.49
5 10 10.2 0.04
Σ𝑒 = Σ 𝑦 − 𝑦ො 2 = 1.1
σ 𝑦 = 𝑛𝑎 + 𝑏 σ 𝑥 + 𝑐 σ 𝑥 2
σ 𝑥𝑦 = 𝑎 σ 𝑥 + 𝑏 σ 𝑥 2 + 𝑐 σ 𝑥 3
σ 𝑥2𝑦 = 𝑎 σ 𝑥2 + 𝑏 σ 𝑥3 + 𝑐 σ 𝑥4
Error:
2
Σ𝑒𝑖 = Σ 𝑦𝑖 − 𝑦ෝ𝑖
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
10
Example
Fit a second degree parabola to the following data:
𝒙 0 1 2 3 4
𝑦 1 1.8 1.3 2.5 6.3
Solution:
Let the equation of the second degree parabola be
𝑦 = 𝑎 + 𝑏𝑥 + 𝑐𝑥 2
The normal equations are
σ 𝑦 = 𝑛𝑎 + 𝑏 σ 𝑥 + 𝑐 σ 𝑥 2
σ 𝑥𝑦 = 𝑎 σ 𝑥 + 𝑏 σ 𝑥 2 + 𝑐 σ 𝑥 3
σ 𝑥 2𝑦 = 𝑎 σ 𝑥 2 + 𝑏 σ 𝑥 3 + 𝑐 σ 𝑥 4
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
11
𝒙 𝒚 𝒙𝒚 𝒙𝟐 𝒙𝟐 𝒚 𝒙𝟑 𝒙𝟒
0 1 0 0 0 0 0
1 1.8 1.8 1 1.8 1 1
2 1.3 2.6 4 5.2 8 16
3 2.5 7.5 9 22.5 27 81
4 6.3 25.2 16 100.8 64 256
10 12.9 37.1 30 130.3 100 354
Solution:
The given relation is
𝑦 = 𝑎𝑏 𝑥
Taking 𝑙𝑛 on both sides
𝑙𝑛𝑦 = 𝑙𝑛𝑎 + 𝑥𝑙𝑛𝑏
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
13
Taking
𝑌 = 𝑙𝑛𝑦, 𝐴 = 𝑙𝑛𝑎, 𝐵 = 𝑙𝑛𝑏
So,
𝑙𝑛𝑦 = 𝑙𝑛𝑎 + 𝑥𝑙𝑛𝑏
𝑌 = 𝐴 + 𝑥𝐵
σ 𝑌 = 𝑛𝐴 + 𝐵 σ 𝑥
σ 𝑥𝑌 = 𝐴 σ 𝑥 + 𝐵 σ 𝑥 2
𝑦ො = 7.4698(1.1388)𝑥
Solution:
The given relation is
𝑦 = 𝑎𝑒 𝑏𝑥
Taking 𝑙𝑛 on both sides
𝑙𝑛𝑦 = 𝑙𝑛𝑎 + 𝑏𝑥
𝑌 = 𝐴 + 𝑏𝑥
σ 𝑌 = 𝑛𝐴 + 𝑏 σ 𝑥
σ 𝑥𝑌 = 𝐴 σ 𝑥 + 𝑏 σ 𝑥 2
𝑦ො = 1.3848𝑒 0.539𝑥