Curve fitting as a linear least squares approximation problem?

373 Views Asked by At

So I have a problem from a textbook that will count for a bonus homework assignment, but I am having some trouble knowing where to start.

Some more difficult curve fitting problems can be converted to linear least squares approximation problems. One example is the fitting function $y = a\,x^u$ where both $a$ and $u$ are to be determined. Suppose $(x_j, y_j), x_j > 0, y_j > 0, 1 \le j \le n$, are given points. We apply the natural log to rewrite the fitting function as $\ln(y) = \ln(a) + u \ln(x)$. Demonstrate how to determine $a$ and $u$.

Could anyone maybe help point me in the right direction or give an explanation?

3

There are 3 best solutions below

1
On BEST ANSWER

Applying the logarithm to both sides $$ y = a x^u \Rightarrow \\ \ln y = Y = \ln(a) + u \ln(x) = Y_0 + u X $$ turns the exponential curve into a linear curve $Y(X)$, so you can apply the regression techniques for linear functions to it, yielding the $Y_0$ and $u$ for the best fit linear curve.

Obviously $\ln(a) = Y_0 \Rightarrow a = \exp(Y_0)$.

0
On

This is basic regression. transform your data by taking logs. Run your regression. You'll get $\hat\beta_0$ and $\hat\beta_1$ To get $a$: $a=e^{\hat \beta_0}$ and $u=\hat\beta_1$.

Transform problems are common in stats/ probability fyi. Always look for them, they'll make your life easier.

fill in the details:

0
On

You have to minimize $\sum_{i=1}^{n} \left( ln(y_i)-ln(a)-u \cdot ln(x_i) \right)^2$

Substitution

$ln(x_i) \to x_i'$

$ln(y_i) \to y_i'$

$ln(a) \to a'$

minimize $\sum_{i=1}^{n} \left( y_i'-a'-u \cdot x_i'\right)^2$

Now you have a linear regression. This expression have to be minimized w.r.t. a' and u.