Least Square Method, Curve Fitting, Python, Residual, Data.
for each data point. X^T is the transpose of X. y is the vector of observed output variables. β is the vector of unknown parameters we want to estimate. Solving the normal equations gives us the optimal values for β: β = (X^T * X)^(-1) * X^T * y Once we have the optimal values of β, we can use them