I have been given a least squares problem to solve, with the solution but I do not understand the steps provided and I am seeking clarity on why certain things in the solution have been done.
I am given a nonlinear model along with measurements for $T_j, K_j$ and $\Delta K_j$.
$K_j = C\exp(-E/T_j)+R_j$,
where $E$ and $C$ need to be estimated and $R_j$ is independent and normally distributed.
First I am asked to show the model can be transformed to an equation of a different form that is linear:
$\ln(K_j)=\ln(C)-\frac{E}{T_j}+r_j$,
where $r_j=\frac{R_j}{C\exp(-E/T_j)}$, which I can do. But after this I can't follow the solution very well.
I need to show that the standard deviation of $r_j=\delta_j=\frac{\Delta K_j}{K_j}$. The solution states because $r_j$ is independent and normally distributed we can write:
$r_j=\frac{R_j}{K_j-R_j}\approx\frac{R_j}{K_j} \rightarrow \delta_j:=\frac{K_j}{K_j}$.
So I don't really understand why this has been done, obviously I have a gap in my knowledge here and I am looking to fill it!
The problem then continues and states that in order to use the least squares method $r_j$ needs to be scaled in such a way that all $r_j$ have the same standard deviation and the following relation:
$\sum^m_{j=1}\left(\frac{r_j}{\delta_j}\right)^2=\sum^m_{j=1}\left(\frac{-E/T_j+\ln(C)-\ln(K_j)}{\delta_j}\right)^2=\min$.
The solution continues in code, but that is ok. What I need to understand is how the problem is formulated and rearranged in this way. As I understood it we apply the least squares method when we can't solve a system but want to find the closest solution possible to solving a system.
So specific questions I have regarding this choice of rearrangement would be:
Why do we make the choice to set $r_j$ on one side and not one of the other variables such as $T_j$ or $K_j$?
Why is it important that the standard deviation is scaled to 1 for everything (I assume that is why we have divided by it)?
When I look at the problem I get a system where the form should be $||Ax-b||_2=min$. Why do I make the choice that A will consist of the $\frac{1}{T_j}$ and b to consist of $\ln(K_j)$?
The main problem I think is I am used to solving this with artificial problems and this problem looks more "real" and has actual data but I am having trouble following the method which means I haven't understood it so well. I hope I have been clear and provided enough information, but please let me know if anything is confusing or if I could provide anything else to help you help me. Cheers.