Re-writing non-linear into linear form, how to transform slope and intercept

linear regressionlinear-transformationslogarithms

This is a pretty basic question for all of you I'm sure, but I'm doing some intro classes on linear regression, where we are working some data which fits into a linear model as such:

$$W_i = 10.386 – .038*G_i$$

We're now asked to evaluate this same data using a nonlinear model:
$$
W_i = \gamma e^{\beta G_i}
$$

where it is stated that we can rewrite this into linear form such that:
$$
log(W_i) = \alpha + \beta G_i + \varepsilon_i
$$

with with $G_i$ and $\alpha = log(\gamma)$

With this said, our previous model becomes:
$$
W_i = 2.341 – 0.0038*G_i$
$$

I've dropped the error terms for simplicity, but all of these are given as correct, and I'm having trouble figuring out why the intercept term was onverted from 10.386 to 2.341 (I know they just took the log, but why?) and why the slope term went from 0.038 to 0.0038 (no idea why).

I would be grateful for any insight/help. Thanks!

EDIT–and in the event that it is necessary to look at the data, here's what it looks like (not sure the best format for presenting this here):

Game <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
WinningTime <- c(10.3, 10.4, 10.5, 10.2, 10, 9.95, 10.14, 10.06, 10.25, 9.99 9.92, 9.96, 9.84, 9.87, 9.85)

Best Answer

You cannot directly convert the result of a linear regression into the result of a exponential regression. What you can do is to transform an exponential equation into an linear equation and then you can apply the linear regression.

$y_=\gamma\cdot e^{\beta \cdot G_i}$

$\ln(y_i)=\ln(\gamma)+\beta\cdot G_i$

The values for $\ln(y_i)$ are the following:


$$2,332143895\quad 2.341805806 \quad 2.351375257\quad 2.32238772\quad 2.302585093\quad 2.297572551\quad 2.316487998\quad 2.308567165\quad 2.327277706\quad 2.301584593\quad 2.294552921\quad 2.298577072\quad 2.286455711\quad 2.289499853\quad 2.287471455$$


The values for $G_i$ can be used without transformation. When I apply the RGP-function in Excel I get $\ln(\gamma)=2.340603915$ and $\beta=-0.003755949$. They can be rounded if you like.

All that is left is to transform back the ln-function.

$\ln(y_i)=2.340603915-0.003755949\cdot G_i$

$y_i=e^{2.340603915}\cdot e^{-0.003755949\cdot G_i}$

$$y_i=10.3875\cdot e^{-\large{0.003755949\cdot G_i}}\approx 10.388\cdot e^{-\large{0.0038\cdot G_i}}$$ DonĀ“t care about differences at the positions behind the decimal point if they exist. It always depends how much decimal places you use in your calculation.

Related Question