Can a confounding factor hide a possible causal relationship? (as opposed to find a spurious one) I'm a rookie with statistics, and I'm struggling to understand this:


*

*it is well known that a confounding factor can cause a spurious association, leading to rejecting a true null hypothesis (i.e. due to the confounding factor Z, I could conclude that there is a causal relationship between X and Y, while one is not there)

*the question is: can the opposite also be true? I.e. can a confounding factor lead to failing to reject a false null hypothesis? (i.e. somehow 'masking' a possibly existent causal association.) If yes, what would be a convincing example?

 A: First, I think you are mixing the usage of "correlation" and "causal relationship". They are different things. To discuss the differences, and how to find "causal relationship", we need a lot of efforts. 
Here I will only answer if a confounding variable can hide correlation.

Yes, here is an intuitive example (data is generated by y = c(runif(100), runif(100)+2), x = seq_along(y) in R): 
We have x, y and the group variable. The group information is represented as a color of the points.


*

*If we do not know the group / build a regression model using all data, we can say, x and y are positively correlated.

*If we use group information / build a regression model on each group. we will say x and y have almost no correlation.



A: Yes
Rephrasing the opposite of a confounder: It is definitely possible that an unobserved variable yields the impression that there is no relationship, when there is one.

Confounding usually refers to a situation where an unobserved variable yields the illusion that there exists a relationship between two variables where there is none:

This is a special case of omitted-variable bias, which more generally refers to any situation wherein an unobserved variable biases the observed relationship:

It's easy to imagine a scenario where this would have a canceling effect on the estimate instead:

(I wrote $\rho=0$ for the illustration, but the unobserved relationship does not have to be linear.)
You could call this phenomenon omitted-variable bias, cancellation, or masking. Confounding usually refers to the kind of causal relationship shown in the first figure.
A: Following on existing answers, I wanted to give a concrete example. Imagine trying to figure out if the gas pedal affects the speed of a car. You observe how far the gas pedal is pressed and how fast the car is going at various times and see no correlations, so we conclude there's no causal effect between them. However, what we are missing is the fact that the car is going up and down hills and the gas often has to be floored when the car is going slowly up a hill. If we knew the slope of the road, we could control for that and find the true causal relationship.
This is an example of the last diagram of Frans's answer.
This example is even clearer if you try to associate the gas pedal to acceleration, rather than speed. The car's total acceleration will be (gas pedal) - (hill slope). Supposing you have cruise control on, then the cruise control will try to keep acceleration right around zero. So the gas will be set to cancel out the slope of the hill and will be entirely uncorrelated to the acceleration (which will be dominated by the changes in slope that the cruise control has yet to compensate for).
