OLS Slope After Rotating Two Independent Uniforms by 45 Degrees

Reported in interviews at The Voleon Group

Problem statement

Let $x \sim \text{Uniform}[-2, 2]$ and $y \sim \text{Uniform}[-1, 1]$ be independent random variables. All slopes below are population slopes, that is, the slope an ordinary least squares fit converges to as the sample size grows.

(a) You regress $y$ on $x$ with an intercept. What is the OLS slope?

(b) Now rotate every data point $(x, y)$ counterclockwise by $45$ degrees about the origin, giving new coordinates $$x' = \frac{x - y}{\sqrt{2}}, \qquad y' = \frac{x + y}{\sqrt{2}}.$$ You regress $y'$ on $x'$ with an intercept. What is the slope now? State also what the slope would be for a clockwise $45$ degree rotation.

Show hint

Rather than working with full densities, which summary quantities of a joint distribution are enough to pin down a population regression line?

Relevant roles: Data Scientist, Applied Scientist and ML Engineer.

Related free problems