Curve fitting

  • Write the formula for the second order Lagrange Polynomial
  • For the second order polynomial $y=\alpha x^2 + \beta x + \gamma$:
    • write the equation for the sum square error.
    • write the linear system $Ax=b$ to solve for the coefficients $\alpha$, $\beta$, and $\gamma$, that is, write $A$, $x$, and $b$ with the forumula for each element shown.
  • Why do we minimize the sum square error and not the sum of the error?
  • T/F: the sum absolute error could be used instead of the sum square error.
  • What norms corresponds to the sum absolute error and the sum square error?
  • For the data $C_i(t_i)$ given, code and solve for the least squares best fit parameters $C_0$, $k$ for the model $\frac{1}{C} - \frac{1}{C_0} = kt$. Do this for a linearized form of the model.
t_i C_i
0 998
100 440
200 300
300 300
400 190
  • A model for linear least squares, for some linear model $y_i(x_i)$, can be written as $A\eta = b$, where the columns of $A$ are the additive terms of the model, and each row of $A$ corresponds to a separate $x$ data point. To minimize the sum square error, we solve $\hat{A}\eta=\hat{b}$. Define $\hat{A}$ and $\hat{b}$.