- #1

- 390

- 19

I am trying to figure out how the least squares formula is derived.

With the error function as

E

the sum of the errors is

SSE = Ʃ

so the 1st partial derivative of SSE with respect to a

∂SSE / ∂a

with the 1st partial derivative of E

∂E

so the 2nd derivative of SSE with respect to a single a

∂

and a double partial derivative (i.e., to a

∂

and with the 2nd partial derivative of E

∂

the 2nd derivatives reduce to

∂

∂

which after the substitution of ∂E

∂

∂

so the Hessian matrix (e.g., 3 x 3) is

[ H ] =

[ n Ʃ x Ʃ x

[ Ʃ x Ʃ x

[ Ʃ x

which is the normal product of the Vandemonde matrix

[ V ] =

[ 1 x

[ 1 x

[ 1 x

H = [ V ]

While the diagonal terms are sums of the even powers of x, and therefore always positive, it seems that the 2nd derivative test requires that the determinant of the Hessian matrix be positive. Is there any way to prove that this normal product (or even just the Vandermonde matrix itself, since the determinant of itself would merely be the square root of the determinant of the normal product) is guaranteed to have a positive determinant?

So how to determine that indeed the critical point (which is the solution to the coefficients) is a minimum?

With the error function as

E

_{i}= y_{i}- Ʃ_{j}x_{i}^{j}a_{j}the sum of the errors is

SSE = Ʃ

_{i}E_{i}^{2}so the 1st partial derivative of SSE with respect to a

_{j}is∂SSE / ∂a

_{j}= Ʃ_{i}2 E_{i}( ∂E_{i}/ ∂a_{j})with the 1st partial derivative of E

_{i}with respect to a_{j}being∂E

_{i}/ ∂a_{j}= - Ʃ x_{i}^{j}so the 2nd derivative of SSE with respect to a single a

_{j}is∂

^{2}SSE / ∂a_{j}^{2}= 2 Ʃ_{i}{ ( ∂E_{i}/ ∂a_{j}) ( ∂E_{i}/ ∂a_{j}) + E_{i}( ∂^{2}E_{i}/ ∂a_{j}^{2}) }and a double partial derivative (i.e., to a

_{j}& a_{k}) is∂

^{2}SSE / ( ∂a_{j}∂a_{k}) = 2 Ʃ_{i}{ ( ∂E_{i}/ ∂a_{j}) ( ∂E_{i}/ ∂a_{k}) + E_{i}( ∂^{2}E_{i}/ ( ∂a_{j}∂a_{k}) ) }and with the 2nd partial derivative of E

_{i}with respect to a_{j}or the double partial derivative (i.e., to a_{j}& a_{k}) being 0, since the 1st partial is a constant (i.e., in a_{j})∂

^{2}E_{i}/ ∂a_{j}^{2}= ∂^{2}E_{i}/ ( ∂a_{j}∂a_{k}) = 0the 2nd derivatives reduce to

∂

^{2}SSE / ∂a_{j}^{2}= 2 Ʃ_{i}{ ( ∂E_{i}/ ∂a_{j}) ( ∂E_{i}/ ∂a_{j}) }∂

^{2}SSE / ( ∂a_{j}∂a_{k}) = 2 Ʃ_{i}{ ( ∂E_{i}/ ∂a_{j}) ( ∂E_{i}/ ∂a_{k}) }which after the substitution of ∂E

_{i}/ ∂a_{j}becomes∂

^{2}SSE / ( ∂a_{j}∂a_{k}) = - 2 Ʃ_{i}x_{i}^{( 2 j )}∂

^{2}SSE / ( ∂a_{j}∂a_{k}) = - 2 Ʃ_{i}x_{i}^{( j + k )}so the Hessian matrix (e.g., 3 x 3) is

[ H ] =

[ n Ʃ x Ʃ x

^{2}][ Ʃ x Ʃ x

^{2}Ʃ x^{3}][ Ʃ x

^{2}Ʃ x^{3}Ʃ x^{4}]which is the normal product of the Vandemonde matrix

[ V ] =

[ 1 x

_{0}x_{0}^{2}][ 1 x

_{1}x_{1}^{2}][ 1 x

_{2}x_{2}^{2}]H = [ V ]

^{T}[ V ]While the diagonal terms are sums of the even powers of x, and therefore always positive, it seems that the 2nd derivative test requires that the determinant of the Hessian matrix be positive. Is there any way to prove that this normal product (or even just the Vandermonde matrix itself, since the determinant of itself would merely be the square root of the determinant of the normal product) is guaranteed to have a positive determinant?

So how to determine that indeed the critical point (which is the solution to the coefficients) is a minimum?

Last edited: