# Average treatment effect: counterfactual and graphical derivation

I have some (shameful) doubts about the Average Treatment Effect (ATE), also known as Average Causal Effect (ACE). In this setting, I am interested in a binary exposure/treatment variable A, a single binary confounder variable W, and an outcome variable Y. The Directed Acyclic Graph (DAG) for this problem is shown below.

Then, the ATE is defined as:

$$\Psi = \mathop{\mathbb{E}} [Y(1)] - \mathop{\mathbb{E}} [Y(0)],$$

where $$\mathop{\mathbb{E}} [Y(a)]$$ is the expected value of the outcome were we to set A=a for everyone in our population.

The next step would be to provide the identification conditions so that we can identify this parameter from the observed data. Let's assume they hold. In the literature/lecture notes, I found two derivations of what I believe is generally known as the g-formula.

## Derivation 1: Based on counterfactuals

\begin{align*} \mathop{\mathbb{E}} [Y(a)] & = \mathop{\mathbb{E}} [\mathop{\mathbb{E}} [Y(a)|W=w]] \\ & = \mathop{\mathbb{E}} [\mathop{\mathbb{E}} [Y(a)|W=w,A=a]] \\ & = \mathop{\mathbb{E}} [\mathop{\mathbb{E}} [Y|W=w,A=a]]. \end{align*}

Those steps are essentially based on the consistency and positivity assumptions, and on iterated expectations.

The last step can also be expressed as:

$$\int_{a,w} \mathop{\mathbb{E}} [Y|W=w,A=a] P(A=a|W=w) P(W=w) dAdW.$$

## Derivation 2: Based on a graphical factorization

In other occasions, I saw the following derivation, which is usually based on the factorization implied by the DAG above ($$P(A,W,Y) = P(Y|A,W)P(A|W)P(W)$$):

\begin{align*} \mathop{\mathbb{E}} [Y] & = \mathop{\mathbb{E}} [f_Y(y,a,w)] \\ & = \sum_{y,a, w} y f(y|a,w)p(a|w)p(w). \\ \end{align*}

If we set A to a, then we can remove the summation over a and f(a|w) in the formula above. The two derivations seem to coincide, as expected.

The issue I have is when the DAG is more complicated and it does not factorize according to $$P(A,W,Y) = P(Y|A,W)P(A|W)P(W)$$. Let's assume we have the following DAG ($$L$$ is a confounder, and $$Z$$ is another, observed node):

We are interested in the estimand $$\mathop{\mathbb{E}} [Y(a)]$$. Following the graphical approach, we would have:

$$\sum_{l,z,a,y} y f(y|a,l) p(a|z,l) p(z|l) p(l),$$

and again we would get rid of the therm $$p(a|z,l)$$. Following the other approach, I would end up with a different identification formula, one that does not have a term for $$Z$$ given $$L$$: what am I doing wrong here? I have some doubts regarding the graphical derivation too, since to identify the effect of $$A$$ on $$Y$$ we need to adjust for $$L$$ only, whereas in my derivation there is also a term for $$Z$$.

• "over a and f(a|w)" should be "a and p(a|w)" I think. Commented Apr 30 at 10:56
• Note that z does not need to be conditioned on in order to satisfy the back door criterion. Conditioning on L is sufficient and collapses to your original example. Are you interested only in the case where we do condition on Z? Commented Apr 30 at 12:31
• @DemetriPananos Now I understand why we can get rid of the term $p(z|l)$. But I keep having a hard time with the other "derivation", based on counterfactuals. Because it seems to be that we cannot incorporate this information unless we re-write the expectation as an integral and plug-in the DAG's factorization... Commented Apr 30 at 12:39
• @wrong_path Can you edit your answer to more clearly demonstrate what you mean in your last comment re: the integral? Commented Apr 30 at 15:24
• In the other derivation does it help to note, right at the beginning, that Y(a) is independent of Z given L? Commented Apr 30 at 15:35

Intervening to do/set a value to $$A$$ removes $$A$$'s incoming arrows. You remove $$P(a | z, l)$$ from the factorization to reflect that fact. Now consider this new post-intervention graph. $$L$$ now d-separates $$Y$$ and $$Z$$, so $$Z$$ is independent of $$Y$$ given $$L$$, so summing only over $$L$$ is sufficient as an adjustment variable.
For identification it's fine to also adjust for $$Z$$. But since $$Z$$ doesn't provide any information that $$L$$ doesn't already provide, it won't make any difference. Concretely, if you write out the sums, and rearrange you'll find a $$\sum^Z P(Z \mid L)$$ term that is the same whatever value of $$A$$ you plug in.