Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Consider the following regression model: Yi =+Axiit 2Xi2+fi where ~ N(0, 2) P

ID: 2930053 • Letter: 1

Question

1. Consider the following regression model: Yi =+Axiit 2Xi2+fi where ~ N(0, 2) Predictor x is a numerical variable, whereas predictor r2 is a dummy variable. We have collected the following data. subject idY1 2 10 3 0 13 6 0 20 80 6 15 51 17 6 1 23 91 26 101 10 (b) Since predictor r2 is a dummy variable, the fitted model creates two different fitted lines (one for x2 = 0 and the other for x2 1). Suppose the fitted line for x2 = 0 is Y = a1 +a2x1 and the fitted line for x2 = 1 is Y = a3+G4x1-Find ai ,a2,a3 and a4. (1 pt) Ao + 1Zg + 2ai2 + Now consider the model in which an interaction term is added: Y? B3n2 . Answer questions (d) and (e) using this model (d) Repeat (b). That is, find a1, a2, a3 and a. (1 pt) (e) Do you think the interaction term was needed? why or why not? (1 pt)

Explanation / Answer

b) when x2 = 0

y^ = -1 + 2.5 x1

hence a1 = -1 , a2 = 2.5

when x2 = 1

when x2 = 1 ,

y^ = 4.6408 + 2.0874 * x1

a3 = 4.6408 , a4 = 2.0874

d)

y^ = -1 + 2.5 *x1 + 5.6408 *x2 -0.4126 *x1*x2

e) Interactive term is not needed as p-value of x1*x2 = 0.4263 > 0.05

hence it is insignificant

SUMMARY OUTPUT Regression Statistics Multiple R 0.941234471 R Square 0.88592233 Adjusted R Square 0.84789644 Standard Error 2.798809271 Observations 5 ANOVA df SS MS F Significance F Regression 1 182.5 182.5 23.29787 0.016949 Residual 3 23.5 7.833333 Total 4 206 Coefficients Standard Error t Stat P-value Lower 95% Intercept -1 2.600053 -0.38461 0.726173 -9.27453 x1 2.5 0.517943 4.826787 0.016949 0.851675