代做EF5474 Quantitative Methods in Economics Exercise 2调试数据库编程
- 首页 >> Algorithm 算法EF5474 Quantitative Methods in Economics
Due date: 16 October 2024
Exercise 2
Question 1 (100 points) Least squares
Consider the least square projection matrix P = X(X ' X)−1X , where
X is n ×k . P represents a linear mapping from Rn to Rn . We have already assumed X has full column rank and hence (X ' X)−1 exists.
a) Verify the following properties of P.
1. P is symmetric and idempotent.
2. trace(P) = k . Hint: trace(AB) = trace(BA) .
3. The null space or kernel of P is S(X)丄 .
4. As a linear mapping from Rn to Rn , P is neither one-to-one nor onto. Draw a picture to illustrate this point for the case n = 2 and k = 1.
Hint: PET_ch3, p. 50, Fact 3.1.3.
5. P−1 does not exist.
Hint: Prove by contradiction. Suppose there exists B such that PB = BP = I.
6. The eigenvalues of P are either 0 or 1.
Hint: Consider eigen-pair (λ, x) so that Px = λx and x ≠ 0. Pre-multiply the equation by P, …
7. rank(P) = k .
Hint: PET_ch3,p. 57, Fact 3.2.7.For n × n matrix A, trace(A) = λ1 + λ2 + ... + λn , det(A) = λ1λ2 ...λn , and rank(A) = No. of non-zero eigenvalues λj .
You can get a better understanding of the trace(A) and det(A) properties by working out the n = 2 case. The determinant equation det(A − λI) = 0 becomes a quadratic equation from which you can find out λ1 and λ2 in closed-form.
b) Deduce from (a) the corresponding properties of the residual mapping M = I − P .
c) Based on (b), prove that s2 = (n − k)−1 ' is an unbiased estimator of σ2 , i.e. E(s2 ) = σ2 , under the homoskedasticity assumption E(uu ') = σ2I , treating X as non-random.
Hint: = My = M (Xβ+ u) = Mu .
In the special case X = ι (a column of 1's), s2 is nothing but the sample variance 2 in elementary statistics. If you recall, the algebraic proof of unbiasedness is messy and ugly. In contrast, your proof using the residual projection matrix M and its properties should be elegant and graceful.
Question 2 (100 points) Projection
a) Let H be a projection operator mapping y onto S(X) . H may not be symmetric. Explain why H must be idempotent if His meant to be a projection. Draw a picture to illustrate this point for the case n = 2 and k = 1.
b) Let e = y − Hy , the projection residual. Show that e 丄 Hy if and only if H ' = H . That is, symmetry characterizes whether the projection is orthogonal or not.
c) (Non-orthogonal projection) Assume X = [1 0]' , one of the canonical orthonormal base vectors in R2 . Draw a picture that shows H maps y onto S(X) in such a way that the angle between the residual vector and members of S(X) is 45 degrees (or 135 degrees, depending on how you measure the angle). Draw the projection complement S(X)c that contains all residual vectors. Demonstrate in your picture that any y can be written as the sum of the projection image Hy and the residual e = (I − H)y .
d) Continue with the example in (c). Find an equation that characterizes the coefficient b of the projection image Xb . Is the equation linear?
e) Now generalize (c) for Rn , k = 2, and X = [x1 x2 ] . The projection image is Xb = b1x1 + b2x2 . Find a two-equation system that characterizes the two coefficients b1 and b2 .