I'm studying regression lines and curves, and I've learn the methods for working with curves of the types $ax^2+bx+c$ and $ax+b$ as well as $a\sin(x)+b\cos(x)$. Now I'm asked this:

$$(0,32), (2,65),(4,132),(6,275)$$

(hours, qtty of bacteria)

This is a plot of exponential growth of bacterias. We know that its growth follows an exponential law, find a curve that best represent it and predict it for $t=10$ hours

I think I should pick a curve like $e^x$ but will it be with only $1$ coefficient?

  • $\begingroup$ The answers below all suggest (correctly) logarithms. After you've done the work you can check it in Excel, which knows how to create exponential regression fits. $\endgroup$ Jan 27, 2016 at 20:33

2 Answers 2


In my opinion you can't use a transformation via the logarithmus. I think you need a funciton like $$ f(t) = a e^{bt}. $$ To use least squares on a nonlinear specification some characteristica from the linear regression must be dropped. But in general the asymptotic theory leads to more or less similar results (for the statistical properties).

With that function you need a algorithm for solving nonlinear equations like the Gauss Newton Method. In my opinion you can't solve it 'by hand'.

If you use R you can try the nls function:

t <- c(0, 2, 4, 6)

y <- c(32, 65, 132, 275)

(mod <- nls(y ~ a * exp(b * t), start = list(a = 1, b = 1)))

This leads you to the coefficients:

a = 31.2257

b = 0.3624

This parameters are now the least square estimators. The fit to the data looks like: Fit to the data

For a prediction with $t = 10$ you just have to compute $$ f(10) = 31.2257 \cdot e^{0.3624 \cdot 10} \approx 1170.565 $$


Better apply linear regression to the logarithms of the quantities. Then you have an approximation of the form $e^{ax+b}$ or equivalently $C.e^{ax}$

In a sense this is the 'best possible' approximation measured by the relative differences between the approximated quantities and the measured quantities.

  • $\begingroup$ I'm sorry, I should've mentioned that I need to use the least squares method $\endgroup$ Jan 27, 2016 at 14:55
  • $\begingroup$ In logarithmic coordinates, you will have to do a linear regression (least squares). $\endgroup$
    – JJacquelin
    Jan 27, 2016 at 14:57
  • $\begingroup$ @Guerlando Minimizing the total square absolute error for an exponential model gets a bit hairy. Where does that obligation come from? $\endgroup$ Jan 27, 2016 at 14:59
  • $\begingroup$ @JJacquelin only the vertical coordinate should be replaced with its logarithm $\endgroup$ Jan 27, 2016 at 15:00
  • $\begingroup$ I don't know how to visualize whats happens when you apply $\log$ to both sides and how to put it in the least squares formula, could you help me? $\endgroup$ Jan 27, 2016 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .