# Reversing a linear regression — theoretical case

Suppose I fit a linear model where Y ~ X1 + X2 + error. This model performs quite well. Now suppose I want to reverse this and estimate X1 and X2 given that I have observed Y.

I'm curious what is the most appropriate way to do this? Is it fitting two regressions where one of the variables (either X1 or X2) is latent? Is it some sort of parameter grid search where I have X1 ~ Y + X2 for a fixed X2 and I do a grid search over X2? (and then I reverse it and do the same for X1)?

• Let's consider a simpler problem. Imagine we had no noise at all, so we had an exact equation like $y=a + b x_1 + c x_2$. For any given value of $y$, say $y=10$, there's an infinite number of possible pairs of ($x_1,x_2)$ solutions that lie along a line (the one that's formed by the intersection of the two planes $y=a + b x_1 + c x_2$ and $y=10$). If you specify one, you can work out the other: $10=a + b x_1 + c x_2 \implies x_2=(10-a-b x_1)/c$. Is the line $a-10 + b x_1 + c x_2 =0$ the kind of "solution" you're after here? – Glen_b -Reinstate Monica Jan 14 '18 at 2:45