Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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).

share|improve this question
    
Take the logarithm and do a linear regression. –  Qiaochu Yuan Feb 28 '11 at 20:50
    
@Qiaochu: This works if you multiply rather than add the constant. –  Yuval Filmus Feb 28 '11 at 20:52
add comment

2 Answers

up vote 2 down vote accepted

Here is an online exponential regression calculator.

share|improve this answer
    
This uses Least Squares Fit! I thought that might be the tool I'd need, but it was so long ago that I used it (~20 years) that I was afraid of embarrassing myself by mentioning it. –  Beska Feb 28 '11 at 21:04
    
This solved my immediate problem. And I can re-look up how to do LSF if I need it. Thanks. –  Beska Feb 28 '11 at 21:18
add comment

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.

share|improve this answer
    
One of these days I'll find out why my browser insists on displaying equations as garbage...after I decode this answer, I'll let you know. –  Beska Feb 28 '11 at 20:58
    
@Beska: try downloading MathJax to see the equations –  Ross Millikan Feb 28 '11 at 21:12
    
@Ross: Domo arigato gozaimasu. –  Beska Feb 28 '11 at 21:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.