by harpocrates · 9y ago · 0 comments
Proof: Since `B` is a minimum, the derivative of the expression minimized wrt `B` must be zero (the "derivative" is taken in the matrix sense here).
0 = d/dB [ (Y - XB)'(Y - XB) ]
= d/dB [ Y′Y − Y′XB − B′X′Y + B′X′XB ]
= d/dB [ Y′Y − 2Y′XB + B′X′XB ] Y′XB and B′X′Y are just scalars :)
= − 2Y′X + 2′X′XB
Solving for `B` you get the result.[1] https://isites.harvard.edu/fs/docs/icb.topic515975.files/OLS...
One of my favourite math lectures.