# Positive correlation and negative regressor coefficient sign

Is it possible to obtain a positive correlation between a regressor and a response (+0,43) and, after that, obtain a negative coeficient in the fitted regression model for this regressor?

I'm not talking about changes in the sign of the regressor among some models. The coeficient sign always remain.

Could the remaining variables of the fitted model influence in the changing of the sign?

-
You will find a similar question and answers here : stats.stackexchange.com/questions/33888/… – JDav Aug 11 '12 at 22:48

Both @Henry, and @JDav are pointing you in the right direction (+1 to each). However, I'm very visual and it helps me if I can see how this works. In that respect, here's a quick plot in which the first variable is confounded with group membership. If the groups are ignored, the correlation coefficient is positive (as can be seen in the figure), but in a multiple regression, $\beta_{x1}=-1$, albeit with different intercepts for the three groups.