\section{Additional Examples}
\label{sec:app_experiments}
%This section provides details of the data generating mechanisms used for synthetic experiments, parameterization of causal effects and graphs associated with each experiment.
We provide in this section additional examples to illustrate the proposed bounding procedure.


\begin{example} In this example we illustrate the quantities mentioned in \Cref{prop:lowerbound,prop:upperbound} by applying these propositions to bound $Q[Y]$ from $Q[W,X,Z,Y]=P(w,x,z,y)$ given the PAG $\1P$ in \Cref{fig:steps}. Using the notation in \Cref{prop:lowerbound,prop:upperbound}, we can write $\W = \texttt{PossAn}(Y)_{\1P_{W,X,Z,Y}} = \{W,X,Z,Y\}$ and $\R = \{W,X,Z,Y\}\backslash \{Y\} = \{W,X,Z\}$ which can be partitioned into $\A=\{W\}, \B=\{X,Z\}$ since $\{W\}$ is not a possible descendant of any possible spouse of $Y$ in $\1P$. $\texttt{PossPa}(\W) \backslash \texttt{PossPa}(Y) = \{W\}$. The lower bound then follows by replacing these variables in the statement of the lower bound to get,
\begin{align}
    Q[Y] \geq \max_{w} \frac{Q[W,X,Z,Y]}{\sum_{z,x,y}Q[W,X,Z,Y]}.
\end{align}
Equivalently $P_{x, w, z}(y) \geq \max_{w} P(z,y,x\mid w)$. Moreover,
\begin{align}
    Q[Y] \leq 1 +\min_{w} \left\{\frac{Q[W,X,Z,Y]}{\sum_{z,y,x}Q[W,X,Z,Y]} - \sum_y \frac{Q[W,X,Z,Y]}{\sum_{z,y,x}Q[W,X,Z,Y]}\right\}\nonumber,
\end{align}
or equivalently,
\begin{align}
    P_{x, w, z}(y) \leq \min_{w} \{P(z,y,x\mid w) - P(z,x\mid w)\} + 1.
\end{align}
We could show, moreover, that these bounds are tighter than the natural bounds as $P(y,z,x,w) = P(y,z,x \mid w)P(w) \leq P(y,z,x \mid w) \leq \max_w P(y,z,x \mid w)\leq P_{z,x,w}(y)$ and as,
\begin{align}
    P(y,z,x,w) - P(z,x, w) + 1 &\geq 1 + \sum_w P(y,z,x,w) - P(z,x, w) \nonumber\\
    &= \sum_w P(w) \Big\{P(y,z,x\mid w) - P(z,x\mid  w) + 1\Big\}\nonumber\\
    &\geq \sum_w P(w) \min_w\Big\{P(y,z,x\mid w) - P(z,x\mid  w) + 1\Big\}\nonumber\\
    &= \min_w\Big\{P(y,z,x\mid w) - P(z,x\mid  w)\Big\} +1.
\end{align}\QED
\end{example}


\begin{example} \label{ex:complex_graph} Consider the query $P_{x_1,x_2}(y)$ given the PAG $\1P$ in \Cref{fig:examples_app:a}. We will proceed by decomposing the query into smaller components and either uniquely identify or bound each term as appropriate with \Cref{alg:partialid}. Using the $c$-factor notion $Q[\cdot]$, we have that $P_{x_1,x_2}(y) = \sum_{a,b,c} Q[Y,A,B,C]$ by line 1 since the set $\{Y,A,B,C\}$ is ancestral in the sub-graph $\1P_{\{Y,A,B,C,W\}}$ (see also \Cref{lem:ancestor_id} in \Cref{sec:app_proofs} for further justification). Calling \texttt{IDP} on this component with $\T=\V$ and $\C=\{Y,A,B,C\}$, a first simplification can be done in line 6 as the if condition is triggered for $\B=\{X_1\}$ which updates $\T$ to $\T=\{Y,A,B,C,W,X_2\}$. Successive calls to \texttt{IPD} trigger line 9, where we find in a first instance that $Q[Y,A,B,C] = Q[A]Q[Y,B,C]$ as the region of $A$ in $\1P_{\{A,Y,B,C\}}$ is $\1R^{\{A,Y,B,C\}}_A = \{A\}$, the region of $\{Y,B,C\}$ in the same sub-graph is $\1R^{\{A,Y,B,C\}}_{\{Y,B,C\}} = \{Y,B,C\}$, and have an empty intersection. In a second instance, we find that $Q[Y,B,C] = Q[Y]Q[B,C]$ where $Q[B,C] = \sum_{x_1,w} Q[W,X_1,B,C]$. $Q[W,X_1,B,C]$ is identifiable from $\1P$ in line 7 of \Cref{alg:partialid} which returns $P(c\mid a,x_1,b,w)P(x_1,b,w)$. 

Finally, $\C$ reduces to $\C=\{Y\}$ after these simplifications. With an additional call to \texttt{IDP} we find that $\T$ could be reduced to $\T=\{X_2,Y\}$ in line 6, and further that $Q[X_2,Y] = P(y \mid x_2,b,c)P(x_2)$. Now, no more simplifications could be done as calls to lines 6 and 9 in \Cref{alg:partialid} fail, due to the potential presence of an unobserved confounder between $X_2$ and $Y$. In line 16, we therefore proceed to bound $Q[Y]$ from $Q[X_2,Y]$ using \Cref{prop:lowerbound,prop:upperbound}.
We find that,
\begin{align}
    Q[Y,X_2] \leq Q[Y] \leq Q[Y,X_2] - \sum_y Q[Y,X_2] + 1
\end{align}
Finally, putting each term in the expression $P_{x_1,x_2}(y)=\sum_{a,b,c} Q[A]Q[Y]Q[B,C]$ together we have the lower bound is: 
\begin{align}
    P_{x_1,x_2}(y) \geq \sum_{a,b,c}P(y \mid x_2,b,c)P(x_2)P(a \mid x_1)\sum_{w,x_1}P(w,b,x_1)P(c \mid a,w,b,x_1),
\end{align}
and the upper bound is:
\begin{align}
    P_{x_1,x_2}(y) \leq \sum_{a,b,c}\left(P(y \mid x_2,b,c)P(x_2) + 1 - P(x_2)\right) P(a \mid x_1)\sum_{w,x_1}P(w,b,x_1)P(c \mid a,w,b,x_1).
\end{align}\QED
\end{example}

% \begin{figure}[t]
% \vspace{-0.1cm}
% \captionsetup{skip=5pt}
% \centering
%     \begin{tikzpicture}[SCM,scale=1]
%         \node (W) at (0,0) {$W$};
%         \node (X1) at (1.2,0) {$X_1$};
%         \node (A) at (2.4,0) {$A$};
%         \node (B) at (3,1) {$B$};
%         \node (C) at (3.6,0) {$C$};
%         \node (Y) at (4.8,0) {$Y$};
%         \node (X2) at (3.6,-0.7) {$X_2$};
        
%         \path [arrows = {Circle[fill=white]->}] (W) edge (X1);
%         \path [arrows = {Circle[fill=white]->}] (X2) edge (Y);
%         \path [->] (X1) edge node[above] {\scriptsize{$v$}} (A);
%         \path [->] (A) edge node[above] {\scriptsize{$v$}} (C);
%         \path [->] (C) edge node[above] {\scriptsize{$v$}} (Y);
%         \path [->] (B) edge node[above] {\scriptsize{$v$}} (Y);
%         \path [conf-path] (X1) edge[out=75,in=165] (B);
%         \path [conf-path] (B) edge[out=-90,in=145] (C);
%     \end{tikzpicture}
% \caption{$\1P$}
% \label{fig:graph_idp}
% \end{figure}

\begin{figure*}[t]
\centering
\hfill
\begin{subfigure}[t]{0.3\linewidth}\centering%(d)
  \begin{tikzpicture}[SCM,scale=1]
        \node (W) at (0,0) {$W$};
        \node (X1) at (1.2,0) {$X_1$};
        \node (A) at (2.4,0) {$A$};
        \node (B) at (3,1) {$B$};
        \node (C) at (3.6,0) {$C$};
        \node (Y) at (4.8,0) {$Y$};
        \node (X2) at (3.6,-0.7) {$X_2$};
        
        \path [arrows = {Circle[fill=white]->}] (W) edge (X1);
        \path [arrows = {Circle[fill=white]->}] (X2) edge (Y);
        \path [->] (X1) edge node[above] {\scriptsize{$v$}} (A);
        \path [->] (A) edge node[above] {\scriptsize{$v$}} (C);
        \path [->] (C) edge node[above] {\scriptsize{$v$}} (Y);
        \path [->] (B) edge node[above] {\scriptsize{$v$}} (Y);
        \path [conf-path] (X1) edge[out=75,in=165] (B);
        \path [conf-path] (B) edge[out=-90,in=145] (C);
    \end{tikzpicture}
\caption{}
\label{fig:examples_app:a}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.3\linewidth}\centering%(d)
  \begin{tikzpicture}[SCM,scale=1]
        \node (C) at (0,0) {$C$};
        \node (L) at (1,0) {$L$};
        \node (D) at (2,0) {$D$};
        \node (T) at (3,0) {$T$};
        \node (A) at (1.5,-0.7) {$A$};
        \node (P) at (2.5,-0.7) {$P$};

        \path [->] (C) edge (L);
        \path [->] (L) edge (D);
        \path [->] (T) edge (D);
        \path [->] (A) edge (L);
        \path [->] (A) edge (D);
        \path [->] (P) edge (D);
        \path [conf-path] (L) edge[out=45,in=135] (D);
    \end{tikzpicture}
\caption{}
\label{fig:examples_app:b}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.3\linewidth}\centering%(d)
  \begin{tikzpicture}[SCM,scale=1]
        \node (C) at (0,0) {$C$};
        \node (L) at (1,0) {$L$};
        \node (D) at (2,0) {$D$};
        \node (T) at (3,0) {$T$};
        \node (A) at (1.5,-0.7) {$A$};
        \node (P) at (2.5,-0.7) {$P$};

        \path [arrows = {Circle[fill=white]->}] (C) edge (L);
        \path [arrows = {Circle[fill=white]->}] (L) edge (D);
        \path [arrows = {Circle[fill=white]->}] (T) edge (D);
        \path [arrows = {Circle[fill=white]->}] (A) edge (L);
        \path [arrows = {Circle[fill=white]->}] (A) edge (D);
        \path [arrows = {Circle[fill=white]->}] (P) edge (D);
        \path [arrows = {Circle[fill=white]->}] (C) edge[out=45,in=135] (D);
    \end{tikzpicture}
\caption{}
\label{fig:examples_app:c}
\end{subfigure}\hfill
\hfill\null
  \caption{(\subref{fig:examples_app:a}) PAG for \Cref{ex:complex_graph}, (\subref{fig:examples_app:b}) causal diagram and (\subref{fig:examples_app:c}) PAG for \Cref{ex:lung_cancer}.}
  \label{fig:examples_app}
\end{figure*}

\begin{example}[Applications in public health] \label{ex:lung_cancer} As an additional example, we consider an adaptation of the Lung Cancer diagram from \citep{lauritzen1988local}, shown in \Cref{fig:examples_app:b}. We are interested in determining the effect of a chemotherapy treatment ($C$) for lung cancer ($L$) on dyspnoea ($D$), \textit{i.e.} breathing difficulty, in the context of other factors such as smoking (unobserved and represented with a bi-directed edge), pollution ($P$), age ($A$), and Tuberculosis ($T$). For this experiment, we generate $1,000$ samples from a compatible SCM. 

The PAG inferred from data is given in \Cref{fig:examples_app:c}. Given the uncertainty in the underlying causal relations between variables, we could only partially identify the causal effect of interest in this example with \Cref{alg:partialid}. The first step is to leverage the possible ancestors of $D$ to write: $P(d \mid do(c)) = \sum_{l,a,p,t}Q[D,L,A,P,T]$. A call to \texttt{PID} with this term reveals that no further simplification can be made, and a as a consequence we proceed to bound $Q[D,L,A,P,T]$ from $Q[\V$ with \Cref{prop:lowerbound,prop:upperbound}. We obtain that,
\begin{align}
    P(d \mid do(c) \geq \sum_{l,a,p,t}Q[D,L,A,P,T,C] = P(d,c)
\end{align}
and that,
\begin{align}
    P(d \mid do(c) \leq\sum_{l,a,p,t}Q[D,L,A,P,T,C] + 1 - \sum_{l,a,p,t}Q[C,L,A,P,T]= P(d,c) + 1 - P(c)
\end{align}
These expressions imply that knowledge of the PAG and observational data license the following approximate bounds,
\begin{align}
    P(d=1 \mid do(c=1))\in [0.5087, 0.9353].
\end{align}
As a contrast, if we were to evaluate the causal effect assuming the causal diagram in \Cref{fig:examples_app:b}, the causal effect can be approximated to be $P(d=1 \mid do(c=1))=P(d=1 \mid c=1)= 0.7775$. 
\QED
\end{example}


The Lung Cancer data is generated from the following SCM compatible with the consensus causal diagram given in \Cref{fig:examples_app:b}. In the following, $\I \{\cdot\}$ is the indicator function that equals $1$ if the statement in $\{\cdot\}$ is true, and equal to $0$ otherwise. $P(u_{C}),P(u_{L}),P(u_{A}),P(u_{D}),P(u_{P}),P(u_{T})$ are given by independent Gaussian distributions with mean 0 and variance 1, and each observation $(c, l, a, d, p, t)$ generated from exogenous variables using the structural assignments: $c \leftarrow \I\{u_{C} < 0\}, l \leftarrow \I\{c - u_{L} > 0\}, a \leftarrow \I\{u_A > 0\}, d \leftarrow \I\{l + a - 2u_{d} + 0.2p - 0.3T > -0.5\}, p \leftarrow \I\{u_{P} > 0\}, t \leftarrow \I\{u_{T} > 0\}$. The ground truth value of the causal effect is given by setting $c\leftarrow 1$ and evaluating $P(d=1)$ under this updated model.

