ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
[Description] Multiple Regression Matrix Calculations
2
3
Multiple Regression Matrix Calculations Worksheet
4
5
Dataset:decathlon.csv (4 athletes for tractable calculation)
6
Y variable:Points (total decathlon points)
7
X variable:X100m (100 meter dash time)
8
9
Learning Objectives:
10
11
1. Construct the design matrix X with intercept column
12
2. Calculate XᵀX (X transpose times X)
13
3. Calculate XᵀY (X transpose times Y)
14
4. Find (XᵀX)⁻¹ for 2x2 matrix
15
5. Compute β̂ = (XᵀX)⁻¹ XᵀY
16
17
18
Key Formulas:
19
20
Design matrix:X = [1, x₁; 1, x₂; ...]
21
Normal equations:XᵀX × β̂ = XᵀY
22
Solution:β̂ = (XᵀX)⁻¹ XᵀY
23
2x2 inverse:For [[a,b],[c,d]]: inverse = 1/(ad-bc) × [[d,-b],[-c,a]]
24
25
26
Color Guide:
27
28
Given Data (Input)
29
Intermediate Calculations
30
Final Results
31
Correct Answer (✓)
32
Incorrect Answer (✗)
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100