# Thread: Inverting a Regression doesn't yield symmetric results( !)

1. ## Inverting a Regression doesn't yield symmetric results( !)

I have two vectors X and Y
I produce one regression line y = mx + c regressing Y on X and another x = ny + d regressing X on Y
Intuitively I would expect n = 1/m and d = -c/m but this is not the case
The R^2s are exactly the same
Without rigorous math can someone explain to me intuitively why this is so?
Thanks, HB

2. ## Re: Inverting a Regression doesn't yield symmetric results( !)

I believe the problem is that (unless R^2 = 1) the lines are not y = mx + c and x = ny +d but y = mx + c + e1 and x = ny + d + e2, where the e are errors.
If you have R you can see this this way
x <- c(1,3,6,7,9)
y <- 3*x + 2
m1 <- lm(y~x)
m2 <- lm(x~y)
coef(m1)
coef(m2)

where a strict relationship holds. But add some error
y2 <- 3*x + 2 + rnorm(5)
and re-run
m3 <- lm(y2~x)
m4 <- lm(x~y2)

and the relationship fails

3. ## Re: Inverting a Regression doesn't yield symmetric results( !)

Thanks a lot! - I did some work on this one and it turns out that the two necessary conditions are R^2 = 1 and sigma_x = sigma_y.