# “Linearize” an exponential-looking graph with log function

This may be a beginner question, but I can't quite wrap my head around logs... I have a set of data (from an experiment) which gives me an exponential-looking graph (Fig 1). I'd like to "linearize" the graph, i.e. transform the data mathematically, so that the graph looks like a straight line (Fig 2).

The simplest way I can think of is to normalize both x values between x1-x2 (i.e. fit them betweeen 0-1) and y values between y1-y2, and then raise the normalized x to a power to straighten the graph:

f(xnorm)=xnormexp , where xnorm is the normalized x, and exp is some exponent.

My question: can the same effect be achieved using a log function? I.e. can a log expression be applied to x values to "controllably" bring the graph closer to a straight line? Thanks.

-
The simplest way, I think, is to draw the tangent line. – Sanath K. Devalapurkar Mar 10 '14 at 1:31
@Sanath I'd have to figure out the point of tangency and know the underlying function. The data comes from an experiment, I don't know the underlying function. – MrSparkly Mar 10 '14 at 1:37
Yeah, that's true. – Sanath K. Devalapurkar Mar 10 '14 at 1:37

Suppose $y=Ae^{kx}$. Then, taking logs, we see that $\log y = kx + \log A$.

Therefore, try taking logs of the $y$-values, and plot those against the ordinary $x$-values. You'll get a straight line whose slope tells you $k$ and whose $y$-intercept tells you $\log A$.

-
Ah, this is where I went wrong, I was trying to apply the log to x values. Thanks. – MrSparkly Mar 10 '14 at 1:51

Assume that the curve is in fact exponential. Use least squares fitting to get the curve of best fit (see here ). Now you have A curve of the form $y=Ae^{Bx}$ where $A$ and $B$ are predicted using the method linked. Then taking the log of both sides we see $y=Bx+log(A)$, which is linear.

-

If you just want to plot your data to get something looking as Fig.2 , as said in previous answers, plot $log(Y)$ versus $X$ instead of $Y$ versus $X$ which gives Fig.1.

If you want to go further and build the correlation, use the classical linear least square approach as told by Joseph Zambrano but take care : this will give you estimates of parameters $A$ and $B$. Having these estimates, you must start a nonlinear regression to get the final values of the parameters. Remember that what is measured is $Y$ and not $log(Y)$.

-