Graphics Programs Reference
In-Depth Information
This discrepancy can belargely eliminatedbyweighting the logarithmic fit.We
note fromEq. (3.29b)thatln( r i
ln( ae bx i )
y i )
=
=
ln a
+
bx i ,sothat Eq. (3.29a)can
be writtenas
ln 1
r i
y i
R i
=
ln y i
ln( r i
y i )
=
If the residuals r i aresufficiently small ( r i <<
y i ), wecanuse the approximation ln(1
r i /
y i )
r i /
y i ,sothat
y i
Wecan now see that by minimizing R i , we inadvertentlyintroduced the weights
1
R i r i /
y i . This effect can be negatedif we apply the weights y i whenfitting F ( x )to
(ln y i ,
/
x i ); that is, by minimizing
n
y i R i
S
=
(3.30)
i
=
1
Other examples that also benefitfrom the weights W i =
y i are giveninTable 3.3.
f ( x )
F ( x )
Data to be fittedby F ( x )
x i ,
x i )
axe bx
ln [ f ( x )
/
x ]
=
ln a
+
bx
ln( y i /
ln x i ,
ln y i
ax b
ln f ( x )
=
ln a
+
b ln( x )
Table 3.3
EXAMPLE 3.8
Fit a straight linetothedata shown and compute the standard deviation.
x
0
.
0
1
.
0
2
.
0
2
.
5
3
.
0
y
2
.
9
3
.
7
4
.
1
4
.
4
5
.
0
Solution The averages of the dataare
5 x i =
1
0
.
0
+
1
.
0
+
2
.
0
+
2
.
5
+
3
.
0
x
=
=
1
.
7
5
5 y i =
1
2
.
9
+
3
.
7
+
4
.
1
+
4
.
4
+
5
.
0
y
=
=
4
.
02
5
Search WWH ::




Custom Search