lacunary - Mathnotes

Discrete Least Squares Approximation

Polynomial Least Squares

Given m data points we can find a polynomial

Pn(x)=anxn+an1xn1++a1x+a0

of up to degree n<m1 using the least squares procedure to minimize error.

To do so, we setup a linear system of n+1 normal equations to solve for the n+1 unknown constants. These are

k=0naki=1mxij+k=i=1myixij,for each j=0,1,,n.

This is derived from the fact that the error is

E=i=1m(yiPn(xi))2.

The system of equations is produced to minimize E by setting 0=Eaj for each j=0,1,,n.

Continuous Least Squares Approximation

If we have a function fC[a,b], we can use a similar method to approximate it with a polynomial of degree n. This time, our (n+1) normal equations are, for each j=0,1,,n,