Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

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?
Answered Same Day Feb 08, 2023

Solution

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
#
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