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 know the equation that fits the given points is exponential. What is the best way to find the equation?

share|improve this question

3 Answers 3

Perhaps you'll want to consider an exponential regression. Here is an online tool (very easy to use).

share|improve this answer
    
Quoting from that link: "This page allows you to work out exponential regressions, also known as exponential least squares fittings. For the relation between two variables, it finds the exponential function that best fits a given set of data points". –  Shai Covo Jun 28 '11 at 19:38

If you have an equation of the form $y=ae^{bx}$, you can think of it similarly as the points $(x,\log{(a)}+bx)$ and run a linear regression on this to find the choices of $(a,b)$.

Edit: You're running a linear regression on $(x, \log{(y)})$, which there are many methods. Once you get your $\log{(y)}$ values, just exponentiate them.

share|improve this answer
1  
This is a simple method, but not recommended for serious use. For an example of what can go wrong, see mathworks.com/products/statistics/demos.html?file=/products/…. –  Hans Lundmark Jun 29 '11 at 14:47

While taking the logarithm of the data and then doing a linear regression as suggested in aengle's answer above will give you a quick and dirty answer much of the time, the logarithmic transformation of the data changes the underlying statistical distribution of noise such that it may violate an important assumption underlying least squares methods, namely that the noise is approximately Gaussian-distributed. Also, if the data contains a zero, the logarithm is undefined and therefore you can't do the curve fit.

In practice, a nonlinear least squares fit is usually done instead. The method of Levenberg-Marquardt and "trust region" methods are fairly popular for this kind of fit, although there are many many ways to do it. Here is some example Mathematica code to fit the initial signal S0 and the rate constant R to the model S(t) = S0*e^(R*t) given a set of five data points and using a "trust region" method. Note that if you have good initial estimates of S0 and R, you should use them.

In[42]:= FindFit[{{0.001, 1268.5565625472284}, {0.002933333333333333, 840.0515614029605}, {0.004866666666666667, 581.1715538716999}, {0.0068, 374.3637645280635}, {0.008733333333333333, 360.71242247849415}}, S0*Exp[R*t], {{S0, 1000}, {R, 1.0}}, {t}, MaxIterations -> 50, Method -> {"Newton", StepControl -> "TrustRegion"}, AccuracyGoal -> 3, PrecisionGoal -> 3, WorkingPrecision -> MachinePrecision]

Out[42]= {S0 -> 1512.55, R -> -191.072}

share|improve this answer

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.