How to derive the size of a simple bias in a mediation setting? Consider the following DAG which shows the direct and indirect effect of $U$ on $Y$.
The total effect of $U \rightarrow Y$ is simply $(2\times4) + 3 = 11$.
I am looking for the derivation of the biased effect of $A \rightarrow Y$.
When I run simulation I get a biased effect of about 5.5
How can I retrieve mathematically this 5.5?

# R simulation

n = 100000
u = rnorm(n, 0, 1)
a = u*2

y = 3*u + 4*a

lm(y ~ a) # biased effect
lm(y ~ u) # total effect
lm(y ~ a + u) # correct effects


2 ways to compute the bias effect, which is what I observe from the simulation, I worked out but that do not make sense to me why it works. Is there a general formula to compute expected bias?

*

*Divide the total effect of $U$ on $Y$, by the path $U \rightarrow A$, $\frac{11}{2}=5.5$


*Let's label the paths: $U \rightarrow A = a$, $A \rightarrow Y = b$, and $U \rightarrow Y = c$, then we can compute the bias with: a + ($\frac{c}{b}$), $4 + \frac{3}{2} = 5.5$
 A: The OLS coefficient is the ratio of covariance to variance. That is, let
$$
y = \beta a + \nu.
$$
Then $\beta = \frac{Cov (y,a)}{Var(a)} = \frac{Cov(11u,2u)}{Var(2u)} = \frac{22}{4} \frac{Var(u)}{Var(u)} = 5.5$.
(We can skip the intercept as both variables have mean 0)
More details for example here: https://jrnold.github.io/intro-methods-notes/regression-anatomy.html
A: We start with this
\begin{equation}
\begin{split}
U &= 1 \\
X &= 2 U \\
Y &= 3 U + 4 X \\
\end{split}
\end{equation}
Re-arranging the equation we can derive the bias like this (we can call $X'$ the biased effect of $X$)
\begin{equation}
\begin{split}
Y &= 3 U + 4 X \\
Y - 4 X &= 3 U \\
Y - 4 \underbrace{X}_{2U} &= 3 U \\
Y - 4 \times 2 U &= 3 U \\
Y - 4 &= \frac{3 U}{2 U} \\
Y  &= 4 +  1.5  \\
Y  &= 5.5 X' \\
\end{split}
\end{equation}
We could derive a formula with a general DAG like this

\begin{equation}
Y = \beta + \frac{\delta}{\alpha}
\end{equation}
We can theoretically predict the size of a spurious association in a DAG like this with this formula

$\beta=0$
\begin{equation}
Y = \frac{4}{2} X'
\end{equation}
It works!
n = 1000
u = rnorm(n, 0, 1)
x = 2*u + rnorm(n, 0, 0.01)
y = 4*u + rnorm(n, 0, 0.01)

lm(y~x)
# Spurious association of 2!

