The General Linear Model. How we re approaching the GLM. What you ll get out of this 8/11/16

Size: px
Start display at page:

Download "The General Linear Model. How we re approaching the GLM. What you ll get out of this 8/11/16"

Transcription

1 8// The General Linear Model Monday, Lecture Jeanette Mumford University of Wisconsin - Madison How we re approaching the GLM Regression for behavioral data Without using matrices Understand least squares Using matrices With more than regressor, you need this What you ll get out of this What is least squares? What is a residual? How do you multiply a matrix and a vector? What are degrees of freedom? How do you obtain the estimates for the GLM using matrix math including the variance

2 Reaction Time (s) 8// Do you remember the equation for a line? Do you remember the equation for a line? y=b+mx Do you remember the equation for a line? RT i + + Age i Age

3 Reaction Time (s) Reaction Time (s) 8// Do you remember the equation for a line? population mean RT i = + Age i Age Do you remember the equation for a line? RT i = + Age i fit isn t perfect, so we must account for error Age The Model For the i th observational unit : The dependent (random) variable : Independent variable (not random), : Model parameters : Random error, how the observation deviates from the population mean

4 8// Fixed: Mean of, ( ) Random: Variability of It follows that the variance of is Fixed: Mean of, ( ) Random: Variability of It follows that the variance of is Fixed: Mean of, ( ) Random: Variability of It follows that the variance of is

5 8// Simple summary mean(y i ) var(y i ) Fitting the Model Reaction Time (s) Q: Which line fits the data best? Age Fitting the Model Reaction Time (s) Minimize the distance between the data and the line (error). Absolute distance? squared distance? Error term Age 5

6 8// Least Squares Minimize squared differences Minimize Least Squares Minimize squared differences Minimize Works out nicely distribution-wise You can use calculus to get the estimates Bias and Variance

7 8// Bias and Variance high bias / low variance low bias / high variance high bias / high variance low bias / low variance Bias and Variance high bias / low variance low bias / high variance high bias / high variance low bias / low variance Bias and Variance high bias / low variance low bias / high variance high bias / high variance low bias / low variance

8 8// Bias and Variance high bias / low variance low bias / high variance high bias / high variance low bias / low variance Property of least squares Gauss Markov Assumptions error has mean things aren t correlated variance is the same for all observations Unbiased and have lowest variance among all unbiased estimators Property of least squares Gauss Markov Assumptions error has mean things aren t correlated variance is the same for all observations Unbiased and have lowest variance among all unbiased estimators 8

9 8// What about the variance? We also need an estimate for Start with the sums of squared error Divide by the appropriate degrees of freedom # of independent pieces of information - # parameters in model What about the variance? We also need an estimate for Start with the sums of squared error Divide by the appropriate degrees of freedom # of independent pieces of information - # parameters in model Take away up to this point We use typically use least squares estimation to estimate the betas in regression Gauss Markov Minimum variance among all unbiased estimators 9

10 8// You don t need to do regression this way Anybody ever hear of using absolute error instead of squared error? Do you know the context?? Anybody ever hear of purposely biasing (!) an estimate in order to reduce variability? Do you know the context? Multiple Linear Regression Add more parameters to the model Time for linear algebra! is a x matrix Matrices Row index Column index

11 8// Matrices Square matrix- Same # of rows and columns Vector- column(row) vector has column(row) Matrices Transpose: or. Swap columns and rows. Element-wise addition and subtraction Matrices Multiplication: Trickier Number of columns of first matrix must match number of rows of second matrix

12 8// Matrices Multiplication Matrices Multiplication x+ Matrices Multiplication x+x=

13 8// Matrices Multiplication x+x= Multiplication Matrices You try it out C A =??

14 8// You try it out B C C A You try it out B C C A B C C A You try it out B C C A

15 8// Matrix Inverse Denoted Only for square matrices Only exists if matrix is full rank All columns (rows) are linearly independent, but I ll spare the details Rank Deficient Matrices *column=column column+column=column Rank Deficient Matrices *column=column column+column=column SPM can handle rank deficiency, if the contrasts are specified properly 5

16 8// Can you find the rank deficiency?? Inverting rectangular matrix If the columns *only* are linearly independent, then is invertible Pseudoinverse: Inverting a rank-deficient matrix I m not going to get into the nitty gritty pinv() in MATLAB does it You *must* be careful if you go this route on your own Could accidentally do something silly, but SPM seems to have built in controls so you don t

17 8// Inverting a rank-deficient matrix Back to linear regression (nx) (nx) (x) (nx) Back to linear regression (nx) (nx) (x) (nx)

18 8// Back to linear regression (nx) (nx) (x) (nx) Back to linear regression (nx) (nx) (x) (nx) Back to linear regression (nx) (nx) (x) (nx) 8

19 8// Viewing the Design Matrix Look at the actual numbers M F age Viewing the Design Matrix Look at in image representation Darker=smaller # M F age Multiple Linear Regression The distribution of Y is a multivariate Normal 9

20 8// Multiple Linear Regression is really easy to derive Multiple Linear Regression is really easy to derive Same as least squares, but much easier to understand and write code for thanks linear algebra! Multiple Linear Regression where N=length(Y) p=length( )

21 8// Multiple Linear Regression where N=length(Y) p=length( ) Or Rank(X) Statistical Properties So the estimate is unbiased But we don t know Take away Matrix algebra makes GLM estimation waaay easier Make sure you re comfortable multiplying a matrix and a vector Handy to know how to estimate the parameters

22 8// Ask me some questions Recall GLM is flexible One Sample T Test Two sample T Test Paired T test ANOVA ANCOVA What do the models look like? Do you know the answers? What is least squares? What is a residual? How do you multiply a matrix and a vector? What are degrees of freedom? How do you obtain the estimates for the GLM using matrix math including the variance

23 8// Let s set up some simple models - sample t- test - sample t- test With contrasts! - sample t- test Y = + Y Y. Y N - sample t- test 5 =. 5 +

24 8// Y Y. - sample t- test 5 =. 5 + Y N MulBply out the right hand side Y Y. - sample t- test 5 = Y N MulBply out the right hand side. 5 + Y Y. - sample t- test 5 = Y N MulBply out the right hand side. 5 +

25 8// But why is it the mean and not something else? But why is it the mean and not something else? Because we re using least squares! I m going to write this out 5

26 8// Two- sample t- test There are at least ways I can think of parameterizing this! Start with the easiest a person is either in group or in group Y i = {sub i in group?} + {sub i in group?} + Two- sample t- test There are at least ways I can think of parameterizing this! Start with the easiest a person is either in group or in group Y i = G i + G i + group indicator variables Two- sample t- test Group Group Y Y Y Y Y 5 Y = 5 apple 5 +

27 8// Two- sample t- test Y Y Y Y Y 5 Y = Two- sample t- test Y Y Y Y Y 5 Y = mean for Group mean for Group Two- sample t- test (another way) Now you do it. Unwrap what this means Y i = + {subject i in Group } +

28 8// Contrasts Contrasts are vectors that pull out what we d like to test Using the two sample t- test from the first example, we might test Is the mean of G larger than? Is the mean of G larger than? Is the mean of G > G? General idea Take your contrast statement and get it to look like something > Figure out the vector, c, such that cb = something Y Y Y Y Y 5 Is group >? = 5 Y We ve already established the first beta represents group s mean c = [, ] pulls out the first beta apple 5 + 8

29 8// Y Y Y Y Y 5 Is group >? = 5 Y We ve already established the second beta represents group s mean c = [, ] pulls out the first beta apple 5 + Is group > group? Y First, get something > group group > c = [, - ] Y Y Y Y Y 5 = 5 apple 5 = apple + Is group > group? Y First, get something > group group > c = [, - ] Y Y Y Y Y 5 = 5 apple 5 = apple + 9

30 8// Is group > group? Y First, get something > group group > c = [, - ] Y Y Y Y Y 5 = 5 apple 5 = apple + Is group > group? Y First, get something > group group > c = [, - ] Y Y Y Y Y 5 = 5 apple 5 = apple + Can you do this for the second setup of the - sample t- test?

31 8// Take away Did you feel preey confident with the last example? Yes = Yay! No = Ask quesbons! That s it! I m guessing we need to at least stretch our legs right now

The General Linear Model. Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison

The General Linear Model. Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison The General Linear Model Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison How we re approaching the GLM Regression for behavioral data Without using matrices Understand least squares

More information

Common models and contrasts. Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison

Common models and contrasts. Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison ommon models and contrasts Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison Let s set up some simple models 1-sample t-test -sample t-test With contrasts! 1-sample t-test Y = 0 + 1-sample

More information

Common models and contrasts. Tuesday, Lecture 2 Jeane5e Mumford University of Wisconsin - Madison

Common models and contrasts. Tuesday, Lecture 2 Jeane5e Mumford University of Wisconsin - Madison ommon models and contrasts Tuesday, Lecture Jeane5e Mumford University of Wisconsin - Madison Let s set up some simple models 1-sample t-test -sample t-test With contrasts! 1-sample t-test Y = 0 + 1-sample

More information

Lecture 10: Powers of Matrices, Difference Equations

Lecture 10: Powers of Matrices, Difference Equations Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

Finding Limits Graphically and Numerically

Finding Limits Graphically and Numerically Finding Limits Graphically and Numerically 1. Welcome to finding limits graphically and numerically. My name is Tuesday Johnson and I m a lecturer at the University of Texas El Paso. 2. With each lecture

More information

Getting Started with Communications Engineering

Getting Started with Communications Engineering 1 Linear algebra is the algebra of linear equations: the term linear being used in the same sense as in linear functions, such as: which is the equation of a straight line. y ax c (0.1) Of course, if we

More information

ES-2 Lecture: More Least-squares Fitting. Spring 2017

ES-2 Lecture: More Least-squares Fitting. Spring 2017 ES-2 Lecture: More Least-squares Fitting Spring 2017 Outline Quick review of least-squares line fitting (also called `linear regression ) How can we find the best-fit line? (Brute-force method is not efficient)

More information

MATH 54 - WORKSHEET 1 MONDAY 6/22

MATH 54 - WORKSHEET 1 MONDAY 6/22 MATH 54 - WORKSHEET 1 MONDAY 6/22 Row Operations: (1 (Replacement Add a multiple of one row to another row. (2 (Interchange Swap two rows. (3 (Scaling Multiply an entire row by a nonzero constant. A matrix

More information

22A-2 SUMMER 2014 LECTURE 5

22A-2 SUMMER 2014 LECTURE 5 A- SUMMER 0 LECTURE 5 NATHANIEL GALLUP Agenda Elimination to the identity matrix Inverse matrices LU factorization Elimination to the identity matrix Previously, we have used elimination to get a system

More information

Name Solutions Linear Algebra; Test 3. Throughout the test simplify all answers except where stated otherwise.

Name Solutions Linear Algebra; Test 3. Throughout the test simplify all answers except where stated otherwise. Name Solutions Linear Algebra; Test 3 Throughout the test simplify all answers except where stated otherwise. 1) Find the following: (10 points) ( ) Or note that so the rows are linearly independent, so

More information

Numerical Methods Lecture 2 Simultaneous Equations

Numerical Methods Lecture 2 Simultaneous Equations Numerical Methods Lecture 2 Simultaneous Equations Topics: matrix operations solving systems of equations pages 58-62 are a repeat of matrix notes. New material begins on page 63. Matrix operations: Mathcad

More information

Numerical Methods Lecture 2 Simultaneous Equations

Numerical Methods Lecture 2 Simultaneous Equations CGN 42 - Computer Methods Numerical Methods Lecture 2 Simultaneous Equations Topics: matrix operations solving systems of equations Matrix operations: Adding / subtracting Transpose Multiplication Adding

More information

Lesson 21 Not So Dramatic Quadratics

Lesson 21 Not So Dramatic Quadratics STUDENT MANUAL ALGEBRA II / LESSON 21 Lesson 21 Not So Dramatic Quadratics Quadratic equations are probably one of the most popular types of equations that you ll see in algebra. A quadratic equation has

More information

Basic Linear Algebra in MATLAB

Basic Linear Algebra in MATLAB Basic Linear Algebra in MATLAB 9.29 Optional Lecture 2 In the last optional lecture we learned the the basic type in MATLAB is a matrix of double precision floating point numbers. You learned a number

More information

Mathematics for Intelligent Systems Lecture 5 Homework Solutions

Mathematics for Intelligent Systems Lecture 5 Homework Solutions Mathematics for Intelligent Systems Lecture 5 Homework Solutions Advanced Calculus I: Derivatives and local geometry) Nathan Ratliff Nov 25, 204 Problem : Gradient and Hessian Calculations We ve seen that

More information

Lecture 9: Elementary Matrices

Lecture 9: Elementary Matrices Lecture 9: Elementary Matrices Review of Row Reduced Echelon Form Consider the matrix A and the vector b defined as follows: 1 2 1 A b 3 8 5 A common technique to solve linear equations of the form Ax

More information

Chapter 2 Notes, Linear Algebra 5e Lay

Chapter 2 Notes, Linear Algebra 5e Lay Contents.1 Operations with Matrices..................................1.1 Addition and Subtraction.............................1. Multiplication by a scalar............................ 3.1.3 Multiplication

More information

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math. Regression, part II I. What does it all mean? A) Notice that so far all we ve done is math. 1) One can calculate the Least Squares Regression Line for anything, regardless of any assumptions. 2) But, if

More information

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2 Final Review Sheet The final will cover Sections Chapters 1,2,3 and 4, as well as sections 5.1-5.4, 6.1-6.2 and 7.1-7.3 from chapters 5,6 and 7. This is essentially all material covered this term. Watch

More information

5.9 Representations of Functions as a Power Series

5.9 Representations of Functions as a Power Series 5.9 Representations of Functions as a Power Series Example 5.58. The following geometric series x n + x + x 2 + x 3 + x 4 +... will converge when < x

More information

Appendix A: Review of the General Linear Model

Appendix A: Review of the General Linear Model Appendix A: Review of the General Linear Model The generallinear modelis an important toolin many fmri data analyses. As the name general suggests, this model can be used for many different types of analyses,

More information

Eigenvalues and eigenvectors

Eigenvalues and eigenvectors Roberto s Notes on Linear Algebra Chapter 0: Eigenvalues and diagonalization Section Eigenvalues and eigenvectors What you need to know already: Basic properties of linear transformations. Linear systems

More information

Confidence intervals

Confidence intervals Confidence intervals We now want to take what we ve learned about sampling distributions and standard errors and construct confidence intervals. What are confidence intervals? Simply an interval for which

More information

base 2 4 The EXPONENT tells you how many times to write the base as a factor. Evaluate the following expressions in standard notation.

base 2 4 The EXPONENT tells you how many times to write the base as a factor. Evaluate the following expressions in standard notation. EXPONENTIALS Exponential is a number written with an exponent. The rules for exponents make computing with very large or very small numbers easier. Students will come across exponentials in geometric sequences

More information

Week 3: Linear Regression

Week 3: Linear Regression Week 3: Linear Regression Instructor: Sergey Levine Recap In the previous lecture we saw how linear regression can solve the following problem: given a dataset D = {(x, y ),..., (x N, y N )}, learn to

More information

To factor an expression means to write it as a product of factors instead of a sum of terms. The expression 3x

To factor an expression means to write it as a product of factors instead of a sum of terms. The expression 3x Factoring trinomials In general, we are factoring ax + bx + c where a, b, and c are real numbers. To factor an expression means to write it as a product of factors instead of a sum of terms. The expression

More information

5.2 Infinite Series Brian E. Veitch

5.2 Infinite Series Brian E. Veitch 5. Infinite Series Since many quantities show up that cannot be computed exactly, we need some way of representing it (or approximating it). One way is to sum an infinite series. Recall that a n is the

More information

Physics 6303 Lecture 3 August 27, 2018

Physics 6303 Lecture 3 August 27, 2018 Physics 6303 Lecture 3 August 27, 208 LAST TIME: Vector operators, divergence, curl, examples of line integrals and surface integrals, divergence theorem, Stokes theorem, index notation, Kronecker delta,

More information

6: Polynomials and Polynomial Functions

6: Polynomials and Polynomial Functions 6: Polynomials and Polynomial Functions 6-1: Polynomial Functions Okay you know what a variable is A term is a product of constants and powers of variables (for example: x ; 5xy ) For now, let's restrict

More information

CS 124 Math Review Section January 29, 2018

CS 124 Math Review Section January 29, 2018 CS 124 Math Review Section CS 124 is more math intensive than most of the introductory courses in the department. You re going to need to be able to do two things: 1. Perform some clever calculations to

More information

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.] Math 43 Review Notes [Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty Dot Product If v (v, v, v 3 and w (w, w, w 3, then the

More information

MATH 310, REVIEW SHEET

MATH 310, REVIEW SHEET MATH 310, REVIEW SHEET These notes are a summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive, so please

More information

Review Packet 1 B 11 B 12 B 13 B = B 21 B 22 B 23 B 31 B 32 B 33 B 41 B 42 B 43

Review Packet 1 B 11 B 12 B 13 B = B 21 B 22 B 23 B 31 B 32 B 33 B 41 B 42 B 43 Review Packet. For each of the following, write the vector or matrix that is specified: a. e 3 R 4 b. D = diag{, 3, } c. e R 3 d. I. For each of the following matrices and vectors, give their dimension.

More information

MATH 310, REVIEW SHEET 2

MATH 310, REVIEW SHEET 2 MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,

More information

Honors Advanced Mathematics Determinants page 1

Honors Advanced Mathematics Determinants page 1 Determinants page 1 Determinants For every square matrix A, there is a number called the determinant of the matrix, denoted as det(a) or A. Sometimes the bars are written just around the numbers of the

More information

Regression, Part I. - In correlation, it would be irrelevant if we changed the axes on our graph.

Regression, Part I. - In correlation, it would be irrelevant if we changed the axes on our graph. Regression, Part I I. Difference from correlation. II. Basic idea: A) Correlation describes the relationship between two variables, where neither is independent or a predictor. - In correlation, it would

More information

A Re-Introduction to General Linear Models (GLM)

A Re-Introduction to General Linear Models (GLM) A Re-Introduction to General Linear Models (GLM) Today s Class: You do know the GLM Estimation (where the numbers in the output come from): From least squares to restricted maximum likelihood (REML) Reviewing

More information

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011 Math 31 Lesson Plan Day 5: Intro to Groups Elizabeth Gillaspy September 28, 2011 Supplies needed: Sign in sheet Goals for students: Students will: Improve the clarity of their proof-writing. Gain confidence

More information

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Module - 3 Lecture - 10 First Order Linear Equations (Refer Slide Time: 00:33) Welcome

More information

2. l = 7 ft w = 4 ft h = 2.8 ft V = Find the Area of a trapezoid when the bases and height are given. Formula is A = B = 21 b = 11 h = 3 A=

2. l = 7 ft w = 4 ft h = 2.8 ft V = Find the Area of a trapezoid when the bases and height are given. Formula is A = B = 21 b = 11 h = 3 A= 95 Section.1 Exercises Part A Find the Volume of a rectangular solid when the width, height and length are given. Formula is V=lwh 1. l = 4 in w = 2.5 in h = in V = 2. l = 7 ft w = 4 ft h = 2.8 ft V =.

More information

The General Linear Model in Functional MRI

The General Linear Model in Functional MRI The General Linear Model in Functional MRI Henrik BW Larsson Functional Imaging Unit, Glostrup Hospital University of Copenhagen Part I 1 2 Preface The General Linear Model (GLM) or multiple regression

More information

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES ENGINEERING MATH 1 Fall 2009 VECTOR SPACES A vector space, more specifically, a real vector space (as opposed to a complex one or some even stranger ones) is any set that is closed under an operation of

More information

Gradient. x y x h = x 2 + 2h x + h 2 GRADIENTS BY FORMULA. GRADIENT AT THE POINT (x, y)

Gradient. x y x h = x 2 + 2h x + h 2 GRADIENTS BY FORMULA. GRADIENT AT THE POINT (x, y) GRADIENTS BY FORMULA GRADIENT AT THE POINT (x, y) Now let s see about getting a formula for the gradient, given that the formula for y is y x. Start at the point A (x, y), where y x. Increase the x coordinate

More information

Chapter 4. Solving Systems of Equations. Chapter 4

Chapter 4. Solving Systems of Equations. Chapter 4 Solving Systems of Equations 3 Scenarios for Solutions There are three general situations we may find ourselves in when attempting to solve systems of equations: 1 The system could have one unique solution.

More information

[y i α βx i ] 2 (2) Q = i=1

[y i α βx i ] 2 (2) Q = i=1 Least squares fits This section has no probability in it. There are no random variables. We are given n points (x i, y i ) and want to find the equation of the line that best fits them. We take the equation

More information

Conceptual Explanations: Simultaneous Equations Distance, rate, and time

Conceptual Explanations: Simultaneous Equations Distance, rate, and time Conceptual Explanations: Simultaneous Equations Distance, rate, and time If you travel 30 miles per hour for 4 hours, how far do you go? A little common sense will tell you that the answer is 120 miles.

More information

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions Math 308 Midterm Answers and Comments July 18, 2011 Part A. Short answer questions (1) Compute the determinant of the matrix a 3 3 1 1 2. 1 a 3 The determinant is 2a 2 12. Comments: Everyone seemed to

More information

Algebra & Trig Review

Algebra & Trig Review Algebra & Trig Review 1 Algebra & Trig Review This review was originally written for my Calculus I class, but it should be accessible to anyone needing a review in some basic algebra and trig topics. The

More information

Dot Products, Transposes, and Orthogonal Projections

Dot Products, Transposes, and Orthogonal Projections Dot Products, Transposes, and Orthogonal Projections David Jekel November 13, 2015 Properties of Dot Products Recall that the dot product or standard inner product on R n is given by x y = x 1 y 1 + +

More information

Usually, when we first formulate a problem in mathematics, we use the most familiar

Usually, when we first formulate a problem in mathematics, we use the most familiar Change of basis Usually, when we first formulate a problem in mathematics, we use the most familiar coordinates. In R, this means using the Cartesian coordinates x, y, and z. In vector terms, this is equivalent

More information

Math 308 Discussion Problems #4 Chapter 4 (after 4.3)

Math 308 Discussion Problems #4 Chapter 4 (after 4.3) Math 38 Discussion Problems #4 Chapter 4 (after 4.3) () (after 4.) Let S be a plane in R 3 passing through the origin, so that S is a two-dimensional subspace of R 3. Say that a linear transformation T

More information

Lecture 2: Linear regression

Lecture 2: Linear regression Lecture 2: Linear regression Roger Grosse 1 Introduction Let s ump right in and look at our first machine learning algorithm, linear regression. In regression, we are interested in predicting a scalar-valued

More information

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 6

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 6 EECS 16A Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 6 6.1 Introduction: Matrix Inversion In the last note, we considered a system of pumps and reservoirs where the water in

More information

Lecture 4: Multivariate Regression, Part 2

Lecture 4: Multivariate Regression, Part 2 Lecture 4: Multivariate Regression, Part 2 Gauss-Markov Assumptions 1) Linear in Parameters: Y X X X i 0 1 1 2 2 k k 2) Random Sampling: we have a random sample from the population that follows the above

More information

Toss 1. Fig.1. 2 Heads 2 Tails Heads/Tails (H, H) (T, T) (H, T) Fig.2

Toss 1. Fig.1. 2 Heads 2 Tails Heads/Tails (H, H) (T, T) (H, T) Fig.2 1 Basic Probabilities The probabilities that we ll be learning about build from the set theory that we learned last class, only this time, the sets are specifically sets of events. What are events? Roughly,

More information

Lecture 11: Linear Regression

Lecture 11: Linear Regression Lecture 11: Linear Regression Background Suppose we have an independent variable x (time for example). And, we have some other variable y, and we want to ask how the variable y depends on x (maybe y are

More information

Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras

Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras Module - 4.3 Lecture - 24 Matrix Analysis of Structures with Axial Elements (Refer

More information

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1 1 Rows first, columns second. Remember that. R then C. 1 A matrix is a set of real or complex numbers arranged in a rectangular array. They can be any size and shape (provided they are rectangular). A

More information

STAT 350: Geometry of Least Squares

STAT 350: Geometry of Least Squares The Geometry of Least Squares Mathematical Basics Inner / dot product: a and b column vectors a b = a T b = a i b i a b a T b = 0 Matrix Product: A is r s B is s t (AB) rt = s A rs B st Partitioned Matrices

More information

Sec. 1 Simplifying Rational Expressions: +

Sec. 1 Simplifying Rational Expressions: + Chapter 9 Rational Epressions Sec. Simplifying Rational Epressions: + The procedure used to add and subtract rational epressions in algebra is the same used in adding and subtracting fractions in 5 th

More information

Computationally, diagonal matrices are the easiest to work with. With this idea in mind, we introduce similarity:

Computationally, diagonal matrices are the easiest to work with. With this idea in mind, we introduce similarity: Diagonalization We have seen that diagonal and triangular matrices are much easier to work with than are most matrices For example, determinants and eigenvalues are easy to compute, and multiplication

More information

Algebra 8.6 Simple Equations

Algebra 8.6 Simple Equations Algebra 8.6 Simple Equations 1. Introduction Let s talk about the truth: 2 = 2 This is a true statement What else can we say about 2 that is true? Eample 1 2 = 2 1+ 1= 2 2 1= 2 4 1 = 2 2 4 2 = 2 4 = 4

More information

Algebra Year 10. Language

Algebra Year 10. Language Algebra Year 10 Introduction In Algebra we do Maths with numbers, but some of those numbers are not known. They are represented with letters, and called unknowns, variables or, most formally, literals.

More information

MAT 1302B Mathematical Methods II

MAT 1302B Mathematical Methods II MAT 1302B Mathematical Methods II Alistair Savage Mathematics and Statistics University of Ottawa Winter 2015 Lecture 19 Alistair Savage (uottawa) MAT 1302B Mathematical Methods II Winter 2015 Lecture

More information

Sometimes the domains X and Z will be the same, so this might be written:

Sometimes the domains X and Z will be the same, so this might be written: II. MULTIVARIATE CALCULUS The first lecture covered functions where a single input goes in, and a single output comes out. Most economic applications aren t so simple. In most cases, a number of variables

More information

Lecture 13: Simple Linear Regression in Matrix Format

Lecture 13: Simple Linear Regression in Matrix Format See updates and corrections at http://www.stat.cmu.edu/~cshalizi/mreg/ Lecture 13: Simple Linear Regression in Matrix Format 36-401, Section B, Fall 2015 13 October 2015 Contents 1 Least Squares in Matrix

More information

Introduction to Algebra: The First Week

Introduction to Algebra: The First Week Introduction to Algebra: The First Week Background: According to the thermostat on the wall, the temperature in the classroom right now is 72 degrees Fahrenheit. I want to write to my friend in Europe,

More information

REVIEW FOR EXAM II. The exam covers sections , the part of 3.7 on Markov chains, and

REVIEW FOR EXAM II. The exam covers sections , the part of 3.7 on Markov chains, and REVIEW FOR EXAM II The exam covers sections 3.4 3.6, the part of 3.7 on Markov chains, and 4.1 4.3. 1. The LU factorization: An n n matrix A has an LU factorization if A = LU, where L is lower triangular

More information

Lecture 1 Systems of Linear Equations and Matrices

Lecture 1 Systems of Linear Equations and Matrices Lecture 1 Systems of Linear Equations and Matrices Math 19620 Outline of Course Linear Equations and Matrices Linear Transformations, Inverses Bases, Linear Independence, Subspaces Abstract Vector Spaces

More information

Roberto s Notes on Linear Algebra Chapter 9: Orthogonality Section 2. Orthogonal matrices

Roberto s Notes on Linear Algebra Chapter 9: Orthogonality Section 2. Orthogonal matrices Roberto s Notes on Linear Algebra Chapter 9: Orthogonality Section 2 Orthogonal matrices What you need to know already: What orthogonal and orthonormal bases for subspaces are. What you can learn here:

More information

Squaring and Unsquaring

Squaring and Unsquaring PROBLEM STRINGS LESSON 8.1 Squaring and Unsquaring At a Glance (6 6)* ( 6 6)* (1 1)* ( 1 1)* = 64 17 = 64 + 15 = 64 ( + 3) = 49 ( 7) = 5 ( + ) + 1= 8 *optional problems Objectives The goal of this string

More information

A Re-Introduction to General Linear Models

A Re-Introduction to General Linear Models A Re-Introduction to General Linear Models Today s Class: Big picture overview Why we are using restricted maximum likelihood within MIXED instead of least squares within GLM Linear model interpretation

More information

MAT1302F Mathematical Methods II Lecture 19

MAT1302F Mathematical Methods II Lecture 19 MAT302F Mathematical Methods II Lecture 9 Aaron Christie 2 April 205 Eigenvectors, Eigenvalues, and Diagonalization Now that the basic theory of eigenvalues and eigenvectors is in place most importantly

More information

A Primer on Statistical Inference using Maximum Likelihood

A Primer on Statistical Inference using Maximum Likelihood A Primer on Statistical Inference using Maximum Likelihood November 3, 2017 1 Inference via Maximum Likelihood Statistical inference is the process of using observed data to estimate features of the population.

More information

Pre-calculus is the stepping stone for Calculus. It s the final hurdle after all those years of

Pre-calculus is the stepping stone for Calculus. It s the final hurdle after all those years of Chapter 1 Beginning at the Very Beginning: Pre-Pre-Calculus In This Chapter Brushing up on order of operations Solving equalities Graphing equalities and inequalities Finding distance, midpoint, and slope

More information

Lectures 5 & 6: Hypothesis Testing

Lectures 5 & 6: Hypothesis Testing Lectures 5 & 6: Hypothesis Testing in which you learn to apply the concept of statistical significance to OLS estimates, learn the concept of t values, how to use them in regression work and come across

More information

Math 101: Course Summary

Math 101: Course Summary Math 101: Course Summary Rich Schwartz August 22, 2009 General Information: Math 101 is a first course in real analysis. The main purpose of this class is to introduce real analysis, and a secondary purpose

More information

Algebra Review. Finding Zeros (Roots) of Quadratics, Cubics, and Quartics. Kasten, Algebra 2. Algebra Review

Algebra Review. Finding Zeros (Roots) of Quadratics, Cubics, and Quartics. Kasten, Algebra 2. Algebra Review Kasten, Algebra 2 Finding Zeros (Roots) of Quadratics, Cubics, and Quartics A zero of a polynomial equation is the value of the independent variable (typically x) that, when plugged-in to the equation,

More information

Rational Expressions & Equations

Rational Expressions & Equations Chapter 9 Rational Epressions & Equations Sec. 1 Simplifying Rational Epressions We simply rational epressions the same way we simplified fractions. When we first began to simplify fractions, we factored

More information

Lecture 18: Simple Linear Regression

Lecture 18: Simple Linear Regression Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength

More information

Next is material on matrix rank. Please see the handout

Next is material on matrix rank. Please see the handout B90.330 / C.005 NOTES for Wednesday 0.APR.7 Suppose that the model is β + ε, but ε does not have the desired variance matrix. Say that ε is normal, but Var(ε) σ W. The form of W is W w 0 0 0 0 0 0 w 0

More information

Section 4.5. Matrix Inverses

Section 4.5. Matrix Inverses Section 4.5 Matrix Inverses The Definition of Inverse Recall: The multiplicative inverse (or reciprocal) of a nonzero number a is the number b such that ab = 1. We define the inverse of a matrix in almost

More information

Image Registration Lecture 2: Vectors and Matrices

Image Registration Lecture 2: Vectors and Matrices Image Registration Lecture 2: Vectors and Matrices Prof. Charlene Tsai Lecture Overview Vectors Matrices Basics Orthogonal matrices Singular Value Decomposition (SVD) 2 1 Preliminary Comments Some of this

More information

TDA231. Logistic regression

TDA231. Logistic regression TDA231 Devdatt Dubhashi dubhashi@chalmers.se Dept. of Computer Science and Engg. Chalmers University February 19, 2016 Some data 5 x2 0 5 5 0 5 x 1 In the Bayes classifier, we built a model of each class

More information

Lesson 3-2: Solving Linear Systems Algebraically

Lesson 3-2: Solving Linear Systems Algebraically Yesterday we took our first look at solving a linear system. We learned that a linear system is two or more linear equations taken at the same time. Their solution is the point that all the lines have

More information

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers Faculty of Mathematics Waterloo, Ontario N2L G Centre for Education in Mathematics and Computing Introduction Grades 7 & 8, Math Circles 0//2 October, 207 Series & Polygonal Numbers Mathematicians are

More information

Continuity and One-Sided Limits

Continuity and One-Sided Limits Continuity and One-Sided Limits 1. Welcome to continuity and one-sided limits. My name is Tuesday Johnson and I m a lecturer at the University of Texas El Paso. 2. With each lecture I present, I will start

More information

1 Review of the dot product

1 Review of the dot product Any typographical or other corrections about these notes are welcome. Review of the dot product The dot product on R n is an operation that takes two vectors and returns a number. It is defined by n u

More information

Ratios, Proportions, Unit Conversions, and the Factor-Label Method

Ratios, Proportions, Unit Conversions, and the Factor-Label Method Ratios, Proportions, Unit Conversions, and the Factor-Label Method Math 0, Littlefield I don t know why, but presentations about ratios and proportions are often confused and fragmented. The one in your

More information

PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper)

PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper) PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper) In class, we saw this graph, with each node representing people who are following each other on Twitter: Our

More information

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3 Answers in blue. If you have questions or spot an error, let me know. 3 4. Find all matrices that commute with A =. 4 3 a b If we set B = and set AB = BA, we see that 3a + 4b = 3a 4c, 4a + 3b = 3b 4d,

More information

17 Neural Networks NEURAL NETWORKS. x XOR 1. x Jonathan Richard Shewchuk

17 Neural Networks NEURAL NETWORKS. x XOR 1. x Jonathan Richard Shewchuk 94 Jonathan Richard Shewchuk 7 Neural Networks NEURAL NETWORKS Can do both classification & regression. [They tie together several ideas from the course: perceptrons, logistic regression, ensembles of

More information

Linear Algebra Review Part I: Geometry

Linear Algebra Review Part I: Geometry Linear Algebra Review Part I: Geometry Edwin Olson University of Michigan The Three-Day Plan Geometry of Linear Algebra Vectors, matrices, basic operations, lines, planes, homogeneous coordinates, transformations

More information

5.6 Solving Equations Using Both the Addition and Multiplication Properties of Equality

5.6 Solving Equations Using Both the Addition and Multiplication Properties of Equality 5.6 Solving Equations Using Both the Addition and Multiplication Properties of Equality Now that we have studied the Addition Property of Equality and the Multiplication Property of Equality, we can solve

More information

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2 Induction 0-8-08 Induction is used to prove a sequence of statements P(), P(), P(3),... There may be finitely many statements, but often there are infinitely many. For example, consider the statement ++3+

More information

LECTURE 15: SIMPLE LINEAR REGRESSION I

LECTURE 15: SIMPLE LINEAR REGRESSION I David Youngberg BSAD 20 Montgomery College LECTURE 5: SIMPLE LINEAR REGRESSION I I. From Correlation to Regression a. Recall last class when we discussed two basic types of correlation (positive and negative).

More information

The Haar Wavelet Transform: Compression and Reconstruction

The Haar Wavelet Transform: Compression and Reconstruction and Reconstruction December 13, 2006 Have you ever looked at an image on your computer? Of course you have. Images today aren t just stored on rolls of film. Most images today are stored or compressed

More information

Overview. Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland

Overview. Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland Overview Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland Confidence Intervals When a random variable lies in an interval a X b with a specified

More information