Multiple Linear Regression – Problem & Solution

 

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+b2X2Y = a + b_1 X_1 + b_2 X_2

Where:

  • a = Intercept

  • b₁, b₂ = Partial regression coefficients


🔢 Example Problem (Two Independent Variables)

🔹 Question

Fit the regression equation:

Y=a+b1X1+b2X2Y = a + b_1 X_1 + b_2 X_2

Given data:

ObsX₁X₂Y
1124
2213
3348
4437

✅ Step 1: Model

Y=a+b1X1+b2X2Y = a + b_1 X_1 + b_2 X_2

We use Normal Equations:

Y=na+b1X1+b2X2\sum Y = na + b_1\sum X_1 + b_2\sum X_2 X1Y=aX1+b1X12+b2X1X2\sum X_1Y = a\sum X_1 + b_1\sum X_1^2 + b_2\sum X_1X_2 X2Y=aX2+b1X1X2+b2X22\sum X_2Y = a\sum X_2 + b_1\sum X_1X_2 + b_2\sum X_2^2

✅ Step 2: Calculate Required Sums

First prepare working table:

X₁X₂YX₁²X₂²X₁X₂X₁YX₂Y
12414248
21341263
348916122432
437169122821

Now totals:

X1=10\sum X_1 = 10 X2=10\sum X_2 = 10 Y=22\sum Y = 22 X12=30\sum X_1^2 = 30 X22=30\sum X_2^2 = 30 X1X2=28\sum X_1X_2 = 28 X1Y=62\sum X_1Y = 62 X2Y=64\sum X_2Y = 64 n=4n = 4

✅ Step 3: Form Normal Equations

22=4a+10b1+10b222 = 4a + 10b_1 + 10b_2
62=10a+30b1+28b262 = 10a + 30b_1 + 28b_2
64=10a+28b1+30b264 = 10a + 28b_1 + 30b_2

✅ Step 4: Solve Equations

From (2) − (3):

6264=(30b128b1)+(28b230b2)62 - 64 = (30b_1 - 28b_1) + (28b_2 - 30b_2) 2=2b12b2-2 = 2b_1 - 2b_2 b1b2=1b_1 - b_2 = -1 b1=b21b_1 = b_2 - 1

Substitute into equation (1):

22=4a+10(b21)+10b222 = 4a + 10(b_2 - 1) + 10b_2 22=4a+10b210+10b222 = 4a + 10b_2 - 10 + 10b_2 22=4a+20b21022 = 4a + 20b_2 - 10 32=4a+20b232 = 4a + 20b_2 8=a+5b28 = a + 5b_2 a=85b2a = 8 - 5b_2

Substitute into equation (2):

62=10(85b2)+30(b21)+28b262 = 10(8 - 5b_2) + 30(b_2 -1) + 28b_2 62=8050b2+30b230+28b262 = 80 - 50b_2 + 30b_2 - 30 + 28b_2 62=50+8b262 = 50 + 8b_2 12=8b212 = 8b_2 b2=1.5b_2 = 1.5

Then:

b1=b21=0.5b_1 = b_2 - 1 = 0.5 a=85(1.5)a = 8 - 5(1.5) a=87.5=0.5a = 8 - 7.5 = 0.5

✅ Final Regression Equation

Y=0.5+0.5X1+1.5X2Y = 0.5 + 0.5X_1 + 1.5X_2

🔍 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

Popular posts from this blog

Central Bank of India Recruitment 2026 – 275 Specialist Officer (SO) Posts

Reserve Bank of India RBI Assistant Recruitment 2026 - Apply Online for 650 Posts

what is Machine Learning