Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simple Linear Regression – Matrix Approach

Similar presentations


Presentation on theme: "Simple Linear Regression – Matrix Approach"— Presentation transcript:

1 Simple Linear Regression – Matrix Approach
Recall our example: Hypothesize the relationship, Y = α + βx + ε and calculate the estimate, Attendance, x Amount Bet ($000), Y 117 2.07 128 2.80 122 3.14 119 2.26 131 3.40 135 3.89 125 2.93 120 2.66 130 3.33 127 3.54

2 Matrix Form of the Equation
Define the matrices: Note: the column of 1s in the X matrix is referred to as a “dummy variable” used to allow us to calculate a in the regression equation.

3 General Matrix Form We obtain the least squares estimates (a, b) of (α, β) by solving the matrix equation: for b, or

4 Recall Basic Matrix Operations

5 For Our Example, Step 1: XTX
(note: n=10, Σx = 1254, Σx2 = 157,558) XTX= ,558

6 For Our Example, Step 2: XTY 30.02
XTY= (note: n=10, Σy = 30.02, Σxy = 3791)

7 Inverting Matrices Calculate the determinant.
2 x 2 matrix (M) , D = ad – bc 3 x 3 matrix (Q), Z = a(ek – fh) – b(dk – fg) + c(dh – eg) Calculate the elements of the matrix 2 x 2 matrix (M) ,

8 Inverting Matrices (cont.)
(cont.) Calculate the elements 3 x 3 matrix (Q),

9 For Our Example Step 3: (XTX)-1 D = _______________

10 Our Example Step 4: Determine b = ________________________

11 Your Turn (In-Class / Homework)


Download ppt "Simple Linear Regression – Matrix Approach"

Similar presentations


Ads by Google