Find the least squares approximation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
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 [tex]y=f(x,a,b)[/tex]. The object of a least squares fit is to find [tex]a[/tex] and [tex]b[/tex] such that the sum of squares

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

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.