Matrix Multiplication Rank and Dependency n n Columns

  • Slides: 22
Download presentation
Matrix Multiplication

Matrix Multiplication

Rank and Dependency n n Columns of a matrix: Matrix A:

Rank and Dependency n n Columns of a matrix: Matrix A:

Linear Combinations n n Columns: Linear Combination: “Nontrivial” if at least one l is

Linear Combinations n n Columns: Linear Combination: “Nontrivial” if at least one l is not 0 ** Columns are dependent if there is a nontrivial linear combination for which:

Rank n n n The RANK of a matrix is the maximum number of

Rank n n n The RANK of a matrix is the maximum number of linearly independent columns that can be selected from the columns of the matrix. Rank of X is same as rank of X’X. A matrix is invertible only if u u It is square and It is of FULL RANK

Example - Look for Dependency DEPENDENT? MAYBE, MAYBE NOT!

Example - Look for Dependency DEPENDENT? MAYBE, MAYBE NOT!

Same Example (con. t) DEPENDENT? YES !!!!

Same Example (con. t) DEPENDENT? YES !!!!

Class Variables �Data Set X MATRIX

Class Variables �Data Set X MATRIX

Treatment 1: Treatment 2: Treatment 3:

Treatment 1: Treatment 2: Treatment 3:

A 2 X 20 Y A 5 24 A 8 22 A 11 28

A 2 X 20 Y A 5 24 A 8 22 A 11 28 A 14 26 A 17 25 B 2 X 15 Y B 6 19 B 7 20 B 12 26 B 14 30 B 17 28 C 1 X Y 2 C 5 8 C 9 12 C 11 10 C 14 18 C 15 20

A 2 20 A 5 24 A 8 22 A 11 28 A 14

A 2 20 A 5 24 A 8 22 A 11 28 A 14 26 A 17 25 B 2 15 B 6 19 B 7 20 B 12 26 B 14 30 B 17 28 C 1 2 C 5 8 C 9 12 C 11 10 C 14 18 C 15 20 X= 2 5 8 11 14 17 2 6 7 12 14 17 1 5 9 11 14 15 <== One column One slope

A 2 A 5 A 8 A 11 A 14 A 17 B 2

A 2 A 5 A 8 A 11 A 14 A 17 B 2 B 6 B 7 B 12 B 14 B 17 C 1 C 5 C 9 C 11 C 14 C 15 20 24 22 28 26 25 15 19 20 26 30 28 2 8 12 10 18 20 X = 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 2 2 0 5 5 0 8 8 0 11 11 0 14 14 0 17 17 0 2 6 0 6 7 0 7 12 0 12 14 0 14 17 0 17 1 0 0 5 0 0 9 0 0 11 0 0 14 0 0 15 0 0 0 0 <== Add 0 TRT*X 0 Interaction 0 0 1 5 9 11 14 15

PROC GLM; CLASS TRT; MODEL Y = TRT X TRT*X; • F test to

PROC GLM; CLASS TRT; MODEL Y = TRT X TRT*X; • F test to delete TRT*X • What is being tested? • Key => • What is REDUCED MODEL? • Y = TRT X ==> Single slope • Testing …… • H 0: Arbitrary lines • H 1: Parallel lines

PROC GLM; CLASS TRT; MODEL Y = TRT*X; • One dependency in TRT •

PROC GLM; CLASS TRT; MODEL Y = TRT*X; • One dependency in TRT • NO dependencies in TRT*X • F for TRT*X • What is it testing NOW? • Reduced model = ? • MODEL Y=TRT • All slopes 0 • H 0: All slopes 0 • (not just equal) • H 1: Arbitrary slopes

PROC GLM; CLASS TRT; MODEL Y = TRT*X; • One dependency in TRT

PROC GLM; CLASS TRT; MODEL Y = TRT*X; • One dependency in TRT

Covariance adjusted means Parameter Estimate INTERCEPT 4. 0123 TRT A 12. 2217 B 10.

Covariance adjusted means Parameter Estimate INTERCEPT 4. 0123 TRT A 12. 2217 B 10. 9158 C 0. 0000 X 0. 8350 B B NOTE: The X'X matrix has been found to be singular. . . • <=

grade b 1 b 2 b study 0 IQ

grade b 1 b 2 b study 0 IQ

grade “Interaction”! IQ study

grade “Interaction”! IQ study

110 100 -14. 300 -13. 00 110 +5. 30 +5. 83 IQ=100 IQ=110

110 100 -14. 300 -13. 00 110 +5. 30 +5. 83 IQ=100 IQ=110