Professional Documents
Culture Documents
Least square curve fitting falls into 2 methods; linear & non-linear
Assuming a linear type:
y=bx+a where a,b are to be determined
At any point (xj, yj) we have yj=bxj+a
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
If (xj, yj) is NOT on a straight line (as in most cases, i.e. Least-Square) then:
r y
j 1
j
j 1
j (bx j a) 1st order approximation
n
q(a, b) ( y j (bx j a)) 2 This part is Least-Square
j 1
The error should be minimized, thus this function should be minimized to find a&b
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
Approximated y=0.9601+0.667x
p ( x) b0 b1 x b2 x 2
k 1