200 likes | 330 Views
Multivariate Statistics. Matrix Algebra I Solutions to the exercises W. M. van der Veld University of Amsterdam. Problem 1. Because the diagonal of I contains 1’s, IA means multiplying each column by 1 = A AI means multiplying each row by 1 = A. Problem 2. Problem 3.
E N D
Multivariate Statistics Matrix Algebra I Solutions to the exercises W. M. van der Veld University of Amsterdam
Problem 1 • Because the diagonal of I contains 1’s, • IA means multiplying each column by 1 = A • AI means multiplying each row by 1 = A
Problem 3 • Let X by of order n x m.Therefore X’ will be of order m x n.So X’X = [m x n] [n x m] = [m x m], andAnd XX’ = [n x m] [m x n] = [n x n]
Problem 4 See that the first column of A has been multiplied with 2, the second column with 3, and the third with 1.
Problem 5 The problem is similar to that of exercise 4. But now the columns are rows, this is accomplished by pre multiplication,, instead of post multiplication. Thus the solution is DA. Notice that now the ith row of the product matrix is equal to diia•i.
Problem 6 • The problem is similar to that of exercise 4. • Thus AD, with diagonal matrix D, • for which d22=d, and dii=1 (i≠2).
Problem 7 D is a diagonal matrix, with diagonal elements 2, 3, 1.
Problem 8a u’X is the row with the sumscores of all tests. An illustration Notice that the sum is taken over the row, keeping the column constant. Because the columns in a data matrix represent the variables, this is the sumscore.
Problem 8b xi’u is the sumscore for a person i, or total score, and X’u is the column with the total scores of all persons. An illustration Notice that the sum is taken across the columns, keeping the row constant. Each row is a case (or respondent) in the data matrix, so this is the total score of for each respondent. Sometimes referred to as the testscore.
Problem 9 • E(x) = u’X/n; E(x) is another way to write the mean vector. • A = X – uE(x) • u’A = u’(X – uE(x)) = u’X – u’uE(x)= nE(x) – u’uE(x) = nE(x)-nE(x) = 0;Why: u’u=n? They are vectors containing as many 1’s as there are observations for each test. So the result will be a number representing n.
Problem 9d Calculate A for this X.
Problem 9d Calculate A for this X.
Problem 9e Calculate A’A/n.
Problem 9e A’A/n. is the variance covariance matrix.
Problem 9f • Find an expression for C in terms of S and A. • We already have the deviations from the mean in A, so all we have to do is to divide these numbers by the standard deviation. • The standard deviation of each variable were collected in a diagonal matrix S. Obtaining the matrix of standard scores is similar to the problem in exercise 4. However, we have to divide by the elements on the diagonal. In matrix algebra this is accomplished by multiplying with the inverse. So, • C=AS-1
Problem 9f Calculate S. We have the variance-covariance matrix, which is A’A/n. The elements on the diagonal are the variances. The standard deviation is the square root of the variances. Thus S, should be:
Problem 9g Calculate R = C’C/n R = (AS-1)’(AS-1)/n= S-1’A’AS-1/n= S-1’∑S-1, where ∑ is the variance covariance matrix A’A/n.
Problem 9g R is the correlation matrix.