Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6 Eigenvectors of the Gaussian Covariance Matrix (7 points) Consider two one-dimensional random variables X; ~ N(3,9) and X2 ~ _X + N(4,4), where Nu,

image text in transcribed

6 Eigenvectors of the Gaussian Covariance Matrix (7 points) Consider two one-dimensional random variables X; ~ N(3,9) and X2 ~ _X + N(4,4), where Nu, o?) is a Gaussian distribution with mean y and variance o?. Write a program that draws n = 100 random two-dimensional sample points from (X1, X2) such that the ith value sampled from X2 is calculated based on the ith value sampled from Xj. In your code, make sure to choose and set a fixed random number seed for whatever random number generator you use, so your simulation is reproducible, and document your choice of random number seed and random number generator in your write-up. For each of the following parts, include the corresponding output of your program. (a) (1 point) Compute the mean (in R?) of the sample. (b) (1 point) Compute the 2 x 2 covariance matrix of the sample. (c) (2 points) Compute the eigenvectors and eigenvalues of this covariance matrix. (d) (1 point) On a two-dimensional grid with a horizonal axis for X, with range [-15, 15) and a vertical axis for X2 with range (-15, 15), plot (i) all n = 100 data points, and (ii) arrows representing both covariance eigenvectors. The eigenvector arrows should orig- inate at the mean and have magnitudes equal to their corresponding eigenvalues. (e) (2 points) Let U = [V1 V2] be a 2x2 matrix whose columns are the eigenvectors of the covari- ance matrix, where vi is the eigenvector with the larger eigenvalue. We use U as a rotation matrix to rotate each sample point from the (X1, X,) coordinate system to a coordinate system aligned with the eigenvectors. (As U = U-!, the matrix U reverses this rotation, moving back from the eigenvector coordinate system to the original coordinate system). Center your sample points by subtracting the mean from each point; then rotate each point by UT, giv- ing Xrotated = UT(x - u). Plot these rotated points on a new two dimensional-grid, again with both axes having range [-15, 15)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Question What are the advantages of a written bonus plan?

Answered: 1 week ago