info prev up next book cdrom email home

Least Squares Fitting--Exponential

\begin{figure}\begin{center}\BoxedEPSF{LeastSquaresExp.epsf scaled 800}\end{center}\end{figure}

To fit a functional form

\begin{displaymath}
y=Ae^{Bx},
\end{displaymath} (1)

take the Logarithm of both sides
\begin{displaymath}
\ln y=\ln A+B\ln x.
\end{displaymath} (2)

The best-fit values are then
$\displaystyle a$ $\textstyle =$ $\displaystyle {\sum \ln y\sum x^2-\sum x\sum x\ln y\over n\sum x^2-\left({\sum x}\right)^2}$ (3)
$\displaystyle b$ $\textstyle =$ $\displaystyle {n\sum x\ln y-\sum x\sum \ln y\over n\sum x^2-\left({\sum x}\right)^2},$ (4)

where $B\equiv b$ and $A\equiv\mathop{\rm exp}\nolimits (a)$.


This fit gives greater weights to small $y$ values so, in order to weight the points equally, it is often better to minimize the function

\begin{displaymath}
\sum y(\ln y-a-bx)^2.
\end{displaymath} (5)

Applying Least Squares Fitting gives
\begin{displaymath}
a\sum y+b\sum xy=\sum y\ln y
\end{displaymath} (6)


\begin{displaymath}
a\sum xy+b\sum x^2y=\sum xy\ln y
\end{displaymath} (7)


\begin{displaymath}
\left[{\matrix{\sum y& \sum xy\cr \sum xy& \sum x^2y\cr}}\ri...
...ght] = \left[{\matrix{\sum y\ln y\cr \sum xy\ln y\cr}}\right].
\end{displaymath} (8)

Solving for $a$ and $b$,
$\displaystyle a$ $\textstyle =$ $\displaystyle {\sum(x^2y)\sum(y\ln y)-\sum(xy)\sum(xy\ln y)\over \sum y\sum(x^2y)-\left({\sum xy}\right)^2}$ (9)
$\displaystyle b$ $\textstyle =$ $\displaystyle {\sum y\sum(xy\ln y)-\sum(xy)\sum(y\ln y)\over \sum y\sum(x^2y)-\left({\sum xy}\right)^2}.$ (10)

In the plot above, the short-dashed curve is the fit computed from (3) and (4) and the long-dashed curve is the fit computed from (9) and (10).

See also Least Squares Fitting, Least Squares Fitting--Logarithmic, Least Squares Fitting--Power Law




© 1996-9 Eric W. Weisstein
1999-05-26