Back to Understanding Linear Algebra

Orthogonal least squares

Fitting a line to data that no line passes through, by solving the normal equations for the coefficients that minimize the squared residuals.

Understanding Linear Algebra, Orthogonal least squares

Status
FlagsLoading your progress…

8 exercises

Exercise 1

Suppose we write the linear system as Ax=bA\xvec=\bvec.

  1. Find an orthogonal basis for Col(A)\col(A).

  2. Find b^\bhat, the orthogonal projection of b\bvec onto Col(A)\col(A).

  3. Find a solution to the linear system Ax=b^A\xvec = \bhat.

2.5

Exercise 2

Consider the data in this table.

  1. Set up the linear system Ax=bA\xvec=\bvec that describes the line b+mx=yb + mx = y passing through these points.

  2. Write the normal equations that describe the least-squares approximate solution to Ax=bA\xvec=\bvec.

  3. Find the least-squares approximate solution x^\xhat and plot the data and the resulting line.

  4. What is your predicted yy-value when x=3.5x=3.5?

  5. Find the coefficient of determination R2R^2.

2.5

Exercise 3

Consider the four points in this table.

  1. Set up a linear system Ax=bA\xvec = \bvec that describes a quadratic function passing through the points.

  2. Use a QRQR factorization to find the least-squares approximate solution x^\xhat and plot the data and the graph of the resulting quadratic function.

  3. What is your predicted yy-value when x=3.5x=3.5?

  4. Find the coefficient of determination R2R^2.

2.5

Exercise 4

Consider the data in this table.

  1. Set up a linear system Ax=bA\xvec = \bvec that describes the relationship

  2. Find the least-squares approximate solution x^\xhat.

  3. What is your predicted yy-value when x1=2.4x_1 = 2.4 and x2=2.9x_2=2.9?

  4. Find the coefficient of determination R2R^2.

2.5

Exercise 5

Determine whether the following statements are true or false and explain your thinking.

  1. If Ax=bA\xvec=\bvec is consistent, then x^\xhat is a solution to Ax=bA\xvec=\bvec.

  2. If R2=1R^2=1, then the least-squares approximate solution x^\xhat is also a solution to the original equation Ax=bA\xvec=\bvec.

  3. Given the QRQR factorization A=QRA=QR, we have Ax^=QTQbA\xhat=Q^TQ\bvec.

  4. A QRQR factorization provides a method for finding the least-squares approximate solution to Ax=bA\xvec=\bvec that is more reliable than solving the…

2.5

Exercise 6

Explain your response to the following questions.

  1. If x^=0\xhat=\zerovec, what does this say about the vector b\bvec?

  2. If the columns of AA are orthonormal, how can you easily find the least-squares approximate solution to Ax=bA\xvec=\bvec?

2.5

Exercise 11

We observed that if the columns of AA are linearly independent, then there is a unique least-squares approximate solution to the equation Ax=bA\xvec=\bvec because the equation Ax^=b^A\xhat=\bhat has a unique solution. We also said that x^\xhat is the unique solution to the normal equation ATAx^=ATbA^TA\xhat = A^T\bvec without explaining why this equation has a unique solution. This exercise offers an explanation.

Assuming that the columns of AA are linearly indepen…

2.5

Exercise 12

This problem is about the meaning of the coefficient of determination R2R^2 and its connection to variance, a topic that appears in the next section. Throughout this problem, we consider the linear system Ax=bA\xvec=\bvec and the approximate least-squares solution x^\xhat, where Ax^=b^A\xhat=\bhat. We suppose that AA is an m×nm\times n matrix, and we will denote the mm-dimensional vector 1=[11⋮1]\onevec = \fourvec11{\vdots}1.

  1. Explain why b‾\bbar, the mean of the components of b\bvec, can be found a…

2.5

Adapted from Understanding Linear Algebra © 2023 David Austin. Licensed under CC BY 4.0. Source: Understanding Linear Algebra. Imported at revision 3e6dced.