Solutions 219
SSXX = ]P x^2 - 2mx^2 + mx^2 = y^x; 2 -2
mx ,
Pi —
-mSSxy __ - E x» E 2/i + TO ExiVi
which is dictated by the matrix equation above.
•v SS^ - x SSxy _ y E A ~ myx^2 - x ]T xtyi + myx^2
0o =
A> =
y E
x
l -
x
E ^2/i _ E ?/; E ^ - E ^ E ^2/*
A)
bbxx mbbxx
E ^i E 2/i - E Xi E a^iJ/i
"»!>?-Q><)
2
which is dictated by the matrix equation above.
We may use calculus to solve min SSE:
SSE = Hi/ - A/3||^2 = £(W - [A, + /3iXi])^2
SS£ = J2 Vf - 2 5Z Vifa - 2/3i X) ^* +
m/3
°
+ 2
^>^ I]
Xi
+ # 13
x
?-
dSSE
d(3o
-2 ^ i/j + 2m/3 0 + 2/3! ^ Xi = 0
^ „ E«• /3 2/i - /?i E ^t - „ -
0 = — —— = y - fax.
dSSE
dpi = -2 J2
x
iVi +
2
/3o J2
Xi
+
2
& Yl
x2
i = °
«• 53 aiij/i - (?/ - /3ix) ^ Xj - ft ^ x
2
= 0
a ExiVi -yYuxi Ea:»yi - mxv = ssxv
2-jXi ~~ x 2-jXi /_jXi ~ mx bbxx
As it can be observed above, the matrix system and the calculus mini-
mization yield the same solution!
Let the example data be (1,1), (2,4), (3,4), (4,4), (5,7). Then,
A/3 = y&
"1 r
12
13
14
15
r a 1
PO =
"1"
4
4
4
7
A^1 A = 5 15
15 55
1 3
3 11
, det{ATA) = 10.