Multiple regression - Matrices



Similar documents
Introduction to Matrix Algebra

Data Mining: Algorithms and Applications Matrix Math Review

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Module 3: Correlation and Covariance

3.2 Matrix Multiplication

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Multivariate Analysis of Variance (MANOVA): I. Theory

FTS Real Time System Project: Portfolio Diversification Note: this project requires use of Excel s Solver

MEASURES OF VARIATION

Simple Regression Theory II 2010 Samuel L. Baker

Exponents and Radicals

CURVE FITTING LEAST SQUARES APPROXIMATION

Data Analysis Tools. Tools for Summarizing Data

Question 2: How do you solve a matrix equation using the matrix inverse?

STATISTICS AND DATA ANALYSIS IN GEOLOGY, 3rd ed. Clarificationof zonationprocedure described onpp

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

DESCRIPTIVE STATISTICS. The purpose of statistics is to condense raw data to make it easier to answer specific questions; test hypotheses.

1 Short Introduction to Time Series

Review Jeopardy. Blue vs. Orange. Review Jeopardy

Dimensionality Reduction: Principal Components Analysis

5.5. Solving linear systems by the elimination method

One-Way Analysis of Variance

How To Understand And Solve Algebraic Equations

Matrix Algebra in R A Minimal Introduction

Here are some examples of combining elements and the operations used:

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Exponents. Learning Objectives 4-1

Mathematics Online Instructional Materials Correlation to the 2009 Algebra I Standards of Learning and Curriculum Framework

Factor Analysis. Chapter 420. Introduction

1 Introduction to Matrices

Factoring Polynomials and Solving Quadratic Equations

The correlation coefficient

COLLEGE ALGEBRA. Paul Dawkins

How To Understand And Solve A Linear Programming Problem

Introduction to Principal Components and FactorAnalysis

$ ( $1) = 40

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

CHAPTER 8 FACTOR EXTRACTION BY MATRIX FACTORING TECHNIQUES. From Exploratory Factor Analysis Ledyard R Tucker and Robert C.

Using row reduction to calculate the inverse and the determinant of a square matrix

Probability Models of Credit Risk

Statistical Functions in Excel

Summation Algebra. x i

Reliability Analysis

Principle Component Analysis and Partial Least Squares: Two Dimension Reduction Techniques for Regression

HOW TO USE YOUR HP 12 C CALCULATOR

CHAPTER 14 ORDINAL MEASURES OF CORRELATION: SPEARMAN'S RHO AND GAMMA

MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2

Introduction to Principal Component Analysis: Stock Market Values

MATH APPLIED MATRIX THEORY

Solving Systems of Linear Equations

The right edge of the box is the third quartile, Q 3, which is the median of the data values above the median. Maximum Median

1/27/2013. PSY 512: Advanced Statistics for Psychological and Behavioral Research 2

Similar matrices and Jordan form

Exercise 1.12 (Pg )

One-Way ANOVA using SPSS SPSS ANOVA procedures found in the Compare Means analyses. Specifically, we demonstrate

Unit 18 Determinants

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

18.06 Problem Set 4 Solution Due Wednesday, 11 March 2009 at 4 pm in Total: 175 points.

Factor Analysis. Advanced Financial Accounting II Åbo Akademi School of Business

Mathematics Pre-Test Sample Questions A. { 11, 7} B. { 7,0,7} C. { 7, 7} D. { 11, 11}

FACTORING QUADRATICS and 8.1.2

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = i.

Factoring Polynomials

Math 312 Homework 1 Solutions

Operation Count; Numerical Linear Algebra

The Characteristic Polynomial

Math Quizzes Winter 2009

The Big Picture. Correlation. Scatter Plots. Data

Introduction; Descriptive & Univariate Statistics

Factor Analysis. Principal components factor analysis. Use of extracted factors in multivariate dependency models

6. Cholesky factorization

Recall this chart that showed how most of our course would be organized:

MBA 611 STATISTICS AND QUANTITATIVE METHODS

So, using the new notation, P X,Y (0,1) =.08 This is the value which the joint probability function for X and Y takes when X=0 and Y=1.

Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

Measures of Central Tendency and Variability: Summarizing your Data for Others

1.6 The Order of Operations

Integers are positive and negative whole numbers, that is they are; {... 3, 2, 1,0,1,2,3...}. The dots mean they continue in that pattern.

Word Problems Involving Systems of Linear Equations

2.2/2.3 - Solving Systems of Linear Equations

Unit 31 A Hypothesis Test about Correlation and Slope in a Simple Linear Regression

Solving Systems of Linear Equations Using Matrices

Multivariate Analysis (Slides 13)

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Algebra I Vocabulary Cards

Vectors 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

October 3rd, Linear Algebra & Properties of the Covariance Matrix

Multivariate Analysis of Variance (MANOVA)

MULTIPLE REGRESSION WITH CATEGORICAL DATA

Metric Multidimensional Scaling (MDS): Analyzing Distance Matrices

Risk Decomposition of Investment Portfolios. Dan dibartolomeo Northfield Webinar January 2014

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

c 2008 Je rey A. Miron We have described the constraints that a consumer faces, i.e., discussed the budget constraint.

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Section 1.5 Linear Models

1 Teaching notes on GMM 1.

Transcription:

Multiple regression - Matrices This handout will present various matrices which are substantively interesting and/or provide useful means of summarizing the data for analytical purposes. As we will see, means, standard deviations, and correlations are substantively interesting; other matrices are primarily useful for computational purposes. Let X 0 = 1 for all cases. Let A and B be any two variables. We then define the following: (NOTE: To simplify the notation, when subscripting the X variables, we will refer to them only by number, e.g. s 12 = sample covariance of X 1 and X 2.) Note that each of these are symmetric, e.g. M 1Y = M Y1, s 12 = s 21. We will discuss each of these in turn: 1. M AB. Let us compute the values of M for the variables X 0, X 1, X 2, Y. M AB Formula: (A * B) Value M 00 (X 0 * X 0 ) = 1 = N 20.0 M 01 = M 10 (X 0 * X 1 ) = X 1 241.0 M 02 = M 20 (X 0 * X 2 ) = X 2 253.0 M 0Y = M Y0 (X 0 * Y) = Y 488.3 M 11 (X 1 * X 1 ) = X 1 ² 3,285.0 M 12 = M 21 (X 1 * X 2 ) = X 1 X 2 2,999.0 M 1Y = M Y1 (X 1 * Y) = X 1 Y 6,588.3 M 22 (X 2 * X 2 ) = X 2 ² 3,767.0 M 2Y = M Y2 (X 2 * Y) = X 2 Y 6448.9 M YY (Y * Y) = Y² 13,742.3 Hence, to get the different possible values of M AB, we multiply every variable (including X 0 ) by every variable. These numbers ought to look familiar. M 00 = N = 20; The other numbers are the Multiple regression - Matrices - Page 1

totals we got when we first presented the data. As we have seen, the different values of M AB contain all the information we need for calculating regression models. It is often convenient to present the values of M AB in matrix form. We can write X 0 X 1 X 2 Y X 0 20.0 X 1 241.0 3,285.0 X 2 253.0 2,999.0 3,767.0 Y 488.3 6,588.3 6,448.9 13,742.27 Additional comments: a. For symmetric matrices, it is common to not present either the elements above or the elements below the diagonal, since they are redundant. b. The Matrix M/N (i.e. the M matrix with all elements divided by the sample size N) is sometimes called the augmented moment matrix. If you exclude the rows and columns for X 0 from the M matrix, then M/N is called the matrix of moments about the origin. The reason for this name may be clearer after we look at the covariance matrix. 2. XP AB. XP AB gives the cross-product deviations from the means (which we have also referred to as SST and SP). In our current example: XP AB Formula: (A - A )(B - B ) Value XP 11 (X 1 - X 1 ) * (X 1 - X 1 ) = SST 1 380.95 XP 12 = XP 21 (X 1 - X 1 )(X 2 - X 2 ) = SP 12-49.65 XP 1Y = XP Y1 (X 1 - x 1 )(Y - Y ) = SP Y1 704.29 XP 22 (X 2 - X 2 )(X 2 - X 2 ) = SST 2 566.55 XP 2Y = XP Y2 (X 2 - X 2 )(Y - Y ) = SP Y2 271.91 XP YY (Y - Y )(Y - Y ) = SST Y 1820.43 Multiple regression - Matrices - Page 2

(We don't bother with X 0, since any cross-products involving it would equal 0). It is often convenient to present the XP AB values in Matrix form. We can write X 1 X 2 Y X 1 380.95 X 2-49.65 566.55 Y 704.29 271.91 1820.43 Incidentally, Hayes labels this as the SSCP matrix, for sums of squares and cross-products. 3. s AB. s AB is the covariance of variables A and B. When A = B, s AA = the sample variance of A. s AA can of course also be written as s A ². s AB = XP AB /(N - 1). In matrix form, we can write X 1 X 2 Y X 1 20.05 X 2-2.61 29.82 Y 37.07 14.31 95.81 Additional comments: a. The s matrix is typically called the covariance matrix or the variance/covariance matrix. It is also sometimes called the Matrix of Moments about the mean, because the mean is subtracted from each variable. Multiple regression - Matrices - Page 3

b. The sample covariance gives us an indication of the association between two variables. If the covariance is zero, then there is no association. If the covariance is positive, that means that above-average values on one variable tend to be paired with above-average values on the other variable. The square roots of the diagonal elements of the s matrix (i.e. the standard deviations) give an idea of how closely clustered cases are about the mean. c. The values for the covariances are dependent on the metrics of the variables. For example, income here is measured in thousands of dollars; if instead, income were measured in dollars, s YY would be 1 million times larger, and all the other elements of the s matrix would increase by a factor of 1,000. d. Because the values of the s matrix are so dependent on the metrics used, it is difficult to tell via just "eyeballing" how strong the association between variables is. For example, does the fact that s Y1 = 37.07 mean that there is a very strong link between education and income, or is it only a weak association? This difficulty in interpretation is one of the reasons that correlations between variables (discussed next) are often looked at. 4. r AB. r AB is the correlation between variables A and B. As noted above, r AB = s AB /s A s B. There are several properties about correlations worth noting: a. r can range from -1 to 1. The larger the absolute value of r is, the stronger the association is between the two variables. Hence, r provides a more intuitive means than s for looking at association. b. the correlation of any variable with itself is 1, e.g. r AA = s AA /s A s A = s A ²/s A ² = 1. c. Another way of thinking of r is that it is the covariance of the standardized variables. Let A' = (A - A )/s A, B' = (B - B )/s B (Note that both A' and B' appear in one of our formulas for r). That is, let A' and B' be the z-score transformations of A and B. As we showed before, any Z score has a mean of zero and a variance of 1. Ergo, Let us now compute the correlations of the variables. Keep in mind that r 11 = r 22 = r YY = 1. r AB Formula: s AB / (s AA s BB ) Value r 12 = r 21-2.61/ (20.05 * 29.82) -.1067 r 1Y = r Y1 37.07/ (20.05 * 95.81).8458 r 2Y = r Y2 14.31/ (29.82 * 95.81).2677 Multiple regression - Matrices - Page 4

In matrix form, we can write this as X 1 X 2 Y X 1 1.00 X 2 -.11 1.00 Y.85.27 1.00 From the correlation matrix, it is clear that education (X 1 ) is much more strongly correlated with income (Y) than is job experience (X 2 ). 5. Alternative formulas. It is very common for computer programs to report the correlations, standard deviations, and means for all the variables, along with the sample size. From this information, you can construct any of the matrices we have just talked about. Example. To illustrate this, let us compute s 11, s Y1, XP 12, M Y2 using only the correlations, means, standard deviations, and sample size. s 11 = r 11 * s 1 * s 1 = 1 * 4.478 * 4.478 = 20.05, s Y1 = r Y1 * s Y * s 1 =.8458 * 9.788 * 4.478 = 37.07, XP 12 = r 12 * s 1 * s 2 * (N - 1) = -.1067 * 4.478 * 5.46 * 19 = -49.57, M Y2 = r Y2 * s y * s 2 * (N - 1) + N Y X 2 =.2677 * 9.788 * 5.46 * 19 + 20 * 24.415 * 12.65 = 6448.82 Multiple regression - Matrices - Page 5

6. Counting rules. Let L = # of X variables + # of Y variables (Not counting X 0 ). In this case, L = 3. Note that A. The M matrix has (L + 1)(L + 2)/2 = 10 unique elements (i.e. diagonal and subdiagonal elements). B. The XP matrix has (L)(L + 1)/2 = 6 unique elements C. The s matrix has (L)(L + 1)/2 = 6 unique elements D. The correlation matrix has (L)(L - 1) = 3 unique (i.e. sub-diagonal) elements E. There are L means (i.e. 3) F. There are L standard deviations (i.e. 3) Note further that, if you know A. The correlations (3 pieces of information), means (3), standard deviations (3), and sample size (1 piece of information), (10 pieces of information altogether), or B. The covariance matrix (6 elements), the means (3), and sample size (1) (10 pieces of information), or C. The XP Matrix (6 elements), means (3), and sample size (1) (10 pieces of information altogether), or D. The M matrix (10 elements) THEN you have all the information you need to work any regression problem. Multiple regression - Matrices - Page 6