Leave lesson

Statistics · Data presentation

1 / 9

Exponential models and regression

Fitting y = ab^x and y = ax^n to data by taking logs to get a straight line, then reading the constants off a regression line of log y on x (or on log x), and using the model to predict.

Statistics · Data presentation

Exponential models and regression

Fitting y = ab^x and y = ax^n to data by taking logs to get a straight line, then reading the constants off a regression line of log y on x (or on log x), and using the model to predict.

Why it works

Regression draws a straight line through data — but lots of real data isn't straight. Populations, investments and radioactive samples follow exponential laws y=abxy = ab^x, and many physical relationships follow power laws y=axny = ax^n. The trick is to take logarithms, which turn these curves into straight lines you can regress.

For y=abxy = ab^x, take logs of both sides: logy=loga+xlogb.\log y = \log a + x\log b. Compare with Y=mX+cY = mX + c: plotting logy\log y against xx gives a straight line with gradient logb\log b and intercept loga\log a. So if statistical software gives you the regression line of logy\log y on xx, you read off the gradient and intercept and undo the logs: loga=intercepta=10intercept,logb=gradientb=10gradient.\log a = \text{intercept} \Rightarrow a = 10^{\text{intercept}}, \qquad \log b = \text{gradient} \Rightarrow b = 10^{\text{gradient}}.

For a power law y=axny = ax^n, take logs to get logy=loga+nlogx,\log y = \log a + n\log x, so here you plot logy\log y against logx\log x: the gradient is nn and the intercept is loga\log a. (The giveaway for which model: a straight line of logy\log y against xx means exponential; a straight line of logy\log y against logx\log x means power.)

Once you have aa and bb (or nn), the model predicts yy for any xx — substitute and evaluate. As always, predicting inside the data range is reliable; far outside it is extrapolation and should be treated with caution.