solution2

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

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

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

View Full Document
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 1’s (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

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online