1
$\begingroup$

I have a bunch of data, and I'd like to find the closest exponential aproximation I can to fit the points. I'm guessing there's a (relatively) straightforward way to do this.

For example, if I have the data points (5, 9, 17, 33), the equation I'd be looking for would be f(n) = 2^x + 1, since that would fit the data points exactly. Of course, if I had a similar set of points (5, 9, 16, 33), the equation wouldn't work quite right: f(n) = 2^x + 1 would still be "close", but presumably some other numbers than 2 and 1 could get me ever so slightly "closer".

Is there a way to figure this out? (I'm guessing "yes"). Ideally, I'd like to have it be in the form described above (something^x + possible_constant), though methods for figuring this out in a more general way are welcome, so long as I can tie down some of the parameters (so that any other factors would be forced to be 0).

  • 0
    @Qiaochu: This works if you *multiply* rather than *add* the constant.2011-02-28

2 Answers 2

2

Here is an online exponential regression calculator.

  • 0
    This solved my immediate problem. And I can re-look up how to do LSF if I need it. Thanks.2011-02-28
1

You can solve for $f(x) = Ca^x$ using linear regression, since $\log f(x) = (\log a)x + \log C$. Here $x$ should be $1,2,\ldots$, and $y$ should be your data points.

  • 0
    @Ross: Domo arigato gozaimasu.2011-02-28