# Identification in randomized experiments

Suppose, I have randomly assigned individuals to one of two treatment. $T$ is a treatment dummy. My treatment influences the probability that a binary variable $E$ takes the value one. Denote this probability as $P(E=1)$. In turn, this change in $P(E=1)$ impacts the outcome $Y$. Importantly, the outcome also can be directly affected by the treatment. So we have the following causal chains:

Causel chain one: $T-> P(E=1)->Y$

Causel chain two: $T->Y$.

Is there any possibility to identify the direct effect $T->Y$ net of the indirect effect via $P(E=1)$?

Try estimating the following:

$$\hat{Y}=\beta_0+\beta_1T+\beta_2E+\beta_3E\cdot T$$

Notice that there are four possibilities:

1. $E=0$, $T=0$;$\rightarrow \hat{Y}=\beta_0$
2. $E=0$, $T=1$;$\rightarrow \hat{Y}=\beta_0$+$\beta_1$
3. $E=1$, $T=0$;$\rightarrow \hat{Y}=\beta_0$+$\beta_2$
4. $E=1$, $T=1$;$\rightarrow \hat{Y}=\beta_0$+$\beta_1$+$\beta_2$+$\beta_3$

If you make the assumption that $E$ does not affect the treatment dummy $T$, then $\beta_3$ is the difference in difference estimate of the effect of $T$ on $Y$. To see this, consider: $$\beta_3=((\beta_0+\beta_1+\beta_2+\beta_3)-(\beta_0+\beta_1))-((\beta_0+\beta_2)-(\beta_0))$$ This is the difference in the effect when $T=1$, minus the difference in the effect when $T=0$... what's left is the effect of $T$.

https://en.wikipedia.org/wiki/Difference_in_differences