# real data where x causes y and both variables also share correlated unobserved causes

Is there an example in 'causality' discussing a case where 2 variables: x causes y; and at the same time there is correlation between their unobserved causes?

I can think of syntetic examples like:

ug=matrix(nrow=N,c(0.5,0.4,0.4,0.5))
d=matrix(nrow = 500,ncol = 2)
noise=mvrnorm(n=500,rep(0,N),ug)
d[,1]=noise[,1]
d[,2]=sin(d[m,1])+noise[,2]
plot(d[,1],d[,2])
points(d[,1],sin(d[,1]),col="red")


x causes y, and at the same time their unobserved causes have correlation...

My question is if this is discussed in causality and/or if there is real (non-syntetic) data behaving like this.

So, let's suppose we have a causal diagram like this:

The $$X\to Y$$ arrow means $$X$$ definitely causes $$Y,$$ and the same for $$U_1$$ causing $$X$$ and $$U_2$$ causing $$Y.$$ The dotted line between $$U_1$$ and $$U_2$$ stands for an unknown causal relationship, but a correlation at the very least. Now, by assumption, $$U_1$$ and $$U_2$$ are unobserved. So, as it stands, we cannot be certain that the data we have and the calculations we perform are capturing the true causal relationship between $$X$$ and $$Y.$$

There are at least a couple possible solutions. One method is the front door adjustment, which goes like this: suppose you could identify and insert a mediator variable $$Z$$ in-between $$X$$ and $$Y,$$ like this:

Then the front-door adjustment formula is

$$\newcommand{\doop}{\operatorname{do}} P(y|\doop(x))=\sum_zP(z|x)\sum_{x'}P(y|x',z)\,P(x').$$

This allows you to find the true causal effect of $$X$$ on $$Y.$$

Another approach is to use an instrumental variable, which we tack on to the back, like this:

What you would then do is:

We regress $$X$$ and $$Y$$ on $$Z$$ separately, yielding the regression equations $$y=r_1z+\varepsilon$$ and $$x=r_2z+\varepsilon,$$ respectively. Since $$Z$$ emits no backdoors, ... $$r_1$$ equals the total effect of $$Z$$ on $$Y...$$ Therefore, the ratio $$r_1/r_2$$ provides the desired coefficient... - from Causal Inference in Statistics, A Primer, by Pearl, Glymour, and Jewell.

Poor diet causes poor health. Poverty is a common cause of both.

Chronic obstructive pulmonary disease causes heart disease. Smoking is a cause of both.

The phenomenon you point to is common.

Yes, this happens quite often in clinical data. To give an example, more severe observed disease status (x) will often cause an increase in treatment time (y). However, both observed disease status and treatment time are generally positively correlated with unobserved disease severity measures.