Multiple Linear Regression – Problem & Solution
Multiple Linear Regression explains the relationship between one dependent variable (Y) and two or more independent variables (X₁, X₂, …).
The general form:
Y=a+b1X1+b2X2
Where:
🔢 Example Problem (Two Independent Variables)
🔹 Question
Fit the regression equation:
Y=a+b1X1+b2X2
Given data:
✅ Step 1: Model
Y=a+b1X1+b2X2
We use Normal Equations:
∑Y=na+b1∑X1+b2∑X2
∑X1Y=a∑X1+b1∑X12+b2∑X1X2
∑X2Y=a∑X2+b1∑X1X2+b2∑X22
✅ Step 2: Calculate Required Sums
First prepare working table:
| X₁ | X₂ | Y | X₁² | X₂² | X₁X₂ | X₁Y | X₂Y |
|---|
| 1 | 2 | 4 | 1 | 4 | 2 | 4 | 8 |
| 2 | 1 | 3 | 4 | 1 | 2 | 6 | 3 |
| 3 | 4 | 8 | 9 | 16 | 12 | 24 | 32 |
| 4 | 3 | 7 | 16 | 9 | 12 | 28 | 21 |
Now totals:
∑X1=10
∑X2=10
∑Y=22
∑X12=30
∑X22=30
∑X1X2=28
∑X1Y=62
∑X2Y=64
n=4
✅ Step 3: Form Normal Equations
22=4a+10b1+10b2
62=10a+30b1+28b2
64=10a+28b1+30b2
✅ Step 4: Solve Equations
From (2) − (3):
62−64=(30b1−28b1)+(28b2−30b2)
−2=2b1−2b2
b1−b2=−1
b1=b2−1
Substitute into equation (1):
22=4a+10(b2−1)+10b2
22=4a+10b2−10+10b2
22=4a+20b2−10
32=4a+20b2
8=a+5b2
a=8−5b2
Substitute into equation (2):
62=10(8−5b2)+30(b2−1)+28b2
62=80−50b2+30b2−30+28b2
62=50+8b2
12=8b2
b2=1.5
Then:
b1=b2−1=0.5
a=8−5(1.5)
a=8−7.5=0.5
✅ Final Regression Equation
Y=0.5+0.5X1+1.5X2
🔍 Interpretation
-
If X₁ increases by 1, Y increases by 0.5 (keeping X₂ constant).
-
If X₂ increases by 1, Y increases by 1.5 (keeping X₁ constant).
Comments
Post a Comment