Lec 9 Regression Model by Matrices 25042024 071412pm
Lec 9 Regression Model by Matrices 25042024 071412pm
5 1 1 XT 1 1 1 1
20 1 3 1 3 6 8
40 1 6
65 1 8 XTX 4 18
Y X 18 110
B's=[X X] .[X Y] T -1 T
(MINVERSE(MMULT(TRANSPOSE(B2:C5),B2:C5)),MMULT(TRANSPOSE(B2:C5),A2:A5))}
Sales Adv SUMMARY OUTPUT
Y X
5 1 Regression Statistics
20 3 Multiple R 0.990375
40 6 R Square 0.980843
65 8 Adjusted R 0.971264
Standard E 4.404152
Observatio 4
ANOVA
df SS MS F Significance F
Regression 1 1986.207 1986.207 102.4 0.009625
Residual 2 38.7931 19.39655
Total 3 2025
Coefficients
Standard Error t Stat P-value Lower 95%
Intercept -4.741379 4.288739 -1.105542 0.384118 -23.19433
X 8.275862 0.81783 10.11929 0.009625 4.757022
Significance F
3 2 2,2
4 1 8 12 4
4 6 2
4 3,1 B*C ? 2 3 1
B 2 3,1;1,3=3,3
1
C C*B
2 3 1 1,3 1,3;3,1=1,1
4 1,1 scaler
Matrix Inverese
mns and Columns become Rows
1 2 3 4
3 4 2 1
1 2 0 2 4 9
A 7 3B 6 3 0 2
3,2 1 6 2,4
AB ` 12 8 4 13
3,2;2,4=3,4 18 23 28 69
36 20 4 21
2 1
A 4 6
Inverse of A
A-1 0.75 -0.125
-0.5 0.25
3 6
A 2 4
Inverse of A
A-1 Err:502 Err:502
Err:502 Err:502