Back to Orthogonal least squares

Exercise 12

Avg difficulty 2.5

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 as the dot product b‾=1mb⋅1.\bbar = \frac 1m \bvec\cdot\onevec.

  2. In the examples we have seen in this section, explain why 1\onevec is in Col(A)\col(A).

  3. If we write b=b^+b⊥\bvec = \bhat + \bvec^\perp, explain why b⊥⋅1=0\bvec^\perp\cdot\onevec = 0 and hence why the mean of the components of b⊥\bvec^\perp is zero.

  4. The variance of an mm-dimensional vector v\vvec is Var(v)=1m∣v~∣2\var(\vvec) = \frac1m \len{\widetilde{\vvec}}^2, where v~\widetilde{\vvec} is the vector obtained by demeaning v\vvec.

    Explain why Var(b)=Var(b^)+Var(b⊥).\var(\bvec) = \var(\bhat) + \var(\bvec^\perp).

  5. Explain why ∣b−Ax^∣2∣b~∣2=Var(b⊥)Var(b)\frac{\len{\bvec - A\xhat}^2}{\len{\widetilde{\bvec}}^2} = \frac{\var(\bvec^\perp)}{\var(\bvec)} and hence R2=Var(b^)Var(b)=Var(Ax^)Var(b).R^2 = \frac{\var(\bhat)}{\var(\bvec)} = \frac{\var(A\xhat)}{\var(\bvec)}.

    These expressions indicate why it is sometimes said that R2R^2 measures the “fraction of variance explained” by the function we are using to fit the data. As seen in the previous exercise, there may be other features that are not recorded in the dataset that influence the quantity we wish to predict.

  6. Explain why 0≤R2≤10\leq R^2 \leq 1.

Austin, Understanding Linear Algebra, §6.5 Orthogonal least squares, Exercise 12

AI Tutor

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