# Can a variable become statistically significant after the addition of another variable? [duplicate]

I am doing forward stepwise logistic regression. I have heard that its common for a previously statistically significant variable to become not statistically significant when one or more variables are introduced into the model. However, I have never heard of the opposite.

This is my case right now. The first variable in my model was $x_1$ (by lowest p-value), the second variable introduced was $x_2$. What's interesting is that $x_2$ is not statistically significant when it is modelled with Y alone. I am using R to do this though, I think this more of statistics question.

Consider this simple example: Think of a case were $y$ is a set of random real-numbers. Let $x_1$ contain the pre-coma digit (i.e. $x_1=floor(y)$) and $x_2$ the post-comma digits (i.e. $x_2=y-floor(y)$)
Then when you regress $y$ linearly on $x_2$ alone you will most likely not find a relationship. Once you control for the pre-comma digit however, it does. Together $x_1$ and $x_2$ predict $y$ perfectly.