are many ways to define “best”. By defining the error ei associated with the ith
data point (xi, yi)as
ei=(yof line at xi)−(ydata value at xi)
ei=β 0 +β 1 xi−yi
(11 .85)
then associated with the given set of data are the errors
e 1 =y(x 1 )−y 1 =β 0 +β 1 x 1 −y 1
e 2 =y(x 2 )−y 2 =β 0 +β 1 x 2 −y 2
e 3 =y(x 3 )−y 3 =β 0 +β 1 x 3 −y 3
..
.
en=y(xn)−yn=β 0 +β 1 xn−yn.
(11 .86)
Figure 11-14. Straight line approximation to represent data points.
One way to define the “best” straight line y=β 0 +β 1 xis to select the constants
β 0 and β 1 which minimize the sum of squares of the errors associated with the data
set. That is, if
E=E(β 0 , β 1 ) =
∑n
i=1
e^2 i=
∑n
i=1
(β 0 +β 1 xi−yi)^2 (11 .87)
denotes the sum of squares of the errors, then E has a minimum value when the
conditions
∂E
∂β 0 = 0 and
∂E
∂β 1 = 0 (11 .88)