soln3 - MATH 245 Linear Algebra 2, Solutions to Assignment...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH 245 Linear Algebra 2, Solutions to Assignment 3 1: (a) Find the least-squares best fit quadratic f P 2 for the following data points. x i - 1 0 1 2 3 y i 0 2 3 2 - 2 Solution: Let A = 1 x 1 x 1 2 1 x 2 x 2 2 1 x 3 x 3 2 1 x 4 x 4 2 1 x 5 x 5 2 = 1 - 1 1 1 0 0 1 1 1 1 2 4 1 3 9 and y = y 1 y 2 y 3 y 4 y 5 = 0 2 3 2 - 2 . Then we have A t A = 1 1 1 1 1 - 1 0 1 2 3 1 0 1 4 9 1 - 1 1 1 0 0 1 1 1 1 2 4 1 3 9 = 5 5 15 5 15 35 15 35 99 . A t y = 1 1 1 1 1 - 1 0 1 2 3 1 0 1 4 9 0 2 3 2 - 2 = 5 1 - 7 , and ( A t A ± ± A t y ) = 5 5 15 5 15 35 15 35 99 ± ± ± ± ± ± 5 1 - 7 1 1 3 0 10 20 0 20 54 ± ± ± ± ± ± 1 - 4 - 22 1 1 3 0 1 2 0 0 14 ± ± ± ± ± ± 1 - 2 5 - 14 1 0 1 0 1 2 0 0 1 ± ± ± ± ± ± 7 5 - 2 5 - 1 1 0 0 0 1 0 0 0 1 ± ± ± ± ± ± 12 5 8 5 - 1 . Thus the best fit quadratic is f ( x ) = 12 5 + 8 5 x - x 2 . (b) Let { p 1 ,p 2 , ··· ,p l } be a linearly independent set of polynomials in P m and let ( x 1 ,y 1 ) , ( x 2 ,y 2 ) , ··· , ( x n ,y n ) be points in R 2 such that at least m +1 of the x -coordinates x i are distinct. Show that there exists a unique polynomial f Span { p 1 ,p 2 , ··· ,p l } which minimizes the sum n i =1 ( y i - f ( x i ) ) 2 . Solution: For p ( t ) = a 0 + a 1 t + ··· + a m t m P m , we write p ( x ) = ( p ( x 1 ) ,p ( x 2 ) , ··· ,p ( x n ) ) t R n . Note that p ( x ) = p ( x 1 ) p ( x 2 ) . . . p ( x n ) = a 0 + a 1 x 1 + ··· + a m x 1 m a 0 + a 1 x 2 + ··· + a m x 2 m . . . a 0 + a 1 x n + ··· + a m x n m = A [ p ] , where A = 1 x 1 x 1 2 ··· x 1 m 1 x 2 x 2 2 ··· x 2 m . . . 1 x n x n 2 ··· x n m M n × ( m +1) and [ p ]= a 0 a 1 . . . a m R m +1 is the coordinate vector of p . We need to find c R l such that the polynomial f = c 1 p 1 + c 2 p 2 + ··· + c l p l minimizes ± ± y - f ( x ) ± ± . Note that f ( x ) = c 1 p 1 ( x ) + ··· + c l p l ( x ) = c 1 A [ p 1 ] + ··· + c l A [ p l ] = ( A [ p 1 ] , ··· ,A [ p l ] ) c = APc, where P = ( [ p 1 ] , [ p 2 ] , ··· , [ p l ] ) M ( m +1) × l . Since some m + 1 of the x i are distinct, it follows from question 5 on assignment 2 that some set of m + 1 rows of A is linearly independent, so A has rank m + 1 and hence A is 1:1. Since { p 1 ,p 2 , ··· ,p l } is linearly independent, it follows that ² [ p 1 ] , [ p 2 ] , ··· , [ p l ] ³ is also linearly
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2011 for the course MATH 245 taught by Professor New during the Fall '09 term at Waterloo.

Page1 / 5

soln3 - MATH 245 Linear Algebra 2, Solutions to Assignment...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online