Report in R Markdown
Given a π Γ 1vector π and a π Γ π positive definite matrix Ξ£, the pdf for a π-variate normal density at a point
π = (π₯1, π₯2, … , π₯π)πcan be written as
π(π) = (2π)βπ
2 |Ξ£|β1/2 exp [β 1
2 (π β π)π Ξ£β1(π β π)] .
Now consider the bivariate normal random variable, where
π = (π₯1
π₯2) ,β‘β‘β‘β‘π = (π1
π2) ,β‘β‘β‘β‘β‘β‘Ξ£ = (π11 π12
π21 π22).
(a) [3 pts] Write the second order Taylor expansion for π(π), for the bivariate normal density, around the point
ππ = (π1
π2).
(b) [3 pts] Graph a 3-d plot of the function π(π₯1, π₯2) and its second order Taylor expansion for the following parameters
(for each set of parameters, f and its approximation should be on the same frame):
(i)β‘β‘β‘π = (0
0) ,β‘β‘β‘β‘β‘β‘Ξ£ = ( 1 β0.3
β0.3 1 ) β‘;β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘(ii)β‘β‘β‘β‘β‘β‘β‘β‘β‘β‘π = (0
0) ,β‘β‘β‘β‘β‘β‘Ξ£ = ( 1 0.8
0.8 1 )
Note that the means and variances for each of the variables in the cases (i) and (ii) are 0 and 1 respectively. This should guide you an idea for a reasonable range for π₯1 and π₯2 to consider for your graphs.
(c) [3 pts] Graph the constant value contours for π(π) for the cases (i) and (ii) in part (b). What is the shape of the constant value contours? What is the center of the constant value contours?
(d)Compute the eigenvalues and eigenvectors for each of the covariance matrices π΄ given in part (b).
Superimpose the eigenvectors on each of their corresponding constant value contours that you drew in part (c) and
explain how the eigenvectors and eigenvalues are related to the constant value contour