Using exponential decay function to predict outcome

983 Views Asked by At

Let's say I have a graph that follows the function $y= ae^{-bx}$ , and I'm trying to predict the chlorine residue left in a pool after a certain amount of time.

So for $2$ hours, the chlorine residue is at $1.6$ ppm (parts per million) and for $4$ hours, $1.5$ ppm. Tabulating the data gives:

  • $6$ hours, $1.45$ ppm
  • $8$ hours, $1.42$ ppm
  • $10$ hours, $1.38$ ppm
  • $12$ hours, $1.36$ ppm

Now I'm trying to predict what the concentration would be at $15$ hours using the decaying curve above.

I've tried to figure it out so far and I don't really know where to start. I've tried plugging in the different values into the function but obviously I'm getting various answers depending on which "hours/ppm" combo I'm using.

1

There are 1 best solutions below

3
On

Consider the expression $y=ae^{bx}$. There is no need to put a negative in front of the $b$ term. It'll come out as negative anyhow. Then linearize the equation as follows:

\begin{align*} y&=ae^{bx}\\ \log{y}&=\log(ae^{bx})\\ \log{y}&=\log{a}+\log{e}^{bx}\\ \log{y}&=bx+\log a \end{align*} Let $z=\log y$ and $c=\log a$ so that we obtain $$z=bx+c.$$ Therefore If you want to fit curve $y=ae^{bx}$ to the values $(x_1,y_1),\ldots,(x_n,y_n)$ we instead fit line $z=bx+c$ to the values $$(x_1,z_1),\ldots,(x_n,z_n)=(x_1,\log(y_1)),\ldots,(x_n,\log(y_n))$$ I guess you'll probably want to do this with technology - you're looking to do a linear regression. If you want to understand the underlying theory then perhaps look here. The value of $b$ will simply be the gradient and $z$ intercept is $c$. To find the value of $a$ note that $a=e^c$.

Note: in all calculations I've use the natural logarithm.