Nonlinear Regression
Nonlinear Regression
Non-Linear Regression
Topic: Curve Fitting (Parabola fitting)
Curve Fitting
To determine an equation that
connects variables, first step is to
collect data.
For example, (x1, y1), (x2, y2), (x3,
y3) and so on.
The next step is to plot the data
points on a rectangular coordinate
system. This is called a scatter
For
example, data and scatter diagram are
diagram.
1
0
1
5
2
7
3
8
4
5
7
7
Volume, V
Pressure, P
54.3
61.2
61.8
49.5
72.4
37.6
88.7
28.4
118.6
19.2
194.0
10.1
Volume, V
Pressure,
P
54.3
61.2
61.8
49.5
72.4
37.6
88.7
28.4
118.6
19.2
194.0
10.1
X = log V
Y = log P
X2
XY
54.3
61.2
1.7348
1.7868
3.0095
3.0997
61.8
49.5
1.7910
1.6946
3.2077
3.0350
72.4
37.6
1.8597
1.5752
3.4585
2.9294
88.7
28.4
1.9479
1.4533
3.7943
2.8309
118.6
19.2
2.0741
1.2833
4.3019
2.6617
194.0
10.1
2.2878
1.0043
5.2340
2.2976
X = 11.6953
Y = 8.7975
X2 = 11.6953
XY = 16.8543
Y a N a X
XY a X a X
0
N=6
X = 11.6953
Y = 8.7975
X2 = 23.0059 XY = 16.8543
and a1 = -1.40
Y = 4.20 - 1.40 X
(a)
Y = 4.20 - 1.40 X
Since a0 = 4.20 = log C ; and a1 = -1.40 = -r ; it means C = 1.60 x 104 and r = 1.4
(b)
Required equation in terms of P and V is P V 1.4 = 1.60 x 104 .
(c)
When V = 100, X = log V = 2, Y = log P = 4.20 - 2.8 = 1.40;
P = antilog (P) =25.1.
y
xi , yi
2
1
2
2
2
3
2
4
xn , y n
x2 , y 2
x3 , y3
x1 , y1
2
n
i is minimum.
i 1
y a0 a1 x a2 x 2
y a N a xa x
0
y
x,y
y a0 x a1 x a2 x
2
x2 , y 2
x3 , y3
xn , y n
2
3
xy
a
x
a
x
a
x
0
1
2
2
x1 , y1
Population, y
1880
50.2
1890
62.9
1900
76.0
1910
92.0
1920
105.7
1930
122.8
1940
131.7
1950
151.1
1960
179.3
1970
203.3
1980
226.5
x2
x3
x4
xy
x2y
1880
-5
50.2
25
-125
625
-251.0
1255.0
1890
-4
62.9
16
-64
256
-251.6
1006.4
1900
-3
76.0
-27
81
-228.0
684.0
1910
-2
92.0
-8
16
-184.0
368.0
1920
-1
105.7
-1
-105.7
105.7
1930
122.8
1940
131.7
131.7
131.7
1950
151.1
16
302.2
604.4
1960
179.3
27
81
537.9
1613.7
1970
203.3
16
64
256
813.2
3252.8
1980
226.5
25
125
625
1132.5
5662.5
x =
0
y =
1401.5
x2 =
110
x3 =
0
x4 =
1958
xy =
8904.7
x2y =
14684.2
y a0 N a1 x a2 x
2
3
xy
a
x
a
x
a
x
0
1
2
2
3
4
x
y
a
x
a
x
a
x
0
1
2
2
x = 0
y = 1401.5
x2 = 110
x3 = 0
x4 = 1958
xy = 1897.2
x2y = 14684.2
1920
1930
1940
1950
1960
1970
1980
Male population
(millions)
53.90
62.14
66.06
75.19
88.33
98.93
110.05
female population
(millions)
51.81
60.64
65.61
76.14
90.99
104.31
116.49
difference
(millions)
2.09
1.50
0.45
-0.95
-2.66
-5.38
-6.44
Difference
(in millions)
1920
2.90
1930
1.50
1940
0.45
1950
-0.95
1960
-2.66
1970
-5.38
1980
-6.44
x2
x3
x4
xy
x2y
1920
-3
2.90
-27
81
-8.7
26.1
1930
-2
1.50
-8
16
-3.0
6.0
1940
-1
0.45
-1
-0.45
0.45
1950
-0.95
1960
-2.66
-2.66
-2.66
1970
-5.38
16
-10.76
-21.52
1980
-6.44
27
81
-19.32
-57.96
x =
0
y =
-10.58
x2 = 28
x3 = 0
x4 =196
xy =
-44.89
x2y =
-49.59
y a0 N a1 x a2 x
2
3
xy
a
x
a
x
a
x
0
1
2
x = 0
y = -10.58
x2 = 28
2
3
4
x
y
a
x
a
x
a
x
0
1
2
2
x3 = 0
x4 = 196
xy = -44.89
x2y = -49.59
Year
yest
1920
-3
2.90
2.87
1930
-2
1.50
1.69
1940
-1
0.45
0.35
1950
-0.95
-1.17
1960
-2.66
-2.86
1970
-5.38
-4.72
1980
-6.44
-6.23