Procedure for a least-squares quadratic fit

An engineer wants the least-squares quadratic y^=c0+c1x+c2x2\hat y = c_0 + c_1 x + c_2 x^2 for ten measured points (xi,yi)(x_i, y_i). Put the steps of the procedure in the order they are carried out, from the raw data to judging the fit.

  1. 1.

    Solve ATA c^=ATyA^{T}A\,\hat{\mathbf c} = A^{T}\mathbf y for the three coefficients.

  2. 2.

    Collect the equations as Ac=yA\mathbf c = \mathbf y, with row (1,xi,xi2)(1, x_i, x_i^2) in AA for each point.

  3. 3.

    Write one equation c0+c1xi+c2xi2=yic_0 + c_1 x_i + c_2 x_i^2 = y_i for each data point.

  4. 4.

    Compute the residual y−Ac^\mathbf y - A\hat{\mathbf c} and its squared length to judge the fit.

  5. 5.

    Compute the matrix ATAA^{T}A and the vector ATyA^{T}\mathbf y.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Least Squares Approximation Questions: