Enter the covariance matrix S into R and call the matrix S. (1) b. Calculate the total sample variance of S (without using eigenvalues). (1) c. Calculate the generalized sample variance of S (without...

1 answer below »
Enter the covariance matrix S into R and call the matrix S. (1) b. Calculate the total sample variance of S (without using eigenvalues). (1) c. Calculate the generalized sample variance of S (without using eigenvalues). (1) d. Find the eigenvalues and eigenvectors of S. (2) e. Use the eigenvalues to compute the total sample variance of S. (1) f. Use the eigenvalues to compute the generalized sample variance of S. (1) g. Define a matrix P with columns containing the eigenvectors of S. Display P. (1) h. Show that P is an orthogonal matrix. (2) i. Find the sample covariance matrix of Y (say Sy) where Y P X = ' and 1 2 3 X  =[ , , ] . X X X Hint: You can get this from the covariance matrix S. Display Sy, rounded to three decimal places. (3) j. Looking at Sy, what can be said about the components of Y ? (1) k. Compute the trace of S and the trace of Sy. What do you notice?


Faculty of Science, Applied Science & Engineering Department of Mathematics and Statistics ASSIGNMENT 3 STAT 4203: INTRODUCTION TO MULTIVIARTE STATISTICAL ANALYSIS WINTER • 2022 Due Date: Wednesday, February 8th @ 12:30 pm Total Marks: 37 Part I: Questions requiring detailed solutions Instructions: A paper copy with solutions to these questions are due at 12:30 pm, in class, on February 1st. Show all of your work. Part I: Question 1 Marks: 13 Consider the matrix 1 4 . 4 6   =   −  A a. Find the eigenvalues and associated normalized eigenvectors of A . (4) b. Determine the spectral decomposition of A . (1) c. Find 1−A . (2) d. Find the eigenvalues and associated normalized eigenvectors of 1−A from first principles. (4) e. Compare the eigenvalues and eigenvectors in parts a. and d. What do you notice? (1) f. Is the quadratic form x Ax positive definite? Why or why not? (1) Part I: Question 2 Marks: 7 Consider the set of points 1 2( , )x x whose squared distances from the origin are given by 2 2 1 2 1 22 .4 4 3 2x x x x= + − a. Determine the major and minor axes of the ellipse of constant squared distance 4 and its associated lengths. (5) b. Sketch the ellipse of constant squared distance 4. (2) 2 Part II: Questions requiring the use of R The R code solutions to these questions are to be submitted as a .txt document on the due date through D2L. When you are ready to submit your assignment in D2L: 1. Go to Assessments -> Assignments (at top of page). 2. Click “Assignment #3 R Code” 3. Go to “Add a file”. Upload your assignment. Multiple files will not be accepted. Note: Your R script will be pasted into R and run. In order to earn full marks, the output must be correct and your R script must be properly commented. Part II : Question 1 Marks: 17 Consider the following sample covariance matrix corresponding to 10 measurements on a random vector 1 2 3[ , , ]X X X =X : 3 1 2 1 5 1 . 2 1 7 −    = −      S a. Enter the covariance matrix S into R and call the matrix S. (1) b. Calculate the total sample variance of S (without using eigenvalues). (1) c. Calculate the generalized sample variance of S (without using eigenvalues). (1) d. Find the eigenvalues and eigenvectors of S. (2) e. Use the eigenvalues to compute the total sample variance of S. (1) f. Use the eigenvalues to compute the generalized sample variance of S. (1) g. Define a matrix P with columns containing the eigenvectors of S. Display P. (1) h. Show that P is an orthogonal matrix. (2) i. Find the sample covariance matrix of Y (say Sy) where '=Y P X and 1 2 3[ , , ] .X X X =X Hint: You can get this from the covariance matrix S. Display Sy, rounded to three decimal places. (3) j. Looking at Sy, what can be said about the components of Y ? (1) k. Compute the trace of S and the trace of Sy. What do you notice? (3) Faculty of Science, Applied Science & Engineering Department of Mathematics and Statistics ASSIGNMENT 3 STAT 4203: INTRODUCTION TO MULTIVIARTE STATISTICAL ANALYSIS WINTER • 2022 Due Date: Wednesday, February 8th @ 12:30 pm Total Marks: 37 Part I: Questions requiring detailed solutions Instructions: A paper copy with solutions to these questions are due at 12:30 pm, in class, on February 1st. Show all of your work. Part I: Question 1 Marks: 13 Consider the matrix 1 4 . 4 6   =   −  A a. Find the eigenvalues and associated normalized eigenvectors of A . (4) b. Determine the spectral decomposition of A . (1) c. Find 1−A . (2) d. Find the eigenvalues and associated normalized eigenvectors of 1−A from first principles. (4) e. Compare the eigenvalues and eigenvectors in parts a. and d. What do you notice? (1) f. Is the quadratic form x Ax positive definite? Why or why not? (1) Part I: Question 2 Marks: 7 Consider the set of points 1 2( , )x x whose squared distances from the origin are given by 2 2 1 2 1 22 .4 4 3 2x x x x= + − a. Determine the major and minor axes of the ellipse of constant squared distance 4 and its associated lengths. (5) b. Sketch the ellipse of constant squared distance 4. (2) 2 Part II: Questions requiring the use of R The R code solutions to these questions are to be submitted as a .txt document on the due date through D2L. When you are ready to submit your assignment in D2L: 1. Go to Assessments -> Assignments (at top of page). 2. Click “Assignment #3 R Code” 3. Go to “Add a file”. Upload your assignment. Multiple files will not be accepted. Note: Your R script will be pasted into R and run. In order to earn full marks, the output must be correct and your R script must be properly commented. Part II : Question 1 Marks: 17 Consider the following sample covariance matrix corresponding to 10 measurements on a random vector 1 2 3[ , , ]X X X =X : 3 1 2 1 5 1 . 2 1 7 −    = −      S a. Enter the covariance matrix S into R and call the matrix S. (1) b. Calculate the total sample variance of S (without using eigenvalues). (1) c. Calculate the generalized sample variance of S (without using eigenvalues). (1) d. Find the eigenvalues and eigenvectors of S. (2) e. Use the eigenvalues to compute the total sample variance of S. (1) f. Use the eigenvalues to compute the generalized sample variance of S. (1) g. Define a matrix P with columns containing the eigenvectors of S. Display P. (1) h. Show that P is an orthogonal matrix. (2) i. Find the sample covariance matrix of Y (say Sy) where '=Y P X and 1 2 3[ , , ] .X X X =X Hint: You can get this from the covariance matrix S. Display Sy, rounded to three decimal places. (3) j. Looking at Sy, what can be said about the components of Y ? (1) k. Compute the trace of S and the trace of Sy. What do you notice? (3)
Answered Same DayFeb 08, 2023

Answer To: Enter the covariance matrix S into R and call the matrix S. (1) b. Calculate the total sample...

Monica answered on Feb 08 2023
32 Votes
> #a
> S <- matrix(c(3,-1,2,-1,5,1,2,1,7), nrow=3, ncol=3)
> print(S)
[,1] [,2] [,3]
[1,]
3 -1 2
[2,] -1 5 1
[3,] 2 1 7
> #b
> total_sample_variance <- sum(diag(S))/3
> print(total_sample_variance)
[1] 5
> #c
> generalized_sample_variance <- sum(S)/9
> print(generalized_sample_variance)
[1] 2.111111
> #d
> eigen_output <- eigen(S)
> print(eigen_output)
eigen() decomposition
$values
[1] 7.939235 5.406728 1.654037
$vectors
[,1] [,2] [,3]
[1,] 0.3325826 -0.41642393 ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here