Linearization before curve fitting

linear regressionnumerical methodsregressionregression analysis

I am currently studying at college curve fitting to a set of experimental data. One of our activities/homework was to fit the curve $y=ax^b$ to the set of points of the position of a free-falling object we filmed. My professor stated that it was always necessary to first linearize the data, by taking the logarithm of the $x$ and $y$ values, and then do a least squares regression on this new data, and that the result of this linear regression would be the final correct value. However, doesn't this change the final result compared to a non-linear regression? Not only that, wouldn't the result change depending on the units, because $\log(y)$ is the logarithm of a quantity which has units? If it changes the final result of the regression, which method is better to use in an experimental context such as the one mentioned above?

Best Answer

Your professor is totally correct. The model $$y=a \,x^b$$ is nonlinear because of $b$. So, in a first step, you linearize $$\log(y)=\log(a)+b\log(x)=c+b\log(x)$$ and a linear regression gives the estimates of $b$ and $a=e^c$.

Now, you start with them the nonlinear regression what you must do since what is measured is $y$ and not any of its possible transforms.

Edit

When you linearize the model, the residue at point $i$ is $$\text{res}_i=\log\big[y_i^{\text{(calc)}}\big]-\log\big[y_i^{\text{(exp)}}\big]$$ which can rewrite as $$\text{res}_i=\log\Bigg[\frac{y_i^{\text{(calc)}} } {y_i^{\text{(exp)}} } \Bigg]=\log\Bigg[1+\frac{y_i^{\text{(calc)}}-y_i^{\text{(exp)}} } {y_i^{\text{(exp)}} } \Bigg]$$ So, if the error is small $$\text{res}_i \sim \frac{y_i^{\text{(calc)}}-y_i^{\text{(exp)}} } {y_i^{\text{(exp)}} }$$ which is the relative error.

In practice, when the range of the $y_i^{\text{(exp)}}$ is very large, it is often preferable to stop at this point. This is the case for physical properties like vapor pressure.

Related Question