# Problem

Given data (*x*_{i}, *y*_{i}),
for *i* = 1, 2, ..., *n* which is known to approximate
an exponential curve, find the best fitting exponential function
of the form *y*(*x*) = *ae*^{bx}.

# Assumptions

We will assume the model is correct and that the data
is defined by two vectors **x** = (*x*_{i}) and
**y** = (*y*_{i}).

# Tools

We will use algebra and linear regression.

# Process

Take the logarithm of the *y* values and define the
vector **φ** = (*φ*_{i}) = (log(*y*_{i})).

Now, find the least-squares curve of the form
*c*_{1} *x* + *c*_{2} which
best fits the data points (*x*_{i}, *φ*_{i}).
See the Topic 6.1 Linear Regression.

Having found the coefficient vector **c**, the best
fitting curve is

*y*=

*e*

^{c2}

*e*

^{c1 x}.

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.