ACE under Known Causal Structure
Intro: Simpson's Paradox

Let
- Z=1: being male
- X=1: taking the drug
- Y=1: recovering
The CBN is

We are interested in P(Y=1∣do(X=1))−P(Y=1∣do(X=0)) which is the ACE. The CBN gives
P(Z=z∣do)=P(Z=z)P(X=1∣do)=1P(Y=y∣X=x,Z=z,do)=P(Y=y∣X=x,Z=z)
We need to use them to figure out P(Y=1∣do(X=1))−P(Y=1∣do(X=0)).
P(Y=1∣do(X=1))=P(Y=1∣X=1,do)=z∑P(Y=1∣X=1,Z=z,do)P(Z=z∣X=1,do)=z∑P(Y=1∣X=1,Z=z)P(P=z∣do)=z∑P(Y=1∣X=1,Z=z)P(P=z)
The first line is because P(X=1∣do(X=1))=1, so given X=1 doesn't change anything. And we reach the last line because the items can be learned from data, i.e. identifiable.
Generally, we have
The Causal Effect Rule
Given a graph G in which a set of variables PA are designated as the parents of X, the causal effect of X on Y is given by
P(Y=y∣do(X=x))=z∑P(Y=y∣X=x,PA=z)P(PA=z)=z∑P(X=x∣PA=z)P(X=x,Y=y,PA=z)
where z ranges over all the combinations of values that the variables in PA can take.