You are on page 1of 3

Jeralyn U.

Mucha
IS107-MO1
MULTIPLE LINEAR REGRESSION EXERCISE

1. Given the following dataset:


a. Calculate X12, X22, X1y, X2y and X1X2.

x2
y x1 Sales
Sales Advertising Promotion X12 X22 X1Y X2Y X1X2
900 123 63 15129 3969 110700 56700 7749
1000 234 117 54756 13689 234000 117000 27378
1200 321 161 103041 25921 385200 193200 51681
1050 234 117 54756 13689 245700 122850 27378
876 231 116 53361 13456 202356 101616 26796
778 234 171 54756 13689 182052 91026 27378
1550 432 216 186624 46656 669600 334800 93312
777 234 117 54756 13689 181818 90909 27378
678 333 167 110889 27889 225774 113226 55611
876 234 117 54756 13689 204984 102492 27378
MEAN 968.5 261 130.8
SUM 9685 2610 1308 742,824 186,336 2,642,184 1,323,819 372,039
REGRESSION SUMS 61,614 15,249.60 114,399 57,021 30,651

b. Calculate the Regression Sums?


Σx1 2 = Σx1 2 – (Σx1) 2 / n = 742,824 – (2610)2 /10 = 61,614
Σx2 2 = Σx2 2 – (Σx2) 2 / n = 186,336 – (1308)2 /10 = 15,249.6
Σx1y = Σx1y – (Σx1Σy) / n = 2,642,184 – (2610*9685) /10 = 114,399
Σx2y = Σx2y – (Σx2Σy) / n = 1,323,819 – (1308*9685) /10 = 57,021
Σx1x2 = Σx1x2 – (Σx1Σx2) / n = 372039 – (2610*1308) /10 = 30,651

C. What is b0?
b0 = ȳ – b1x̄1 – b2x̄2
b0 = 968.5 – (-30.572*261) – (65.187*130.8)
b0 = 421.332

D. What is b1?
[(Σx2 2 )(Σx1y) - (Σx1x2)(Σx2y)] / [(Σx1 2 ) (Σx2 2 ) - (Σx1x2) 2 ]
[(15,249.6) (114,399) – (30,651) (57,021)] / [(61,614) (15,249.6) – (30,651)2 ]
b1 = -30.572

E. What is b2?
[(Σx1 2 )(Σx2y) – (Σx1x2)(Σx1y)] / [(Σx1 2 ) (Σx2 2 ) – (Σx1x2) 2 ] [(61,614)(57,021) –
(30,651)(114,399)] / [(61,614) (15,249.6) – (30,651)2 ]
b2 = 65.187
F. What is the linear regression equation?
Regression Equation: ŷ = b0 + b1X1 + b2X2
ŷ = 421.332 + (-30.572)X1 + 65.187X2

G. What is the estimated Sales if advertising expenditure is 200 and promotion


expenditure is 100?
ŷ = 421.332 + (-30.572)X1 + 65.187X2 ŷ = 421.332 + (-30.572)(200) + 65.187(100)
ŷ = 825.632

2. Given the following dataset:


a. Calculate X12, X22, X1y, X2y and X1X2.

y x1 x2
Salary Experience Test Score X12 X22 X1Y X2Y X1X2
24 4 78 16 6084 96 1872 312
4 7 100 49 10000 301 4300 700
23.7 1 86 1 7396 23.7 2038.2 86
34.3 5 82 25 6724 171.5 2812.2 410
35.8 8 86 64 7396 286.4 3078.8 688
38 10 84 100 7056 380 3192 840
22.2 0 75 0 5625 0 1665 0
23.1 1 80 1 6400 23.1 1848 80
30 6 83 36 6889 180 2490 498
33 6 91 36 8281 198 3003 546
MEAN 30.7 4.8 84.5
SUM 307.1 48 845 328 71,851 1,660 26,300 4,160
REGRESSION SUMS 98 448.50 186 57,021 104
b. Calculate the Regression Sums?
Σx1 2 = Σx1 2 – (Σx1) 2 / n = 328 – (48)2 /10 = 97.6
Σx2 2 = Σx2 2 – (Σx2) 2 / n = 71851 – (845)2 /10 = 448.5
Σx1y = Σx1y – (Σx1Σy) / n = 1659.7 – (48*307.1) /10 = 185.62
Σx2y = Σx2y – (Σx2Σy) / n = 26299.6 – (845*307.1) /10 = 349.65
Σx1x2 = Σx1x2 – (Σx1Σx2) / n = 4160 – (48*845) /10 = 104

c. What is b0?
b0 = ȳ – b1x̄1 – b2x̄2
b0 = 30.7 – (1.423*4.8) – (0.450*84.5)
b0 = -14.1554

d. What is b1?
[(Σx2 2 )(Σx1y) - (Σx1x2)(Σx2y)] / [(Σx1 2 ) (Σx2 2 ) - (Σx1x2) 2 ]
[(448.5)(185.62) – (104)(349.65)] / [(97.6)(448.5) – (104)2 )]
b1 = 1.423

e. What is b2?
[(Σx1 2 )(Σx2y) – (Σx1x2)(Σx1y)] / [(Σx1 2 ) (Σx2 2 ) – (Σx1x2) 2 ]
[(97.6)(349.65) – (104)(185.62)] / [(97.6)(448.5) – (104)2 ]
b2 = 0.450

f. What is the linear regression equation?


Regression Equation:
ŷ = b0 + b1X1 + b2X2
ŷ = -14.1554 + 1.423X1 + 0.450X2

g. What is the estimated Salary if experience is 9 and test score is 90?


ŷ = -14.1554 + 1.423X1 + 0.450X2
ŷ = - 14.1554 + (1.423)(9) + (0.450)(90)
ŷ = 39.1516

You might also like