# Negative correlation coefficient but positive regression coefficeint [duplicate]

In one of my research projects, I found a negative correlation between $X$ (a regressor of interest) and $Y$ (an outcome variable). In the regression model, I found that the coefficient of $X$ is positive after controlling for other variables in the regression model.

What could be the explanation of the negative correlation in the unadjusted model? I expected that a negative correlation would yield a negative regression coefficient in the multivariate model.

• I would prefer holding this question open since it pertains to a specific phenomenon about what happens to the sign of variables after multivariate adjustment. I agree based on the problem description there's a lack of understanding about how the estimated effect changes... both geometrically and practically. But the changing of direction of effect refers to a specific phenomenon in regression analysis which was not mentioned in the excellent answer from @gung in the duplicate post. – AdamO Jul 10 '15 at 19:51

$$\beta_{OLS} = \rho \frac{\mbox{sd} (Y) }{\mbox{sd}(X)}$$
Where the $\rho$ designates the correlation between $X$ and $Y$ and the $\mbox{sd}(\cdot)$ operator is the root of the sample variance which is always positive.
When you control for other variables in a multivariate regression model, the sign of this effect-of-interest may change. The reason for this may be because of spurious data structure and correlation between factors. However, if the control variable is a confounder: meaning that it is causally related to the outcome of interest and bears some association with your regressor of interest ($X$), then this is an example of Simpson's Paradox.