{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

pset5-soln - 18.06 Problem Set 5 Due Wednesday 19 March...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
18.06 Problem Set 5 Due Wednesday, 19 March 2008 at 4 pm in 2-106. Problem 1: Do problem 12 from section 4.3 (pg. 217) in the book. There is a typo in part c. It should read something like this: c) Let’s analyze what happens when b = (1 , 2 , 6). In this case x = 3 and the projection onto the line is p = (3 , 3 , 3). Check that p is perpendicular to e . Also find the projection matrix P . Solution (4+3+3 points) a) We know the vectors a and b , so we can just write this down: a T a = a · a = m , a T b = a · b = i b i , so x = 1 m i b i . This is the average of the b i . b) I’ll continue to use x to denote the average of the b i . The error vector is e = ( b 1 - x, b 2 - x, . . . ). The variance is then e 2 = i ( b i - x ) 2 = i b 2 i - 2 x i b i + mx 2 = i b 2 i - mx 2 = i ( b 2 i - x 2 ) which is the usual expression. The standard deviation is the square root of this quantity. c) We have b = (1 , 2 , 6) and p = (3 , 3 , 3). The error is e = ( - 2 , - 1 , 3), and p · e = 0 as it should. The matrix P is P = a ( a T a ) - 1 a T = 1 3 1 1 1 1 1 1 1 1 1 Problem 2: Do problem 17 from section 4.3 (pg. 217) in the book. Solution (10 points) 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The points are ( - 1 , 7), (1 , 7), and (2 , 21). So, our matrices are A = 1 - 1 1 1 1 2 b = 7 7 21 We find the coeffiecients ( C, D ) by setting C D = x = ( A T A ) - 1 A T b = 3 2 2 6 - 1 35 42 = 1 14 6 - 2 - 2 3 35 42 = 9 4 So the best fit line is b = 9 + 4 t . When you draw it, it will look about right; I’m not going to draw it here. Problem 3: Find a function of the form f ( t ) = C sin( t )+ D cos( t ) that approximates the three points (0 , 0), ( π/ 2 , 2), and ( π, 1). As explained in the book, the method is the same as for fitting a line using least-squares! (See pg. 212 for a quadratic example.) The difference is that the matrix A we use will no longer have columns with entries 1 and t i but rather sin( t i ) and cos( t i ). Solution (10 points) Our matrix A will have columns given by sin( t i ) and cos( t i ), but everything else is the same. A = 0 1 1 0 0 - 1 B = 0 2 1 2
Image of page 2
We find x in the usual way. x = ( A T A ) - 1 A T b = 1 0 0 2 - 1 2 - 1 = 1 0 0 1 2 2 - 1 = 2 - 1 2 Our best fit equation is f ( t ) = 2 sin( t ) - 1 2 cos( t ). Again, if you draw the graph, you’ll see that it looks about right. Problem 4: a) Show that if Q is orthogonal (i.e. Q is square with orthonormal columns) then so is Q T . Use the criteria Q T Q = I . b) If Q 1 and Q 2 are orthogonal, show that their product Q 1 Q 2 is as well. c) If Q has orthonormal columns but is not square, does Q T have the same property? What can you say about QQ T and Q T Q in this case? Give an example for a 3 by 2 matrix Q . Solution (3+3+4 points) a) If Q is square, then so is Q T . So, we just need to show that ( Q T ) T = ( Q T ) - 1 . Multiplying: ( Q T ) T Q T = QQ T . But this is the identity since Q T = Q - 1 (as Q is an orthogonal matrix). b) The same idea here: we must show that ( Q 1 Q 2 ) T = ( Q 1 Q 2 ) - 1 . Multiplying: ( Q 1 Q 2 ) T ( Q 1 Q 2 ) = Q T 2 Q T 1 Q 1 Q 2 = Q T 2 Q 2 = I . Here we have used that Q T 1 Q 1 = I and Q T 2 Q 2 = I .
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern