How do slope and intercept change for a line when x and y are logged?

91 Views Asked by At

I have a linear equation y = mx + b that I obtained by fitting a line-of-best-fit to a series of data.

How would I get the equivalent formula if I wanted to plot the same line using log-log axes?

In other words, if the new formula is log(y) = z*log(x) + c , what would I have to do to change my original m and b values to turn them into the z and c values?

1

There are 1 best solutions below

3
On BEST ANSWER

If $y=mx+b$, then $\log(y)$ and $\log(x)$ certainly won't be related linearly anymore, so in the equation $\log(y)=z\log(x)+c$, $z$ and $c$ won't be constants.

In fact, if you insist that $z$ and $c$ are constants, then we would have $$y=10^{\log(y)}=10^{z\log(x)+c}=10^{z\log(x)}10^c = rx^z$$ where $r=10^c$, which is not the same kind of graph as $y=mx+b$.