Example

\begin{displaymath}
A=\left[\begin{array}
{cc} 1000 & 1 \  2000 & 1 \  3000 & ...
 ... 1 \  8000 & 1 \  9000 & 1 \  10000
& 1 \end{array} \right],\end{displaymath}

\begin{displaymath}
b=\left[\begin{array}
{c} 0.16 \  0.63 \  1.44 \  2.56 \...
 ....73 \  7.84 \  10.28 \  12.98 \  16.32 \end{array} \right].\end{displaymath}

Form AT A x = AT b, solve for x:

\begin{displaymath}
x= \left[\begin{array}
{c} 0.001779818 \  -3.596 \end{array} \right].\end{displaymath}

Thus, $t \approx 0.001779818 n -3.596$ is the best fit to the data in a least squares sense.

The best quadratic is much better: $t \approx 1.67803\times
10^{-7} n^2 -6.601515\times 10^{-5} n + 0.09566667$.

\epsfig {file=figs15/selectfit2.ps,width=3.5in}


next up previous
Up: LEAST SQUARES Previous: Minimizing The Score