Skip to content

4.3-exam2-1999

Quiz 2, 1999 · Section 4.3: Least Squares Approximations Source: exam2_1.pdf, pp. 26, 30

Problem

2 (24 pts.) An experiment at the nine times \(t = -4, -3, -2, -1, 0, 1, 2, 3, 4\) yields the consistent result \(b = 0\) except at the last time (\(t = 4\)) we get \(b = 10\). We want the best straight line \(b = C + Dt\) to fit these nine data points by least squares.

(a) Write down the equations \(Ax = b\) with unknowns \(C\) and \(D\) that would be solved if a straight line exactly fit the data (it doesn't).

(b) Find the best least squares value of \(C\) and \(D\).

(c) This problem is really projecting the vector \(b = (0, 0, 0, 0, 0, 0, 0, 0, 10)\) onto a certain subspace. Give a basis for that subspace and give the projection \(p\) of \(b\) onto the subspace.

Solution 2a. \[ \begin{bmatrix} 1 & -4 \\ 1 & -3 \\ 1 & -2 \\ 1 & -1 \\ 1 & 0 \\ 1 & 1 \\ 1 & 2 \\ 1 & 3 \\ 1 & 4 \end{bmatrix} \begin{bmatrix} C \\ D \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 10 \end{bmatrix} \] 2b. \[ A^T A = \begin{bmatrix} 9 & 0 \\ 0 & 60 \end{bmatrix} \quad \text{and} \quad A^T b = \begin{bmatrix} 10 \\ 40 \end{bmatrix}. \] Solve \(A^T A \begin{bmatrix} C \\ D \end{bmatrix} = A^T b\) to find \[ C = \frac{10}{9}, \quad D = \frac{40}{60} = \frac{2}{3}. \] 2c. The columns of \(A\) are a basis for the subspace. The projection is \[ p = C(\text{column 1}) + D(\text{column 2}). \]

Keywords: least squares, straight line, normal equations, projection