Question
A housing researcher has four rental listings, recorded as (distance from centre in km, floor area in m², monthly rent in dollars):
\[(1,80,2000),\ (1,100,2200),\ (3,100,1800),\ (3,120,2000)\].
Larger homes tend to be farther from the centre here, so a regression of rent on floor area alone can be misleading. The researcher wants the floor-area coefficient in an ordinary least-squares regression of monthly rent on an intercept, floor area and distance.
Compute that adjusted coefficient by first removing from both rent and area their separate best linear predictions using an intercept and distance. Show why this residual-regression slope equals the coefficient in the full three-term regression. What is the unadjusted area-only slope in these four listings?
Get hint
Hint 1
Regressing on an intercept and distance alone predicts the mean within each distance group, since distance takes only values 1 and 3.
Check your answer
Solution
Let x be floor area, z distance and y monthly rent. Residualize x and y against an intercept and z. Because z takes only 1 and 3 km, each such fitted value is the mean for its distance group. The group means for area are 90 m² at \(z=1\) and 110 m² at \(z=3\), giving area residuals \(r_x=(-10,10,-10,10)\). The group mean rents are $2,100 and $1,900, giving rent residuals \(r_y=(-100,100,-100,100)\).
The no-intercept regression of \(r_y\) on \(r_x\) has slope
\(\hat{\beta}_x=\frac{\sum_i r_{x,i}r_{y,i}}{\sum_i r_{x,i}^{2}}=\frac{4\cdot(10\cdot100)}{4\cdot100}=\text{\$10}\) per m² per month.
This is the adjusted coefficient. Indeed the original observations satisfy \(y=1400+10x-200z\) exactly, so the full OLS slope on area is 10 and all full-model residuals vanish.
Why does residualization work generally? Write the full least-squares model \(y=\beta x+Z\gamma+e\), where Z contains the intercept and control z. Let \(M=I-Z(Z^{\mathsf T}Z)^{-1}Z^{\mathsf T}\) be the orthogonal projection that removes Z. The full normal equation \(Z^{\mathsf T}e=0\) makes the optimal control coefficient, at a given \(\beta\), fit \(y-\beta x\); equivalently the minimized residual is \(M(y-\beta x)=r_y-\beta r_x\). The remaining normal equation \(r_x^{\mathsf T}(r_y-\beta r_x)=0\) gives \(\beta=\frac{r_x^{\mathsf T}r_y}{r_x^{\mathsf T}r_x}\), provided \(r_x\ne0\). Thus residual regression and full regression have the same target coefficient.
In contrast, with area mean 100 and rent mean 2000, deviations are \(x-\bar x=(-20,0,0,20)\) and \(y-\bar y=(0,200,-200,0)\). Their cross-product sum is zero, so the unadjusted simple-regression slope is zero. This is a descriptive adjusted association, not by itself proof of a causal impact of area on rent.
Assumptions
Each listing is weighted equally in ordinary least squares, with an intercept in both residualizing regressions and in the full model.
Distance and floor area are not perfectly collinear, so the partial coefficient is identifiable.
The fitted slope is descriptive of these four listings; no causal identification assumptions are stipulated.
Final Answer
Adjusted floor-area coefficient: +$10 per m² per month. Unadjusted area-only slope: $0 per m² per month. The full fitted equation is \(\text{rent}=1{,}400+10\cdot\text{area}-200\cdot\text{distance}\).