Multiple regression practice with answers

Use this small dataset to practise reading a multiple regression table. The first column is the outcome Y. X1 is a numeric predictor and X2 is a group indicator coded zero or one. The example estimates an intercept and both slopes. Treat the data as a teaching example throughout.

Download the practice questions and answers (PDF)

Example dataset

Y   X1  X2
1   0   0
4   1   0
6   2   0
5   0   1
6   1   1
10  2   1

Paste the six data rows into the calculator and leave out the headings.

Practice questions

  1. Fit a model with an intercept and both predictors. What does the coefficient on X1 mean? Explain X2 separately.
  2. Find the fitted value and residual for the row Y = 6, X1 = 1, X2 = 1.
  3. Compare the classical and HC1 robust standard errors for X1. Do the two approaches change the fitted coefficient?

Worked answers

  1. The fitted equation is Y-hat = 1.167 + 2.500 X1 + 3.333 X2, to three decimals. With X2 held fixed, a one-unit increase in X1 is associated with 2.5 units higher fitted Y. At the same X1, the fitted difference between the group coded one and the group coded zero is about 3.333 units.
  2. Using the unrounded coefficients gives 1.1667 + 2.5 + 3.3333 = 7. The residual is observed minus fitted, so 6 - 7 = -1. The model overpredicts this row by one unit.
  3. The classical SE is about 0.373 and the HC1 SE is about 0.264. The slope remains 2.5. The covariance estimator changes how uncertainty is calculated. Robust standard errors can be larger or smaller. Six rows make this a demonstration, not a reliable basis for inference.

Check the interpretation

A fitted association does not establish causation. The interpretation also assumes the additive model shown. An interaction would let the X1 slope differ by group. Before treating a fitted value as a prediction, check that the new predictor combination is supported by the data.

Check the calculations in the multiple regression calculator.

Last updated