solution2 - STAT 315A Homework 2 Solutions Problem 1: ESL...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: STAT 315A Homework 2 Solutions Problem 1: ESL 4.2 a) For LDA, k = x 1 k 1 / 2 k 1 k + log ( N k /N ) . Substitute this formula into the requirement that 2 ( x ) 1 ( x ) > 0 and we get the solution x 1 ( 2 1 ) + 1 / 2 1 1 1 1 / 2 2 1 2 + log ( N 2 /N ) log ( N 1 /N ) > . b) In least squares, the normal equations are ( X X ) = X y , where = ( , ) . In this case we use X to denote column of 1s (denote it 1 x ) attached to the matrix of covariates X and y is N/N 1 or N/N 2 as the class dictates. Thus: summationdisplay i y i = N 1 ( N/N 1 ) + N 2 ( N/N 2 ) = 0 X y = ( N/N 1 )( N 1 1 ) + ( N/N 2 )( N 2 2 ) = N ( 2 1 ) X 1 x = N = N 1 1 + N 2 2 X X = ( N 2) + N 1 1 1 + N 2 2 2 . Thus we can re-write the normal equations for as: 1 x X = N + ( N 1 1 + N 2 2 ) = 0 = ( N 1 N 1 + N 2 N 2 ) X X = X 1 x + X X = X y. (1) And plugging the expressions from (a) into (1) we get: (( X 1 x )( N 1 N 1 N 2 N 2 ) + ( N 2) + N 1 1 1 + N 2 2 2 ) = N ( 2 1 ) (( N 1 N 2 1 N ) 1 1 + ( N 2 N 2 2 N ) 2 2 2 N 1 N 2 N 1 2 + ( N 2) ) = N ( 2 1 ) . Now, N 1 N 2 1 N = N 2 N 2 2 N = N 1 N 2 N , and thus we get the required result: (( N 2) + N 1 N 2 N ( 2 1 )( 2 1 ) ) = N ( 2 1 ) . 1 c) Start by using the definition of B B = ( 2 1 )[( 2 1 ) = c ( 2 1 ) , Where c = ( 2 1 ) . Thus we get from part (b): = N cN 1 N 2 N ( N 2) ( 2 1 ) = N cN 1 N 2 N ( N 2) 1 ( 2 1 ) . d) If we have a new coding y i , we can always write y i = ay i + b (where y i is the original coding in the problem). Then we have: summationdisplay i ( y i x i ) 2 = summationdisplay i a 2 ( y i + 1 a ( b ) 1 a x i ) 2 . So we can see that we have a relation between the LS estimates under both codings: = b a = a In particular, is also proportional to 1 ( 2 1 ) . e) Let = c 1 ( 2 1 ). From (b) and (c): = ( N 1 N 1 + N 2 N 2 ) = c ( N 1 N 1 N 2 N 2 ) 1 ( 2 1 ) , Which gives us overall: f ( x ) = c [ x 1 ( 2 1 )...
View Full Document

Page1 / 10

solution2 - STAT 315A Homework 2 Solutions Problem 1: ESL...

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

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