Numerical Methods

155_Least Squares Fit

elif 2024. 5. 3. 23:07

 

The above equation can be considered as a linear least squares model.

 

 

Since all other $z$ values are zero, the goal is to determine the coefficient values that minimize the following.

 

 

To minimize this, the normal equations can be expressed in matrix form.

 

 

These equations can be used to determine the unknown coefficients. Additionally, in the special case where $N$ observations form equally spaced intervals of length $T = (N - 1)\Delta t$ between them, the mean values can be determined as follows.

 

 

Therefore, for equally spaced points, the normal equations are as follows.

 

 

The inverse of a diagonal matrix is another diagonal matrix whose elements are the reciprocals of the original diagonal elements. Therefore, the coefficients can be calculated as follows.

 

 

'Numerical Methods' 카테고리의 다른 글

157_Multiple Trapezoidal Rule  (0) 2024.05.05
156_Trapezoidal Rule  (0) 2024.05.04
154_Cubic Splines  (0) 2024.05.02
153_Quadratic Splines  (0) 2024.05.01
152_Derivation of Cubic Splines  (0) 2024.04.30