My Math Forum Least Squares Problem

 Linear Algebra Linear Algebra Math Forum

 January 12th, 2018, 01:20 PM #1 Senior Member   Joined: Jan 2017 From: Toronto Posts: 188 Thanks: 2 Least Squares Problem This problem projects $\displaystyle b = (b_1,b_2....,b_m)$ onto the line through $\displaystyle a = (1, 1, 1, ....1)$. We solve m equations ax = b in 1 unknown (by least squares). (a) Solve $\displaystyle a_T~a~\hat{x} = a_T~b$ to show that \hat{x} is the mean (the average) of the b’s. (b) Find $\displaystyle e = b - a \hat{x}$ and the variance $\displaystyle ||e||^2$ and the standard deviation $\displaystyle ||e||$. (c) The horizontal line $\displaystyle \hat{b} = 3$ is closest to b = (1, 2, 6). Check that p = (3, 3 3) is perpendicular to e and find the 3 by 3 projection matrix P. Ans(a): Becauase a = (1,1,1,....1), therefore $\displaystyle a_T a = 1 + 1 + 1 +....+ 1 = 1~*~m = m$ And $\displaystyle a_T b = b_1 + b_2 + .... + b_m$ So $\displaystyle \hat{x} = \frac{b_1 + b_2 + b_3 + .... + b_m}{m} = b_{avg}$ Ans(b): Need help.. Ans(c): Need help.. Last edited by zollen; January 12th, 2018 at 01:42 PM.
 January 12th, 2018, 01:39 PM #2 Global Moderator   Joined: May 2007 Posts: 6,581 Thanks: 610 b) Let $\displaystyle \epsilon_k=b_x-\hat{x}$. $\displaystyle \epsilon = (\epsilon_1,...\epsilon_m)$, $\displaystyle ||\epsilon ||^2=\frac{\epsilon_1^2+...\epsilon_m^2}{m}$. Ill let you do (c). Thanks from zollen
 January 13th, 2018, 06:45 AM #3 Senior Member   Joined: Jan 2017 From: Toronto Posts: 188 Thanks: 2 Ans(b): $\displaystyle Variance = \frac{\sum_{k=1}^{m} (b_k - b_{avg})^2}{m}$ Ans(c): e = (1, 2, 6) - (3, 3, 3) = (-2, -1, 3) (-2, -1, 3) dot_product (3, 3, 3) = 0 Since p = Pb, (3, 3, 3) = P (1, 2, 6) Project Matrix (P) = \begin{bmatrix} 3&0&0\\ 0&3/2&0\\ 0&0&1/2\\ \end{bmatrix}
 January 14th, 2018, 06:23 AM #4 Senior Member   Joined: Jan 2017 From: Toronto Posts: 188 Thanks: 2 Ans(b): Given $\displaystyle \hat{x} = b_{avg}$ Therefore $\displaystyle e = b - a \hat{x} = \begin{bmatrix} b_1\\ b_2\\ ..\\ b_m \end{bmatrix} ~-~ \begin{bmatrix} 1\\ 1\\ ..\\ 1 \end{bmatrix} ~b_{avg} ~=~ \begin{bmatrix} e_1\\ e_2\\ ..\\ e_m \end{bmatrix}$ $\displaystyle ||e||^2~=~\frac{{e_1}^2 + {e_2}^2 + ... + {e_m}^2}{m}$ $\displaystyle ||e||~=~\sqrt{ \frac{{e_1}^2 + {e_2}^2 + ... + {e_m}^2}{m} }$ Ans(c): $\displaystyle p=Pb~~and~~P= \frac{a * a^t}{a^t * a}$ $\displaystyle a = \begin{bmatrix} 1\\ 1\\ 1 \end{bmatrix}$ But... $\displaystyle a^t * a ~=~ \begin{bmatrix} 1&1&1\\ 1&1&1\\ 1&1&1 \end{bmatrix}$ has no inverse.... Would anyone show me how to calculate the projection matrix? Last edited by zollen; January 14th, 2018 at 06:25 AM.

 Tags problem, squares

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post ALLIRIX Linear Algebra 2 January 27th, 2015 12:15 AM metavdr Geometry 7 February 8th, 2014 07:59 AM gaussrelatz Number Theory 6 September 1st, 2012 03:56 AM elim Number Theory 0 April 19th, 2010 07:15 AM hemi Algebra 3 February 19th, 2009 12:00 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top