# Coefficient in linear regression changes drastically if additional variables are added. Why? [duplicate]

n <- 100
x2 <- 1 : n
x1 <- .01 * x2 + runif(n, -.1, .1)
y = -x1 + x2 + rnorm(n, sd = .01)
summary(lm(y ~ x1))$coef Coefficients (all significant): (Intercept): 1.618 x1: 95.854 summary(lm(y ~ x1 + x2))$coef

Coefficients (all significant): (Intercept): 0.0003683 x1: -1.0215256 x2: 1.0001909

How come the coefficients from x1 are so different in the two models? In our lecture we just got the image

but no good explanation. I prefer an intuitive explanation if possible. Thanks.

• There are many, many good and intuitive explanations of this phenomenon here already. Please search our site using keywords that include combinations of "multiple regression," "significant," "variable", "change", etc. By doing this I quickly found one thread with an explanation at stats.stackexchange.com/questions/31841, but there are many others you might want to read, too. – whuber Jul 25 '15 at 15:19
• I had, for 30min. Then I gave up. Maybe I used the wrong search key word. – Make42 Jul 25 '15 at 15:41