lacunary - Mathnotes

Discrete Least Squares Approximation

Polynomial Least Squares

Given m data points we can find a polynomial

Pn(x)=anxn+an−1xn−1+⋯+a1x+a0

of up to degree n<m−1 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=0nak∑i=1mxij+k=∑i=1myixij,for each j=0,1,…,n.

This is derived from the fact that the error is

E=∑i=1m(yi−Pn(xi))2.

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

Continuous Least Squares Approximation

If we have a function f∈C[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,