Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 Eigenvectors of the Gaussian Covariance Matrix Consider two one-dimensional random variables Xi ~ N(3,9) and X2 ~ ^Xi + N(4,4), where N41.r2) is a

image text in transcribed

3 Eigenvectors of the Gaussian Covariance Matrix Consider two one-dimensional random variables Xi ~ N(3,9) and X2 ~ ^Xi + N(4,4), where N41.r2) is a Gaussian distribution with mean and variance . 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 Xi. In your code, make sure to specify the Random Number Generator seed that was used so your simulation is reproducible. For each of the following parts, include the corresponding output of your program (a) Compute the mean (in R2) of the sample. (b) Compute the 2 x 2 covariance matrix of the sample (c) Compute the eigenvectors and eigenvalues of this covariance matrix. (d) On a two-dimensional grid with a horizonal axis for Xi 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) Let U-M v2] be a 2 2 matrix whose columns are the eigenvectors of the covariance matrix, where vi is the eigenvector with the larger eigenvalue. We use U" as a rotation matrix to rotate each sample point from the (Xi, X2) coordinate system to a coordinate system aligned with the eigenvectors. (As UT-U-1, 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 u from each point; then rotate each point by UT giving xrotated-U"(x-). 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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

ISBN: 0805302441, 978-0805302448

Students also viewed these Databases questions

Question

The company openly shares plans and information with employees.

Answered: 1 week ago