Psychology 202b Advanced Psychological Statistics, II January 25, 2011.

Slides:



Advertisements
Similar presentations
Chapter 4 Systems of Linear Equations; Matrices
Advertisements

Chapter 4 Systems of Linear Equations; Matrices
Chapter 6 Eigenvalues and Eigenvectors
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Matrices: Inverse Matrix
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
3_3 An Useful Overview of Matrix Algebra
Psychology 202b Advanced Psychological Statistics, II February 10, 2011.
Linear Transformations
Psychology 202b Advanced Psychological Statistics, II January 18, 2011.
Review of Matrix Algebra
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Basics of regression analysis
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Finding the Inverse of a Matrix
Matrix Approach to Simple Linear Regression KNNL – Chapter 5.
Intro to Matrices Don’t be scared….
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
Matrix Algebra HGEN619 class Heuristic You already know a lot of it Economical and aesthetic Great for statistics.
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Chapter 10 Review: Matrix Algebra
CHAPTER 2 MATRIX. CHAPTER OUTLINE 2.1 Introduction 2.2 Types of Matrices 2.3 Determinants 2.4 The Inverse of a Square Matrix 2.5 Types of Solutions to.
Some matrix stuff.
F UNDAMENTALS OF E NGINEERING A NALYSIS Eng. Hassan S. Migdadi Inverse of Matrix. Gauss-Jordan Elimination Part 1.
Day 1 Eigenvalues and Eigenvectors
Day 1 Eigenvalues and Eigenvectors
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Chapter 2 Systems of Linear Equations and Matrices
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
Chapter 9 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Multiplicative Inverses of Matrices and Matrix Equations.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
10.4 Matrix Algebra 1.Matrix Notation 2.Sum/Difference of 2 matrices 3.Scalar multiple 4.Product of 2 matrices 5.Identity Matrix 6.Inverse of a matrix.
Unit 3: Matrices.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Linear algebra: matrix Eigen-value Problems
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Multivariate Statistics Matrix Algebra I W. M. van der Veld University of Amsterdam.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 07 Chapter 7: Eigenvalues, Eigenvectors.
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
4.5 Matrices, Determinants, Inverseres -Identity matrices -Inverse matrix (intro) -An application -Finding inverse matrices (by hand) -Finding inverse.
Learning Objectives for Section 4.5 Inverse of a Square Matrix
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Chapter 5 More Work with Matrices
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Mathematics Medicine What is meant by a matrix A matrix is a set of numbers arranged in the form of a rectangle and enclosed in curved brackets.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
1 SYSTEM OF LINEAR EQUATIONS BASE OF VECTOR SPACE.
Section 6-2: Matrix Multiplication, Inverses and Determinants There are three basic matrix operations. 1.Matrix Addition 2.Scalar Multiplication 3.Matrix.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Chapter 4 Systems of Linear Equations; Matrices
Matrices Introduction.
Chapter 6 Eigenvalues and Eigenvectors
College Algebra Chapter 6 Matrices and Determinants and Applications
Linear Algebraic Equations and Matrices
ISHIK UNIVERSITY FACULTY OF EDUCATION Mathematics Education Department
Unit 1: Matrices Day 1 Aug. 7th, 2012.
Linear Algebraic Equations and Matrices
Regression.
Matrix Algebra.
RECORD. RECORD Gaussian Elimination: derived system back-substitution.
Unit 3: Matrices
Matrix Algebra.
Chapter 4 Systems of Linear Equations; Matrices
Chapter 4 Systems of Linear Equations; Matrices
Presentation transcript:

Psychology 202b Advanced Psychological Statistics, II January 25, 2011

Overview Continuing discussion of matrices. Matrices in R. The identity matrix. Matrix inversion. Singularity and determinants. Eigenvalues. A taste of why matrices are useful in statistics.

Matrices in R Three ways to create a matrix in R: –cbind() –rbind() –matrix()

The identity matrix The rank of a matrix is the number of linearly independent rows or columns it has. Example: has rank=3. In contrast, has rank=2, because the last row is exactly two times the first row.

The identity matrix (cont.) The identity matrix I of rank k is defined as the k  k diagonal matrix with all diagonal values equal to 1. It is so called because any matrix of rank k that pre- or post-multiplies the identity matrix is equal to itself. That is, AI = A = IA.

Matrix inverses The Inverse of a square matrix A (denoted A -1 ) is the square matrix of the same rank such that A A -1 = A -1 A = I. An easy way to understand the inverse is to think of it as the matrix equivalent of division.

Matrix inverses (cont.) The inverse of a diagonal matrix is simply the diagonal matrix containing the reciprocals of the original diagonal elements. (Illustration in R.)

Matrix inverses (cont.) The inverse of a 2  2 matrix is where a, b, c, and d are the upper left, upper right, lower left, and lower right elements of the matrix.

Matrix inverses (cont.) The inverses of matrices of higher rank are tedious to calculate by hand. Fortunately, R can invert matrices for us. (Digression in R.)

Singularity and determinants That last example produced a strange error message. By describing the system of equations as singular, R is telling us that the matrix cannot be inverted. Note the similarity of this language to terms used in physics: a black hole is nature’s divide-by-zero error.

Singularity and determinants (cont.) One way to determine if a matrix is singular is to examine its determinant. The calculation of a determinant is complicated, and the idea of the determinant is defined in terms of that process. We won’t go there.

Singularity and determinants (cont.) The most common mathematical notation for the determinant of a matrix A is |A|. For us, the determinant will be important because a square matrix is singular if and only if its determinant is zero. (Illustration in R.)

Eigenvalues A scalar value λ is an eigenvalue of a k  k square matrix A if it satisfies |A – λI| = 0, where I is the k  k identity matrix. Each eigenvalue has a corresponding eigenvector x, which satisfies Ax = λx. Eigenvalues will be useful later on because they help us with linear transformations of matrices.

Why do matrices help with statistics? Imagine that you wish to calculate a variance. The defining formula for the sample variance is However, if we must do the calculations by hand, it is useful to know that the numerator is equivalent to

Why do matrices help? (cont.) (Simple illustration on board, followed by Raven example in R.) So with creative use of matrices, a relatively complicated set of operations can be expressed as a single operation.

Another example of matrices helping. For simple linear regression, we estimate a slope by Then we estimate the intercept by

Another example (cont.) In matrix form, this becomes where X is an n  2 matrix with ones in the first column and values of the predictor in the second column.