Advanced Quantitative Methods 360-301 • CEGEP, Montreal

Corrected exercises: multiple regression (360-301)

These ten corrected exercises cover multiple regression as it is used in the social sciences, in the CEGEP course Advanced Quantitative Methods, 360-301: the partial regression coefficient, reading software output, R2R^{2} and adjusted R2R^{2}, standardized coefficients, dummy (indicator) variables and their reference category, residual analysis and heteroscedasticity, multicollinearity and the variance inflation factor, and the interaction term.

By the end of the set, you can explain why the slope for hours of study drops from 1.30 to 1.05 once paid work is controlled (exercise 1), recover the tt statistics and the confidence interval from a regression output (exercise 2), compute an adjusted R2R^{2} that falls when noise is added (exercise 3), code a three-category qualitative variable with two dummy variables (exercise 4), read a funnel-shaped or U-shaped residual plot (exercise 5), compute a VIF (exercise 6) and interpret an interaction coefficient as a difference in slopes (exercise 7). Part B ends with a full four-variable model on 220 students, with its results paragraph (exercise 9), and with a published regression on household income, to be rewritten (exercise 10).

The thread of the set fits in one sentence: a multiple regression coefficient is NEVER read without the clause “holding the other variables constant”, and that clause is what separates it from a raw correlation.

Three pitfalls are named outright, and exercises 8 and 10 have you correct them: the R2R^{2} that rises with every added variable even when it is pure noise, coefficients compared with each other despite different units, and a lack of significance read as proof that there is no relationship. The third dummy variable that is one too many is added to the list.

10 corrected exercises • 100 points • 150 minutes

This chapter is part of 360-301, every chapter with its set and sheet Before you start Revision sheet: the traps and the method for this chapter

Self-checking set Type your answers and check them question by question: the page tells you right or wrong before you open the solution. With an account, every answer right on the first try earns points, and your right answers stay filled in when you come back.

Course recap

  • • A multiple regression coefficient is PARTIAL: it holds with the other variables held constant. The clause is part of the interpretation, not decoration.
  • • The raw slope and the partial slope differ as soon as the explanatory variables are correlated with each other.
  • • Each row of an output tests H0 : βj=0H_{0}\ :\ \beta_{j}=0 with t=bSEt=\dfrac{b}{SE}. Interval: b±tcrit×SEb\pm t_{crit}\times SE.
  • • R2R^{2} can never decrease when a variable is added. Radj2=1−(1−R2)n−1n−k−1R_{adj}^{2}=1-\left(1-R^{2}\right)\dfrac{n-1}{n-k-1} can drop, and that drop is the useful signal.
  • • STANDARDIZED coefficients =b×sxsy=b\times \dfrac{s_{x}}{s_{y}}: the only ones that can be compared across variables with different units.
  • • A qualitative variable with kk categories takes k−1k-1 dummy variables, the omitted category serving as the REFERENCE. Three dummy variables for three categories leave the model undetermined.
  • • The coefficient of a dummy variable is a vertical SHIFT, not a slope: without an interaction term, the lines stay parallel.
  • • Residual ei=yi−y^ie_{i}=y_{i}-\hat{y}_{i}. A zero sum and no correlation with the predictors are automatic: it is the SHAPE of the cloud that you examine.
  • • A funnel-shaped cloud signals heteroscedasticity, which distorts the standard errors without biasing the coefficients. A U-shaped cloud signals nonlinearity, to be fixed with a quadratic term or a logarithm.
  • • VIF=11−Rj2VIF=\dfrac{1}{1-R_{j}^{2}}: above 5, multicollinearity is serious. It inflates the standard errors, leaves predictions intact, and ruins the interpretation of the separate coefficients.
  • • An INTERACTION term x1×ex_{1}\times e: its coefficient is a DIFFERENCE IN SLOPES. The simple coefficients then become conditional on the zero value of the other variable.

Part A: the basics (/50)

Exercise 1: From one variable to two: the partial coefficient

Simple regression measures the raw relationship between two variables. Multiple regression measures the relationship that REMAINS when the other variables are held constant. Going from one to the other changes the numbers, and above all their meaning.

Sample of 150 students. Model 1: y^=52.0+1.30x1\hat{y}=52.0+1.30x_{1}, with R2=0.28R^{2}=0.28. Model 2: y^=55.4+1.05x1−0.42x2\hat{y}=55.4+1.05x_{1}-0.42x_{2}, with R2=0.41R^{2}=0.41, where yy is the term grade, x1x_{1} the hours of study and x2x_{2} the hours of paid work.

2468101214161850556065707580raw slope: 1.30partial slope: 1.05hours of study per week
  • a) Interpret the coefficient 1.30 of model 1, then the coefficient 1.05 of model 2.
  • b) Why does the slope drop from 1.30 to 1.05?
  • c) Interpret the coefficient −0.42-0.42.
  • d) Predict the grade of a student who studies 12 hours and works 18 hours per week.
  • e) What happens to the prediction if the student cuts paid work by 6 hours and moves that time to study?

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 1.301.30 is a RAW slope; 1.051.05 a PARTIAL slope, holding hours of work constant
  • b) Because the two explanatory variables are correlated: 19.2%19.2\% of the raw association was borrowed
  • c) Holding hours of study constant, one more hour of paid work is worth 0.420.42 points less
  • d) 55.4+12.6−7.56=60.4455.4+12.6-7.56=60.44
  • e) 69.2669.26, that is 6×(1.05+0.42)=8.826\times (1.05+0.42)=8.82 points more, but it is a prediction, not a promise
a)

In model 1, the coefficient 1.30 is a RAW slope: each additional weekly hour of study is associated with 1.30 more points, with everything else left as it is observed. In model 2, the coefficient 1.05 is a PARTIAL slope: each additional hour of study is associated with 1.05 more points HOLDING HOURS OF PAID WORK CONSTANT. The phrase “holding the other variables constant” is not a writing formality, it is the entire content of the coefficient.

b)

Because the two explanatory variables are CORRELATED with each other: students who work a lot study less. In model 1, the slope of 1.30 mixes the own effect of study with the opposite effect of the paid work that goes with it. Introducing x2x_{2} removes that borrowed share, and 1.05 is what remains. About a fifth of the raw association was therefore due to something other than the hours of study themselves: this is exactly the logic of elaboration seen with contingency tables, carried over to continuous variables.

c)

Holding hours of study constant, each additional weekly hour of paid work is associated with 0.42 points LESS. Stress “holding hours of study constant”: the coefficient does not measure the total effect of paid work, much of which operates through reduced study time, but what remains beyond that: fatigue, absences, disengagement.

d)

y^=55.4+1.05×12−0.42×18=55.4+12.6−7.56=60.44\hat{y}=55.4+1.05\times 12-0.42\times 18=55.4+12.6-7.56=60.44. The prediction applies to the MEAN of students with this profile, not to the individual, whose grade will differ from this value by a residual.

e)

The student would be at 18 hours of study and 12 hours of work: y^=55.4+1.05×18−0.42×12=55.4+18.9−5.04=69.26\hat{y}=55.4+1.05\times 18-0.42\times 12=55.4+18.9-5.04=69.26, that is 8.82 points more. The same number can be found directly: moving 6 hours is worth 6×(1.05+0.42)=6×1.47=8.826\times \left(1.05+0.42\right)=6\times 1.47=8.82. Note, however, that this is a model PREDICTION, not a causal promise. Since the data are cross-sectional, nothing guarantees that a student who changes behaviour actually obtains this gain.

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Exercise 2: Reading a regression output

Software always returns the same table. Five columns, and each answers a precise question.

Output of model 2, on 150 students.

VariableCoefficient bbStandard errorttpp
Constant55.403.1217.76< 0.001
Hours of study1.050.215.00< 0.001
Hours of work−0.42-0.420.11−3.82-3.82< 0.001
  • a) Recover the tt statistics from the coefficients and the standard errors.
  • b) What does each row of the table test? State the null hypothesis.
  • c) Build the 95% confidence interval for the coefficient of hours of study, the critical value being 1.976 at 147 degrees of freedom.
  • d) Is the coefficient of hours of work significantly different from zero? And from −1-1?
  • e) Can 1.05 and −0.42-0.42 be compared directly to say which variable matters more?

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 5.005.00, −3.818-3.818 and 17.7617.76
  • b) Each row tests βj=0\beta_{j}=0 HOLDING THE OTHER VARIABLES CONSTANT, two-sided
  • c) 1.05±0.4151.05\pm 0.415, that is [0.635,1.465][0.635, 1.465]
  • d) Yes for zero; and yes for −1-1, with t=0.580.11≈5.27t=\dfrac{0.58}{0.11}\approx 5.27
  • e) No: different units and different spreads; standardized coefficients are needed
a)

t=bSEt=\dfrac{b}{SE}. Hours of study: 1.050.21=5.00\dfrac{1.05}{0.21}=5.00. Hours of work: −0.420.11≈−3.818\dfrac{-0.42}{0.11}\approx -3.818. Constant: 55.403.12≈17.76\dfrac{55.40}{3.12}\approx 17.76. This recalculation takes ten seconds and catches transcription errors: do it every time you read a published table.

b)

Each row tests H0 : βj=0H_{0}\ :\ \beta_{j}=0, that is, that variable jj contributes nothing HOLDING THE OTHER VARIABLES CONSTANT. The test is two-sided. Stress the constancy clause: a variable can be strongly related to yy taken alone and perfectly nonsignificant in the model, simply because another variable already carries the same information.

c)

1.05±1.976×0.21=1.05±0.4151.05\pm 1.976\times 0.21=1.05\pm 0.415, that is [0.635,1.465]\left[0.635, 1.465\right]. The interval excludes zero, consistent with p<0.001p<0.001, and above all it shows that the plausible effect of one hour of study ranges from a gain of six tenths of a point to nearly a point and a half.

d)

Different from zero: yes, ∣t∣=3.82\left|t\right|=3.82 is well beyond 1.976. Different from −1-1: a new test is needed, t=−0.42−(−1)0.11=0.580.11≈5.27t=\dfrac{-0.42-\left(-1\right)}{0.11}=\dfrac{0.58}{0.11}\approx 5.27, so yes again, and very clearly. The question is worth asking because the table tests ONLY the zero hypothesis, whereas the interesting question is often another value, for example a threshold considered important in practice.

e)

No. The two coefficients are expressed in different units, points per hour of study and points per hour of work, and the size of their effect also depends on the SPREAD of each variable: a variable whose values barely vary cannot produce much difference, even with a large coefficient. To compare, use STANDARDIZED coefficients, obtained by multiplying each bb by sxjsy\dfrac{s_{x_{j}}}{s_{y}}: they are all expressed in standard deviations and become comparable. The ratio of the tt statistics, here 5.00 against 3.82, is an acceptable shortcut for saying which one is more solidly established, but it does not measure the size of the effect.

Exercise 3: R², adjusted R² and the temptation to add variables

The coefficient of determination rises with every added variable, even when the variable is pure noise. The adjusted R2R^{2} corrects for this, and its behaviour is the best safeguard against bloated models.

123456780.20.250.30.350.40.450.280.410.425number of explanatory variablesR²
  • a) Interpret the move from R2=0.28R^{2}=0.28 to R2=0.41R^{2}=0.41 between the two models.
  • b) Compute the adjusted R2R^{2} of model 2, with Radj2=1−(1−R2)n−1n−k−1R_{adj}^{2}=1-\left(1-R^{2}\right)\dfrac{n-1}{n-k-1}, n=150n=150 and k=2k=2.
  • c) Five unrelated variables are added; R2R^{2} rises to 0.425. Compute the adjusted R2R^{2} and conclude.
  • d) Why can R2R^{2} never decrease when a variable is added?
  • e) Is an R2R^{2} of 0.41 good? Answer by distinguishing two contexts.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) From 28%28\% to 41%41\% of variance explained, that is 1313 points more; 59%59\% remain unexplained
  • b) 1−0.59×149147≈0.4021-0.59\times \dfrac{149}{147}\approx 0.402
  • c) ≈0.397\approx 0.397: the raw value rises and the adjusted one FALLS, so the five variables contribute nothing
  • d) Because least squares minimizes over an enlarged set: at worst the coefficient is zero
  • e) Weak for predicting an individual, very good for explaining in the social sciences
a)

Model 1 accounts for 28% of the variance of the grades, model 2 for 41%. Adding hours of paid work therefore explains 13 more percentage points of variance. Put differently, knowing both variables reduces by 41% the sum of squared deviations relative to a prediction by the mean alone. 59% of the variation in grades remains unexplained by the model, which is the ordinary situation in the social sciences.

b)

Radj2=1−(1−0.41)149147=1−0.59×1.013605=1−0.598027≈0.402R_{adj}^{2}=1-\left(1-0.41\right)\dfrac{149}{147}=1-0.59\times 1.013605=1-0.598027\approx 0.402. The correction costs eight thousandths: it is light because 150 observations for 2 variables leave plenty of degrees of freedom.

c)

With k=7k=7: Radj2=1−(1−0.425)149142=1−0.575×1.049296=1−0.603345≈0.397R_{adj}^{2}=1-\left(1-0.425\right)\dfrac{149}{142}=1-0.575\times 1.049296=1-0.603345\approx 0.397. The raw R2R^{2} ROSE, from 0.410 to 0.425, and the adjusted R2R^{2} FELL, from 0.402 to 0.397. This is exactly the signal you must learn to read: the five added variables do not bring in more than the degrees of freedom they use up, so they contribute nothing. The two-variable model is preferable.

d)

Because the method of least squares MINIMIZES the sum of squared residuals over all possible coefficients. Adding a variable enlarges the set of available models: in the worst case, the software gives it a zero coefficient and recovers exactly the previous model. The minimum can therefore only fall or stay equal, and R2R^{2} can only rise or stay equal. In practice, with real data, a random variable always gains a little, and with nn variables for nn observations you reach R2=1R^{2}=1 having learned nothing.

e)

In a context of individual PREDICTION, 0.41 is weak: a considerable residual standard deviation remains, and the grade of a given student will still be poorly predicted. In a context of EXPLANATION in the social sciences, where behaviour depends on dozens of unmeasured factors, explaining 41% of the variance of grades with two administrative variables is on the contrary a very good result. The same number would be catastrophic in physics and remarkable in sociology: an R2R^{2} is never judged in absolute terms, but against what the literature in the field usually obtains.

123456780.20.250.30.350.40.450.280.410.425number of explanatory variables0.2750.4020.397adjusted R²R²

Exercise 4: Dummy variables

A regression accepts only numbers. A qualitative variable enters it as DUMMY (indicator) variables, equal to 0 or 1, and the interpretation of the coefficients changes in nature.

A dummy variable “has a job”, equal to 1 if yes, is added to the model: y^=57.1+1.02x1−2.9e\hat{y}=57.1+1.02x_{1}-2.9e.

  • a) Interpret the coefficient −2.9-2.9.
  • b) Write the two equations, for a student without a job and then with a job.
  • c) The variable “program” has three categories. How many dummy variables are needed, and why not three?
  • d) The coefficients of the two program dummy variables are +3.4+3.4 and −1.8-1.8, the reference being the third program. Rank the three programs.
  • e) What would happen if the program were coded 1, 2, 3 in a single variable?

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Holding hours of study constant, a student with a job obtains 2.92.9 points less: a SHIFT
  • b) y^=57.1+1.02x1\hat{y}=57.1+1.02x_{1} and y^=54.2+1.02x1\hat{y}=54.2+1.02x_{1}: two parallel lines
  • c) 3−1=23-1=2 dummy variables; three would create perfect collinearity with the constant
  • d) Program 1, then 3 (the reference), then 2; 5.25.2 points between the extremes
  • e) It would impose equal gaps between arbitrary codes: the result would depend on the coding
a)

Holding hours of study constant, a student who has a job obtains on average 2.9 points LESS than a student without a job. The coefficient of a dummy variable is not a slope but a SHIFT: it moves the whole line down or up, without changing its incline.

b)

Without a job, e=0e=0: y^=57.1+1.02x1\hat{y}=57.1+1.02x_{1}. With a job, e=1e=1: y^=57.1−2.9+1.02x1=54.2+1.02x1\hat{y}=57.1-2.9+1.02x_{1}=54.2+1.02x_{1}. Two PARALLEL lines, vertically 2.9 points apart. Parallelism is an assumption of the model, not an observed fact: lifting it requires an interaction term.

c)

You need 3−1=23-1=2 dummy variables. With three, their sum would equal 1 for everyone, so they would be perfectly redundant with the constant, and the system would no longer have a unique solution: this is the DUMMY VARIABLE TRAP, or perfect collinearity. The category left out becomes the REFERENCE, and all the coefficients are read relative to it.

d)

The third program, the reference, serves as zero. The first is +3.4+3.4 points from the reference, the second −1.8-1.8. Ranking from highest to lowest: program 1, then program 3, then program 2, with 5.2 points between the two extremes. Note: the table tests the difference of each program FROM THE REFERENCE, not the programs against each other; concluding that 1 differs significantly from 2 requires an additional test, or changing the reference and rerunning.

e)

You would be imposing on the model that going from program 1 to program 2 has exactly the same effect as going from 2 to 3, since a single coefficient multiplies the code. But these codes are NOMINAL labels whose order is arbitrary: swapping two programs would completely change the result. The model would be both constrained for no reason and dependent on a meaningless coding choice. This is the most common beginner error, and the software never complains.

Exercise 5: Residuals, and what they reveal

A model is judged as much by what it does not explain as by what it explains. The plot of residuals against predicted values is the first check to make, before any comment on the coefficients.

healthy residualsgrowing varianceresidual on the vertical axis, predicted value on the horizontal axis
  • a) Define the residual of an observation and give its value for a student predicted at 60.44 who obtains 67.
  • b) Which two properties do the residuals always have, by construction?
  • c) The right-hand panel shows a funnel. Name the defect and say what it distorts.
  • d) One observation has a residual of +19+19 points, nearly three residual standard deviations. What should you do?
  • e) The residual cloud draws a U-shaped curve. What defect does this signal, and how can it be remedied?

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) ei=yi−y^i=67−60.44=6.56e_{i}=y_{i}-\hat{y}_{i}=67-60.44=6.56: the model underestimates the student
  • b) Zero sum, and uncorrelated with the explanatory variables: two automatic properties
  • c) Heteroscedasticity: it does not bias the coefficients, it distorts their standard errors
  • d) Look for a data entry error, measure the influence, examine the case; never delete for convenience
  • e) Nonlinearity: add x12x_{1}^{2}, transform with a logarithm, or cut into classes
a)

The residual is the difference between the observed value and the predicted value: ei=yi−y^ie_{i}=y_{i}-\hat{y}_{i}. Here 67−60.44=6.5667-60.44=6.56 points: the model underestimates this student by 6.56 points, in other words the student does better than their hours of study and work would suggest.

b)

First, their SUM is zero, and so is their mean: this is a direct consequence of having a constant in the model. Second, they are UNCORRELATED with each of the explanatory variables and with the predicted values: all the linear information available in these variables has been used. These two properties are automatic and so prove nothing about the quality of the model; what you examine is the SHAPE of the cloud.

c)

This is HETEROSCEDASTICITY: the variance of the residuals grows with the predicted value. It does NOT bias the coefficients, which remain correct estimates, but it distorts their STANDARD ERRORS, and therefore the tt statistics, the p values and the confidence intervals, generally toward excessive confidence. It is remedied with robust standard errors, known as White's, or with a transformation of the dependent variable, often the logarithm when the variable is an amount of money.

d)

Three checks before any decision. First, look for a DATA ENTRY ERROR: a grade of 97 typed as 79, a duplicate, a different unit. Next, measure the observation's actual INFLUENCE by rerunning the regression without it: if the coefficients barely move, the point is an outlier without being influential, and you keep it. Finally, examine the CASE: a student repeating the course, an athlete in competition, a profile the model was not meant to cover. You never delete an observation because it is inconvenient, and any deletion must be justified and reported.

e)

A U-shaped cloud signals NONLINEARITY: the relationship between the variables is not a straight line, and the model underestimates at both ends while overestimating in the middle, or the reverse. This is common with hours of study, whose returns diminish: the first ten hours bring a lot, the next ten less. It is remedied by adding a quadratic term x12x_{1}^{2}, by transforming the variable with a logarithm, or by cutting it into classes with dummy variables. A linear regression on a curved relationship gives coefficients that are perfectly calculated and systematically wrong at each end of the range.

Part B: problems and reasoning (/50)

Exercise 6: Multicollinearity

When two explanatory variables say almost the same thing, the model can no longer assign them distinct shares. The coefficients become unstable, and the symptom is recognizable.

A variable “hours spent in the library”, strongly correlated with hours of study, r=0.92r=0.92, is added to the model.

  • a) The model's R2R^{2} moves from 0.41 to 0.415, but the two study coefficients become nonsignificant. Explain this paradox.
  • b) The variance inflation factor is VIF=11−Rj2VIF=\dfrac{1}{1-R_{j}^{2}}, where Rj2R_{j}^{2} is the coefficient of determination of variable jj regressed on the others. Compute it for Rj2=0.85R_{j}^{2}=0.85.
  • c) By how much is the standard error of the coefficient multiplied?
  • d) Which VIFVIF thresholds are usually used, and what should be done beyond them?
  • e) Does multicollinearity prevent PREDICTION?

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) The two variables carry the same information: the overall fit holds, the standard errors explode
  • b) VIF=10.15≈6.667VIF=\dfrac{1}{0.15}\approx 6.667
  • c) By 6.667≈2.582\sqrt{6.667}\approx 2.582: the tt statistic would go from 5.005.00 to 1.941.94
  • d) Thresholds 5 and 10; drop, combine, or increase the sample size
  • e) No: prediction remains valid, it is the interpretation of the coefficients that is lost
a)

The paradox is only apparent. The two variables carry almost the same information: the model can therefore attribute most of the effect to one, to the other, or split it in a thousand ways, without the quality of the fit suffering. The R2R^{2}, which measures the OVERALL fit, therefore stays excellent. But the standard error of EACH coefficient explodes, since the data cannot settle between the possible splits, and each tt collapses. The characteristic sign is therefore this: a model that is significant overall in which no coefficient is individually significant.

b)

VIF=11−0.85=10.15≈6.667VIF=\dfrac{1}{1-0.85}=\dfrac{1}{0.15}\approx 6.667. The variance of the coefficient is therefore 6.67 times larger than it would be if the variable were independent of the others.

c)

The standard error is the square root of the variance, so it is multiplied by 6.667≈2.582\sqrt{6.667}\approx 2.582. A coefficient that would have had a standard error of 0.21 now has one of 0.54, and its tt statistic is divided by 2.58: it would go from 5.00 to 1.94, below the threshold.

d)

The usual thresholds are 5 and 10: a VIFVIF above 5 signals a serious problem, and beyond 10 the situation is generally judged unacceptable. Three remedies exist. DROP one of the two variables, which is legitimate when they measure the same concept, here the time devoted to study. COMBINE them into a single index, a mean or a score. Or INCREASE the sample size, which reduces all the standard errors and can be enough when the collinearity is moderate. What you must not do is conclude that there is no effect because the coefficients are not significant.

e)

No, and this is a point that is often misunderstood. The predictions and the R2R^{2} remain perfectly valid: the model predicts just as well with collinear variables. What is lost is the INTERPRETATION of the coefficients taken separately, that is, the ability to say which variable does what. If the goal is to predict a grade, multicollinearity is harmless; if the goal is to know whether it is study time or library attendance that matters, it makes the question unanswerable with these data.

Exercise 7: Interaction: when the effect depends on the context

Until now, each coefficient applied to everyone. An interaction term lifts this constraint: it allows the effect of one variable to depend on the value of another.

Model with interaction: y^=54.8+1.30x1−3.0e−0.80(x1×e)\hat{y}=54.8+1.30x_{1}-3.0e-0.80\left(x_{1}\times e\right), where ee equals 1 if the student has a job.

  • a) Write the equation for a student without a job, then for a student with a job.
  • b) Interpret the coefficient −0.80-0.80.
  • c) Compute the predicted grade for 10 hours of study in each group, then for 20 hours.
  • d) From how many hours of study does the gap between the two groups exceed 10 points?
  • e) What happens to the interpretation of the coefficient −3.0-3.0 in the presence of an interaction?

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) y^=54.8+1.30x1\hat{y}=54.8+1.30x_{1} without a job, y^=51.8+0.50x1\hat{y}=51.8+0.50x_{1} with a job
  • b) It is the DIFFERENCE IN SLOPES: 1.301.30 against 0.500.50 points per hour of study
  • c) At 10 h: 67.867.8 against 56.856.8, gap 11.011.0. At 20 h: 80.880.8 against 61.861.8, gap 19.019.0
  • d) The gap is 3.0+0.80x13.0+0.80x_{1}, so beyond x1=8.75x_{1}=8.75 hours
  • e) It is a SIMPLE EFFECT, valid for x1=0x_{1}=0 only; hence the habit of centring
a)

Without a job, e=0e=0: y^=54.8+1.30x1\hat{y}=54.8+1.30x_{1}. With a job, e=1e=1: y^=54.8+1.30x1−3.0−0.80x1=51.8+0.50x1\hat{y}=54.8+1.30x_{1}-3.0-0.80x_{1}=51.8+0.50x_{1}. Two lines with neither the same intercept nor the same SLOPE: this is exactly what the interaction allows.

b)

The coefficient −0.80-0.80 is the DIFFERENCE IN SLOPES between the two groups. Among students without a job, one more hour of study brings 1.30 points; among those who work, it brings only 1.30−0.80=0.501.30-0.80=0.50 points. The return on an hour of study is therefore more than twice as low for a student who works, which is readily interpreted as fatigue and fragmented time.

c)

At 10 hours: without a job, 54.8+13.0=67.854.8+13.0=67.8; with a job, 51.8+5.0=56.851.8+5.0=56.8. Gap: 11.0 points. At 20 hours: without a job, 54.8+26.0=80.854.8+26.0=80.8; with a job, 51.8+10.0=61.851.8+10.0=61.8. Gap: 19.0 points. The gap between the two groups is therefore not constant, it GROWS with hours of study, and that is the signature of an interaction.

d)

The gap is (54.8+1.30x1)−(51.8+0.50x1)=3.0+0.80x1\left(54.8+1.30x_{1}\right)-\left(51.8+0.50x_{1}\right)=3.0+0.80x_{1}. It exceeds 10 points when 0.80x1>7.00.80x_{1}>7.0, that is x1>8.75x_{1}>8.75 hours. Beyond nine hours of study per week, the difference between the two groups therefore exceeds ten points, which is considerable.

e)

Its scope changes. In the absence of an interaction, −3.0-3.0 would be the gap between the two groups, valid everywhere. With the interaction, it holds only for x1=0x_{1}=0, that is for a student who would not study at all: it is a SIMPLE EFFECT, conditional on a particular value of the other variable, and often on a value that makes no practical sense. This is why continuous variables are usually CENTRED before building an interaction: by subtracting the mean from x1x_{1}, the coefficient of ee becomes again the gap between groups for a student with AVERAGE study time, which is interpretable.

2468101214161820225055606570758085no jobwith a jobgap 11gap 19

Exercise 8: Five statements to correct

Each of the following five statements is FALSE. Say why and give the correct statement.

  • 1) “The coefficient of hours of study is 1.05: one more hour of study earns 1.05 points.”
  • 2) “Our R2R^{2} went from 0.41 to 0.425 when we added five variables: the model improved.”
  • 3) “The coefficient of x1x_{1} is 1.05 and that of x2x_{2} is −0.42-0.42: x1x_{1} therefore matters two and a half times more.”
  • 4) “None of our coefficients is significant, but the model explains 41% of the variance: our data are contradictory.”
  • 5) “The program has three categories, so we created three dummy variables.”

Type your answers, the page tells you right or wrong 0/11

1)
2)
3)
4)
5)
Show the solution

Answers

  • 1) FALSE: it is an association, not an effect, and “holding hours of work constant” is missing
  • 2) FALSE: the adjusted value FALLS from 0.4020.402 to 0.3970.397; the two-variable model is preferable
  • 3) FALSE: different units; standardized coefficients are needed
  • 4) FALSE: no contradiction, it is the signature of multicollinearity
  • 5) FALSE: k−1=2k-1=2 are needed, the omitted category serving as the reference
1)

FALSE on two counts. First, the coefficient is an ASSOCIATION and not an effect: the data are cross-sectional, nobody was assigned to study one more hour, and the student who studies more may differ in motivation. Second, the constancy clause is missing. Correct statement: holding hours of paid work constant, one more weekly hour of study is associated with 1.05 more points on average.

2)

FALSE. R2R^{2} can only rise when variables are added, even pure noise: its increase proves nothing. The adjusted R2R^{2}, for its part, goes from 0.402 to 0.397, so it FALLS: the five variables cost more degrees of freedom than they bring in explanation. Correct statement: the addition degrades the model, and the two-variable model is preferable.

3)

FALSE. The two coefficients are not in the same unit, points per hour of study and points per hour of work, and the size of their contribution also depends on the spread of each variable. Correct statement: to compare relative importance, you need the STANDARDIZED coefficients, obtained by multiplying each bb by sxjsy\dfrac{s_{x_{j}}}{s_{y}}.

4)

FALSE, there is no contradiction: this is the classic signature of MULTICOLLINEARITY. The explanatory variables resemble each other too much for the model to assign each a distinct share, so the standard errors of all the coefficients inflate while the overall fit stays good. Correct statement: the model predicts well and does not allow the effect to be attributed to one variable rather than another; you must examine the variance inflation factors and remove or combine the redundant variables.

5)

FALSE. With three dummy variables, their sum equals 1 for every observation, so they exactly reproduce the constant: the system becomes undetermined. Correct statement: k−1=2k-1=2 dummy variables are needed, the omitted category serving as the REFERENCE to which the two coefficients are compared.

Exercise 9: Problem: modelling the term grade

On 220 students, the term average is regressed on four variables. Software output: constant 41.2 (SE 4.80); high school average 0.38 (SE 0.061); hours of study 0.84 (SE 0.190); hours of work −0.31-0.31 (SE 0.092); dummy variable “first in the family to attend postsecondary education” −1.70-1.70 (SE 1.45). R2=0.52R^{2}=0.52.

  • a) Compute the four tt statistics and say which are significant, the critical value being 1.971.
  • b) Compute the adjusted R2R^{2}.
  • c) Predict the grade of a student with a high school average of 78, who studies 14 hours, works 12 hours, and is first in the family to attend postsecondary education.
  • d) What should be concluded from the nonsignificant coefficient −1.70-1.70? Build its confidence interval.
  • e) Write the results paragraph.

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 6.2306.230, 4.4214.421, −3.370-3.370 and −1.172-1.172: the first three are significant
  • b) 1−0.48×219215≈0.5111-0.48\times \dfrac{219}{215}\approx 0.511
  • c) 41.2+29.64+11.76−3.72−1.70=77.1841.2+29.64+11.76-3.72-1.70=77.18
  • d) [−4.558,1.158][-4.558, 1.158]: imprecise, not null; a penalty of four and a half points remains possible
  • e) Three significant coefficients, one undetermined, and a reminder that the data are cross-sectional
a)

tt for the high school average: 0.380.061≈6.230\dfrac{0.38}{0.061}\approx 6.230. Hours of study: 0.840.190≈4.421\dfrac{0.84}{0.190}\approx 4.421. Hours of work: −0.310.092≈−3.370\dfrac{-0.31}{0.092}\approx -3.370. Dummy variable: −1.701.45≈−1.172\dfrac{-1.70}{1.45}\approx -1.172. The first three exceed 1.971 in absolute value and are therefore significant; the fourth is not.

b)

With n=220n=220 and k=4k=4: Radj2=1−(1−0.52)219215=1−0.48×1.018605=1−0.488930≈0.511R_{adj}^{2}=1-\left(1-0.52\right)\dfrac{219}{215}=1-0.48\times 1.018605=1-0.488930\approx 0.511. The correction costs less than one point: with 220 observations for 4 variables, it is almost painless.

c)

y^=41.2+0.38×78+0.84×14−0.31×12−1.70×1=41.2+29.64+11.76−3.72−1.70=77.18\hat{y}=41.2+0.38\times 78+0.84\times 14-0.31\times 12-1.70\times 1=41.2+29.64+11.76-3.72-1.70=77.18. The prediction applies to the mean of students with this profile; the residual standard deviation, which would be needed to give an individual prediction interval, is not provided.

d)

You can NOT conclude that being first in the family to attend postsecondary education is unrelated to the grade. You conclude that the data do not allow it to be distinguished from zero HOLDING THE OTHER VARIABLES CONSTANT. Interval: −1.70±1.971×1.45=−1.70±2.858-1.70\pm 1.971\times 1.45=-1.70\pm 2.858, that is [−4.558,1.158]\left[-4.558, 1.158\right]. The interval leaves open a penalty of more than four and a half points, which is far from negligible: the result is imprecise, not null. Note also that the coefficient is controlled for the high school average, which is itself already affected by social origin: a good part of the raw gap has therefore been absorbed upstream.

e)

“The regression of the term average on four variables explains 52% of the variance, Radj2=0.51R_{adj}^{2}=0.51, on 220 students. Holding the other variables constant, each point of high school average is associated with 0.38 more points, t=6.23t=6.23, p less than 0.001; each weekly hour of study with 0.84 more points, t=4.42t=4.42, p less than 0.001; each hour of paid work with 0.31 fewer points, t=−3.37t=-3.37, p less than 0.01. Being first in the family to attend postsecondary education is not associated with a significant difference once these variables are controlled, b=−1.70b=-1.70; confidence interval from −4.56-4.56 to 1.161.16, which does not rule out an appreciable penalty. Since the data are cross-sectional, these coefficients describe associations and not causal effects.”

Exercise 10: Problem: reading a published regression

An article concludes: “household income has a significant effect on achievement (b=0.0004b=0.0004; p=0.004p=0.004), which shows that money buys school results. The number of books at home, on the other hand, has no effect (b=0.011b=0.011; p=0.31p=0.31), contrary to what the literature claims. R2=0.18R^{2}=0.18; n=900n=900.”

  • a) Interpret concretely the income coefficient 0.0004, expressed in dollars.
  • b) The coefficient seems tiny. Is that an argument against the author?
  • c) “Has no effect”: two criticisms.
  • d) The author included household income, parents' education and the number of books in the same model. What problem does this pose?
  • e) Rewrite the two concluding sentences.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 10 000×0.0004=4.010\,000\times 0.0004=4.0 points; 2424 points between 40 00040\,000 and 100 000100\,000 dollars
  • b) No: in thousands of dollars the coefficient is 0.40.4, in tens of thousands 44
  • c) Failure to reject read as proof of absence, and the forgotten constancy clause
  • d) The three variables measure the same socioeconomic capital: multicollinearity
  • e) Express the coefficient as a readable change, and present the nonsignificance as an indeterminacy
a)

Each additional dollar of annual income is associated with 0.0004 more points, holding the other variables constant. Brought back to a readable unit, 10,000 more dollars of annual income correspond to 10 000×0.0004=4.010\,000\times 0.0004=4.0 points of average. The gap between a household at 40,000 dollars and a household at 100,000 dollars is therefore 24 points, which is enormous. The writing rule is always to express a coefficient for a REALISTIC change in the variable, never in its raw unit when that unit is a dollar or a second.

b)

No, not at all. The size of a coefficient depends entirely on the unit chosen: expressing income in thousands of dollars would give b=0.4b=0.4, in tens of thousands b=4b=4, with nothing else changing. A coefficient is therefore never judged by its apparent size, but relative to the standard deviation of the variable, or converted into an interpretable change as in the previous question.

c)

First criticism, failure to reject read as proof of absence: with p=0.31p=0.31, the data are simply compatible with zero, and the confidence interval, not published, probably contains appreciable values. Second criticism, the forgotten constancy clause: the number of books has no OWN effect once income and parents' education are controlled, which is very different from having no relationship with achievement. Taken alone, it almost certainly would have one.

d)

These three variables are strongly correlated with each other: income, parents' education and the number of books largely measure the same socioeconomic capital. This is therefore a situation of MULTICOLLINEARITY, which inflates the standard errors and makes the split of the effect among the three arbitrary. That income stands out and books do not probably has no substantive meaning: another specification, or another sample, could reverse the roles. This is precisely the case where the variance inflation factors should be published and, no doubt, a single index built.

e)

“Each 10,000 dollars of annual household income is associated with 4.0 more points of average, holding parents' education and the number of books constant, b=0.0004b=0.0004; p=0.004p=0.004. The number of books at home is not associated with a significant difference once these variables are controlled, b=0.011b=0.011; p=0.31p=0.31, which does not mean that it is unrelated to achievement: since the three variables largely measure the same socioeconomic capital, the model cannot assign them distinct shares, and the cross-sectional design rules out any causal interpretation.” Two decisive corrections: the coefficient is brought back to a readable change, and the lack of significance is presented as an indeterminacy of the model, not as a result.

Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous chapter One-way analysis of variance, 360-301 Next chapter Nonparametric tests, 360-301

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-aqm-multiple-regression. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a quantitative methods tutor in Montreal?

Get in touch for a first session. 360-301 arrives at the time of the end-of-program research project, and it is the course where a method error costs you the whole analysis chapter.

Site by Studio Squalli