Find the least squares approximation

hsong9
Messages
71
Reaction score
1

Homework Statement


Suppose a set of N data points {(xk,yk)}Nk=1 appears to satisfy the relationship for some constants a and b. Find the least squares approximations for a and b.


Homework Equations





The Attempt at a Solution


I really have no idea about this problem.
 
Physics news on Phys.org
You don't say what the relationship is, but let's say it's some function that we'll call y=f(x,a,b). The object of a least squares fit is to find a and b such that the sum of squares

S = \sum_{k-1}^N (y_k - f(x_k,a,b))^2

is minimized.
 
Thanks!
the relationship is y = ax + b/x.
Thus, S = Sigma ( y_k - (ax + b/x))^2, right?
and that's it?
 
hsong9 said:
Thanks!
the relationship is y = ax + b/x.
Thus, S = Sigma ( y_k - (ax + b/x))^2, right?
and that's it?

S = Sigma ( y_k - (a x_k + b/x_k))^2

and you must minimize this as a function of a and b.
 
Thanks!
So, to minimize S, set partial derivative for a and b equals to zero.
right?
Thanks again.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top