## Thursday, April 25, 2013

### Polynomial Regression Problems

One can run into problems with polynomial regression as illustrated in the following example. An exponential function is fitted between x= 0 and x=1. A large number of data points are used so that the sums will be proportional to integrals over the inverval. The coefficients for the power series are calculated using the least squares fit procedure.

The coefficients for the 8 terms that result are approximately equal to the coefficients of the series expansion.

The difference between the fit and the function, δ, is quite small since the series converges rapidly.

The problem is that this is about the best that one can do with Mathcad 11. First, the coefficients are slow to converge to the series coefficients. The power functions are all monotonically increasing so they correlate
with one another and a large number of terms is needed eliminate them. Another problem is that since squares are involved in the correlations the precision of the calculation is half the maximum precision of 15 decimal places. After 8 terms the errors in the coefficients start to become noticable.

So we need a large number of terms to get accurate values for the fit but are limited somewhat in the precision that we can use. We can't get as good of a fit as that of the Fourier series fit. One wonders if problems like this affect studies of global warming. They might complicate the problem of making predictions of future temperatures.