Professional Documents
Culture Documents
Question 1
Question 1
below. This means we want to find the values of constants a and b such that the best-fit curve
(a) Given that the error, d i , between each data point ( x i , y i ) and the best-fit curve is
d i= y ( x i )− y i=( a x 2i +b ) − y i
show that the sum of squared errors (SSE) is
3
S SE ( a , b )=∑ d 2i =( b−1 ) + ( 4 a+ b−2 ) + ( 9 a+b−4 )
2 2 2
i=1
Solution:
i=1
Therefore,
2 2 2
SSE ( a , b )= ( b−1 ) + ( 4 a+ b−2 ) + ( 9 a+b−4 )
(b) The best-fit curve occurs when the SSE is at a minimum. Solve for the constants a and
b of the best-fit curve and apply derivative tests to show that both the local & global
minimum value of the SSE occurs at these constant values.
Solution:
First, we find the partial derivatives,
∂
SSE ( a , b )=2 ( 4 a+ b−2 )( 4 ) +2 ( 9 a+ b−4 )( 9 )
∂a
¿ 32 a+8 b−16+162 a+18 b−72
¿ 194 a +26 b−88
∂
SSE ( a , b ) =2 ( b−1 ) +2 ( 4 a+b−2 ) +2 ( 9 a+b−4 )
∂b
¿ 2 b−2+ 8 a+2 b−4 +18 a+2 b−8
¿ 26 a+ 6 b−14
Partial derivatives equal to 0
{
194 a+26 b−88=0 ⟹ 97 a+13 b=44
26 a+6 b−14=0 {
13 a+3 b=7
( )
2 2 2 2
∂ ∂ ∂ 2
2
SSE ( a , b ) ∙ 2 SSE ( a , b )− SSE ( a , b ) =194 ( 6 )−26 =488>0
∂a ∂b ∂ a ∂b
and,
2
∂
2
SSE ( a , b ) =194>0
∂a