Confidence intervals for causal effects in sequential decision making


Abstract

We derive confidence intervals and confidence sequences for causal effects in situations where the back-door or front-door criteria are applicable. Our tightest confidence intervals hold in the standard setting where the training data consists of IID observations over a system described by a given causal diagram. When interventions are allowed to depend on the past data, our confidence intervals become wider and involve a term coming from the law of the iterated logarithm, even where the number of observations is known in advance. In the sequential setting where the number of observations is not given, our confidence intervals, arranged into a confidence sequence for causal effects, involve more iterated logarithm terms and become even wider.

The version of this paper at http://gtfp.net (Working Paper 68) is updated most often.

1 Introduction↩︎

A major limitation of many results in causal inference is that they assume, implicitly or explicitly, IID (independent and identically distributed) observations over a causal system. This limitation is shared by [1], where we derive prediction sets in situations covered by the back-door and front-door criteria [2] (one section of [1] goes beyond the IID picture but only slightly). It was noted in [3] that the limitation can be easily overcome by applying limit theorems of probability theory, but the results there (such as [3]) are asymptotic. In this paper we derive finite-sample confidence intervals in natural non-IID settings.

We start in Sect. 2 by giving definitions of the causal effect adapted to the back-door and front-door criteria. In Sect. 3 we consider the simplest IID setting giving the narrowest confidence intervals. Limitations of this setting are pointed out in, e.g., [3] and [2].

In Sect. 4 we drop the assumption of IID data, which leads to the appearance of an iterated logarithm term in our confidence intervals. This is developed further in Sect. 5; there we make our confidence intervals anytime-valid, which leads to further iterated logarithm terms.

This paper was motivated by the difficulty of applying the methods developed in [1] to the most natural setting of sequential causal inference (which we called the “strong interpretation” of causal diagrams). The methods of this paper are completely different, and we are targeting confidence intervals rather than prediction sets, which were targeted in [1]. In Sect. 6 we briefly discuss derivation of prediction sets from our confidence intervals, but this is likely to lead to much more conservative prediction sets in the IID setting as compared with [1].

Finally, Sect. 7 concludes and lists some directions of further research.

2 Causal effect↩︎

Figure 1: The basic causal graph of this paper

Our running example will be the causal diagram in Figure 1, which we now use to explain our notation (in which we follow mainly Pearl [2]). The variables, such as \(X\), \(Y\), and \(Z\), in our causal diagrams will always range over finite sets denoted by the corresponding boldface letters, such as \(\mathbf{X}\), \(\mathbf{Y}\), and \(\mathbf{Z}\), and called their domains (equipped with the discrete \(\sigma\)-algebras). However, when talking specifically about the example in Figure 1, we will usually assume that \(\mathbf{X}=\mathbf{Y}=\mathbf{Z}=\{0,1\}\), so that \(X,Y,Z\) are the indicator functions of events.

Let \(P\) be a positive probability measure on \(\mathbf{X}\times\mathbf{Y}\times\mathbf{Z}\) (generating the random variables \(X\), \(Y\), and \(Z\)). Suppose it factorizes according to Figure 1: \[\begin{gather} \label{eq:factor} P(X=x,Y=y,Z=z)\\ = P(Z=z) P(X=x\mid Z=z) P(Y=y\mid X=x,Z=z) \end{gather}\tag{1}\] for all \(x\in\mathbf{X}\), \(y\in\mathbf{Y}\), and \(z\in\mathbf{Z}\). It will be very convenient to use Pearl’s [2] convention and abbreviate \(P(X=x)\) to \(P(x)\), \(P(Y=y)\) to \(P(y)\), etc.; such abbreviated notation will also be used when we have, say, \(\tilde{x}\) or \(x'\) in place of \(x\). We will also often omit mentioning that \(x\in\mathbf{X}\), \(y\in\mathbf{Y}\), etc. With this convention, we can rewrite 1 as \[P(x,y,z) = P(z) P(x\mid z) P(y\mid x,z).\]

Let \(\tilde{x}\in\mathbf{X}\). We use Pearl’s [2] notation \(\mathop{\mathrm{do}}(X=\tilde{x})\), usually abbreviated to \(\mathop{\mathrm{do}}(\tilde{x})\), to signify setting \(X\) to \(\tilde{x}\) (we will define what this means formally only in specific contexts). Let us define, in the context of Figure 1, the causal effect of \(X\) on \(Y\) as \[\label{eq:back} P(y\mid\mathop{\mathrm{do}}(\tilde{x})) := \sum_{z} P(y\mid\tilde{x},z) P(z).\tag{2}\] (The definition in [2] is more general, but it is not our focus in this paper and we will use simpler ad hoc definitions.) The interpretation of 2 (and of causal effects in general) is that it is the probability of \(Y=y\) in the mutilated causal model in which the arrow from \(Z\) to \(X\) in Figure 1 has been removed and \(X\) has been set to \(\tilde{x}\).

The decomposition 1 and these notational conventions generalize to any directed acyclic graph (dag), and Figure 1 can be generalized to the following back-door criterion, which is stated in terms of “blocking”, as defined in [2]. If \(X\), \(Y\), and \(Z\) are disjoint non-empty sets of variables in a dag, \(Z\) is said to satisfy the back-door criterion relative to \((X,Y)\) if, for any \(X'\in X\) and \(Y'\in Y\),

  • no vertex in \(Z\) is a descendant of \(X'\), and

  • \(Z\) blocks every backdoor path from \(X'\) to \(Y'\), i.e., every path between \(X'\) and \(Y'\) that contains an arrow into \(X'\)

[2]. If the back-door criterion is satisfied, the causal effect can still be defined as 2. However, now the summing \(\sum_z\) over \(z\) in 2 means summing over all possible values of the variables in \(Z\): \[\sum_z := \sum_{z_1\in\mathbf{Z}^1} \dots \sum_{z_k\in\mathbf{Z}^k},\] where \(\mathbf{Z}^i\) is the domain of \(Z^i\), \(i=1,\dots,k\), and \(Z^1,\dots,Z^k\) are the elements of \(Z\), \(Z=\{Z^1,\dots,Z^k\}\). Moreover, \(\tilde{x}\) should specify the values for all variables in \(X\). In the theorems below we will use the notation \[\label{eq:Z} \left|\mathbf{Z}\right| := \left|\mathbf{Z}^1\right| \dots \left|\mathbf{Z}^k\right|.\tag{3}\]

Another set of conditions that allows a natural definition of causal effects is known as the front-door criterion. Now let \(X\) and \(Y\) be variables and \(Z\) be a non-empty set of variables not containing \(X\) and \(Y\). Then we say that \(Z\) satisfies the front-door criterion relative to \((X,Y)\) if

  • \(Z\) intercepts all directed paths from \(X\) to \(Y\), and

  • there is no unblocked backdoor path from \(X\) to \(Z\), and

  • all back-door paths from \(Z\) to \(Y\) are blocked by \(X\)

[2]. In this case the causal effect is defined by \[\label{eq:front} P(y\mid\mathop{\mathrm{do}}(\tilde{x})) := \sum_z P(z\mid\tilde{x}) \sum_x P(y\mid x,z) P(x)\tag{4}\] [2].

It is very important (but does not concern us in this paper) that some of the variables in the causal dag may be unobservable; it’s fine as long as these variables do not enter expressions for causal effects, such as 2 or 4 .

3 The IID setting↩︎

We start from the most standard setting where the observations before intervention are IID; see, e.g., [2]. Informally, Nature possesses stable causal mechanisms that are organized in the form of a graphical structure. In causal calculus, the structure is a known dag, and the stable causal mechanisms are unknown probability distributions of the variables in the vertices of the dag given their parents. The available observations are generated in the IID fashion. (The IID nature of the observations usually stays implicit, and it appears that in Pearl’s book [2] it is made explicitly only in [2].)

Figure 2: The repeated causal graph

Figure 2 shows \(N\) repetitions of the causal system represented in Figure 1. Let us ignore the cells labelled \(\text{past}_i\), \(i\in\{1,\dots,N-1\}\), for now (formally, we are assuming that these variables take a fixed known value). This composite causal diagram then represents \(N\) IID observations over the base diagram of Figure 1. In this section we are interested in Figure 2 with an arbitrary dag as the base diagram, not necessarily the one in Figure 1. This IID picture will give the narrowest confidence intervals out of those derived in this paper.

The following theorem treats the case of the back-door criterion, and it is proved (as all other results in this paper) in Appendix 8. A confidence interval \([m-h,m+h]\) will be represented in terms of its midpoint \(m\) and half-width \(h\). The number \(N\) of repetitions is fixed, and we set \[\label{eq:number} \# x y := \left|\{n\in[N]:(X_n,Y_n)=(x,y)\}\right|\tag{5}\] (i.e., \(\# x y\) is the number of times \((X_n,Y_n)=(x,y)\)); the analogous notation will be used for sequences other than \(x y\), such as \(x y z\) and \(z\). See 3 for the definition of \(\left|\mathbf{Z}\right|\).

Theorem 1. Let \(\delta>0\), \(\tilde{x}\in\mathbf{X}\), and \(y\in\mathbf{Y}\). The following is a \((1-\delta)\)-confidence interval for the parameter \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) defined by 2 : the midpoint is \[\label{eq:IID-back-1} \sum_z \hat{p}(y\mid\tilde{x},z) \hat{p}(z)\tag{6}\] and the half-width is \[\label{eq:IID-back-2} \left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{4\left|\mathbf{Z}\right|}{\delta}}{2N}} + \sum_z \sqrt{\frac{\ln\frac{4\left|\mathbf{Z}\right|}{\delta}}{2\#\tilde{x} z}},\tag{7}\] where \(\hat{p}(y\mid\tilde{x},z):=\#\tilde{x} y z / \#\tilde{x} z\) is the standard estimate for \(P(y\mid\tilde{x},z)\) and \(\hat{p}(z):=\#z / N\) is the standard estimate for \(P(z)\). (The half-width 7 is understood to be \(\infty\) when \(\#\tilde{x} z=0\).)

In the case of Figure 1 with binary variables, we can replace 7 by \[\label{eq:IID-back-2-toy} 2\sqrt{\frac{\ln\frac{6}{\delta}}{2N}} + \sum_{z\in\{0,1\}} \sqrt{\frac{\ln\frac{6}{\delta}}{2\#\tilde{x} z}}\tag{8}\] (although this does not quite follow from 7 ).

The following is the analogue of Theorem 1 for the front-door criterion.

Theorem 2. Fix \(\delta>0\), \(\tilde{x}\), and \(y\). The following is a \((1-\delta)\)-confidence interval for the parameter \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) defined by 4 : the midpoint is \[\label{eq:IID-front-1} \sum_z \hat{p}(z\mid\tilde{x}) \sum_x \hat{p}(y\mid x,z) \hat{p}(x)\tag{9}\] and the half-width is \[\label{eq:IID-front-2} \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} + \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#\tilde{x}}} + \sum_{x,z} \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#x z}},\tag{10}\] where \[\label{eq:K} K := \left|\mathbf{X}\right|\left|\mathbf{Z}\right|+\left|\mathbf{X}\right|+\left|\mathbf{Z}\right| = (\left|\mathbf{X}\right|+1)(\left|\mathbf{Z}\right|+1) - 1,\tag{11}\] \(\hat{p}(z\mid\tilde{x}):=\#\tilde{x} z / \#\tilde{x}\) is the standard estimate for \(P(z\mid\tilde{x})\), \(\hat{p}(y\mid x,z):=\#x y z / \#x z\) is the standard estimate for \(P(y\mid x,z)\), and \(\hat{p}(x):=\#x / N\) is the standard estimate for \(P(x)\).

For the same size \(\left|\mathbf{Z}\right|\), the accuracy 10 that we have for the front-door criterion appears much worse than the accuracy 7 for the back-door one.

4 The adaptive setting with a fixed horizon↩︎

Under the strong interpretation of Figure 2, considered in this section, each box \(\text{past}_n\) stands for the whole past, including the variables \(X_i\), \(Y_i\), and \(Z_i\), \(i\in[n]\). Now each \(X_{n+1}\), \(n\in[N-1]\), has incoming arrows (not shown explicitly in the figure) from all \(X_i\), \(Y_i\), and \(Z_i\), \(i\in[n]\). (There is also an intermediate “\(Y\)-oblivious interpretation” considered in [1].) As before, we allow repetition of any dag in Figure 2, not just the one in Figure 1.

Our interpretation of Figure 2 is that \(X\) is a decision that has \(Y\) as its result. The decision at step \(n+1\) may depend on the past decisions and past values of \(Y\) and \(Z\). In other words, the decision maker has access to all past observations. In the case of Figure 1, all \(Z_n\) are independent of the past and identically distributed; all \(Y_n\) have the same distribution given \(X_n\) and \(Z_n\), and they are conditionally independent of the past.

For an integer \(n\ge2\), let \(\llfloor n\rrfloor\) be the largest integer of the form \(2^k\), \(k\in\{1,2,\dots\}\), satisfying \(2^k\le n\) (and for \(n<2\), \(\llfloor n\rrfloor\) is defined as, say, 1). We let \(\mathop{\mathrm{lb}}\) stand for binary logarithm \(\log_2\), and we will often use it in the context of \(\mathop{\mathrm{lb}}\llfloor n\rrfloor=\lfloor\mathop{\mathrm{lb}}n\rfloor\) for a positive integer \(n\).

It will be useful to extend the notation 5 and set, e.g., \[\#_m x y := \left|\{n\in[m]:(X_n,Y_n)=(x,y)\}\right|,\] where \(m\) may be different from \(N\). Earlier we defined standard estimates such as \(\hat{p}(y\mid\tilde{x},z):=\#\tilde{x} y z / \#\tilde{x} z\) (and we will refrain from defining \(\hat{p}\) in other similar contexts in the following theorems). We will also need the modification of \(\hat{p}(y\mid\tilde{x},z)\) defined by \[\label{eq:estimate} \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid\tilde{x},z) := \frac{ \left|\left\{ n\in[N]: \#_n\tilde{x} z \le \llfloor\#\tilde{x} z\rrfloor, X_n=\tilde{x}, Y_n=y, Z_n=z \right\}\right| }{\llfloor\#\tilde{x} z\rrfloor}.\tag{12}\] In words, \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid\tilde{x},z)\) is the fraction of the first \(\llfloor\#\tilde{x} z\rrfloor\) observations with \(X_n=\tilde{x}\) and \(Z_n=z\) for which \(Y_n=y\). It is also an estimate of \(P(y\mid\tilde{x},z)\), but it might not use all the available data (however, it uses at least one half of the relevant observations). We will also use the notation \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}\) in other contexts, such as \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(z\mid\tilde{x})\).

Now we have to replace the Hoeffding inequality used in our proofs of Theorems 12 in Appendix 8 by the law of the iterated logarithm, and so we will get our first iterated logarithm term.

Theorem 3. Fix \(\delta>0\), \(\tilde{x}\), and \(y\); the time horizon \(N\) is also fixed. Under the strong interpretation, the following is a \((1-\delta)\)-confidence interval for the parameter \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) defined by 2 : the midpoint is \[\label{eq:core-back-1} \sum_z \hat{p}(z) \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid\tilde{x},z)\tag{13}\] and the half-width is \[\label{eq:core-back-2} \left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{4\left|\mathbf{Z}\right|}{\delta}}{2N}} + \sum_z \sqrt{ \frac{2\ln\mathop{\mathrm{lb}}\llfloor\#\tilde{x} z\rrfloor+\ln\frac{6.6\left|\mathbf{Z}\right|}{\delta}}{2\llfloor\#\tilde{x} z\rrfloor} }.\tag{14}\]

The case \(\#\tilde{x} z\in\{0,1\}\) in 14 requires special treatment; namely, we set \(\ln\mathop{\mathrm{lb}}1:=\infty\), and so 14 is interpreted as \(\infty\) unless \(\#\tilde{x} z\ge2\) for all \(z\).

For the binary case of Figure 1, we can replace 14 by \[\label{eq:core-back-2-toy} 2\sqrt{\frac{\ln\frac{6}{\delta}}{2N}} + \sum_{z\in\{0,1\}} \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#\tilde{x} z\rrfloor+\ln\frac{10}{\delta}}{2\llfloor\#\tilde{x} z\rrfloor}},\tag{15}\] similarly to 8 .

Theorem 4. For any \(\delta>0\), \(\tilde{x}\), \(y\), and \(N\), a \((1-\delta)\)-confidence interval for the causal effect \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) defined by 4 has \[\sum_z \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(z\mid\tilde{x}) \sum_x \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid x,z) \hat{p}(x)\] as its midpoint and \[\label{eq:core-front-2} \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} + \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#\tilde{x}\rrfloor+\ln\frac{3.3K}{\delta}}{2\llfloor\#\tilde{x}\rrfloor}} + \sum_{x,z} \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#x z\rrfloor+\ln\frac{3.3K}{\delta}}{2\llfloor\#x z\rrfloor}}\tag{16}\] as its half-width, in the notation of Theorem 2 (see 11 ).

5 The anytime-valid adaptive setting↩︎

Theorem 3 can be easily extended to the setting in which the time horizon \(N\) is not fixed in advance. Now we would like our results to be anytime valid, with \(N\) ranging over the positive integers \(\{1,2,\dots\}\). Since \(N\) is variable, now we will write \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(y\mid\tilde{x},z)\) in place of \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid\tilde{x},z)\) defined by 12 and add the lower index \(N\) in other similar places; in particular, \(\settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(z):=\#_{\llfloor N\rrfloor}z/\llfloor N\rrfloor\). Remember that a \((1-\delta)\)-confidence sequence is a sequence of confidence intervals whose intersection covers the true parameter value with probability at least \(1-\delta\).

Theorem 5. Let \(\delta>0\), \(\tilde{x}\in\mathbf{X}\), and \(y\in\mathbf{Y}\). The following is a \((1-\delta)\)-confidence sequence for the parameter \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) defined by 2 : the midpoint is \[\sum_z \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(z) \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(y\mid\tilde{x},z)\] and the half-width is \[\label{eq:anytime-back-2} \left|\mathbf{Z}\right| \sqrt{ \frac{2\ln\mathop{\mathrm{lb}}\llfloor N\rrfloor+\ln\frac{6.6\left|\mathbf{Z}\right|}{\delta}}{2\llfloor N\rrfloor} } + \sum_z \sqrt{ \frac{2\ln\mathop{\mathrm{lb}}\llfloor\#_N\tilde{x} z\rrfloor+\ln\frac{6.6\left|\mathbf{Z}\right|}{\delta}}{2\llfloor\#_N\tilde{x} z\rrfloor} }.\tag{17}\]

In the binary case of Figure 1, 17 can be slightly strengthened to \[2 \sqrt{ \frac{2\ln\mathop{\mathrm{lb}}\llfloor N\rrfloor+\ln\frac{10}{\delta}}{2\llfloor N\rrfloor} } + \sum_{z\in\{0,1\}} \sqrt{ \frac{2\ln\mathop{\mathrm{lb}}\llfloor\#_N\tilde{x} z\rrfloor+\ln\frac{10}{\delta}}{2\llfloor\#_N\tilde{x} z\rrfloor} }.\]

Theorem 6. Fix \(\delta>0\), \(\tilde{x}\), and \(y\). Then a \((1-\delta)\)-confidence sequence for the \(P(y\mid\mathop{\mathrm{do}}(\tilde{x}))\) of 4 can be defined as follows: the midpoint is \[\sum_z \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(z\mid\tilde{x}) \sum_x \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(y\mid x,z) \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}_N(x)\] and the half-width is \[\begin{gather} \label{eq:anytime-front-2} \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor N\rrfloor+\ln\frac{3.3K}{\delta}}{2\llfloor N\rrfloor}} + \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#_N\tilde{x}\rrfloor+\ln\frac{3.3K}{\delta}}{2\llfloor\#_N\tilde{x}\rrfloor}}\\ + \sum_{x,z} \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#_N x z\rrfloor+\ln\frac{3.3K}{\delta}}{2\llfloor\#_N x z\rrfloor}}. \end{gather}\tag{18}\]

Theorems 36 may be considered to be finite-sample analogues of Theorem 1 in [3]. Their characteristic feature is the presence of iterated logarithm terms, which are unavoidable (details omitted) and are especially prominent under the strong interpretation.

Figure 3: The napkin graph

Remark 7. In this paper we only discuss, outside of this remark, causal effects that are representable as arithmetic expressions involving only two arithmetic operations, plus and multiplication (minus could be added for free but is not useful). There are, however, situations in which the causal effect is given in a form involving division, such as the napkin graph, shown in Figure 3. It has the following expression for the causal effect of \(X\) on \(Y\): \[\label{eq:p-napkin} P(y\mid\mathop{\mathrm{do}}(\tilde{x})) := \frac{\sum_w P(y,\tilde{x}\mid z,w)P(w)}{\sum_w P(\tilde{x}\mid z,w)P(w)}\tag{19}\] (see [4]). The expression 19 is a ratio, and our methods do not work for it. However, we can still compute the left and right end-points of the overall confidence interval by combining the left and right end-points of the constituent confidence intervals.

An interesting feature of the expression 19 is that its right-hand side involves \(z\) but does not really depend on it, as is clear from its left-hand side; this is an instance of so-called Verma constraints [5]. The presence of \(z\) on the right-hand side of 19 is in a certain sense inevitable; formally, \(Z\) is a “trapdoor variable” as defined in [4] and explained in [4].

6 Applications to prediction intervals↩︎

Theorems 16 provide confidence intervals for causal effects, whereas in [1] we were interested in prediction sets for \(Y\). In order to discuss connections between our results here and the strong interpretation in [1], in this section we will state a corollary of the toy version of Theorem 3 for the binary case of Figure 1, with 14 replaced by 15 , giving prediction sets; similar corollaries can be easily deduced from Theorems 16 as well. We consider the strong interpretation of Figure 1, as in Sect. 4, with \((X_n,Y_n,Z_n)\), \(n\in[N]\), complemented by another observation \(Y\) with the probabilities of \(Y=y\), \(y\in\mathbf{Y}\), given by the right-hand side of 2 for a fixed \(\tilde{x}\). Remember that \(\mathbf{X}=\mathbf{Y}=\mathbf{Z}=\{0,1\}\).

Corollary 1. Fix \(\delta>0\), \(N\), and \(\tilde{x}\in\mathbf{X}\). Then \[\begin{gather} \Gamma := \Biggl\{ y\in\mathbf{Y}: \sum_{z\in\{0,1\}} \hat{p}(z) \settoheight{\dhatheight}{\hat{p}} \addtolength{\dhatheight}{-0.35ex} \hat{\vphantom{\rule{1pt}{\dhatheight}} \smash{\hat{p}}}(y\mid\tilde{x},z) + 2\sqrt{\frac{\ln\frac{12}{\delta}}{2N}} \\ + \sum_{z\in\{0,1\}} \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor\#\tilde{x} z\rrfloor+\ln\frac{20}{\delta}}{2\llfloor\#\tilde{x} z\rrfloor}} > \frac{\delta}{2} \Biggr\} \end{gather}\] is a \((1-\delta)\)-prediction set.

Proof. We are required to prove that \(Y\notin\Gamma\) with probability at most \(\delta\). Let us fix \(y\in\mathbf{Y}\) and prove that the probability of the conjunction of \(Y=y\) and \(y\notin\Gamma\) is at most \(\delta/2\). We will use the confidence interval \(\eqref{eq:core-back-1}\pm\eqref{eq:core-back-2-toy}\) with \(\delta/2\) in place of \(\delta\). Consider two cases:

  • Suppose the right-hand-side of 2 exceeds \(\delta/2\). If \(y\notin\Gamma\), the right end-point \(\eqref{eq:core-back-1}+\eqref{eq:core-back-2-toy}\) (with \(\delta\) replaced by \(\delta/2\)) of the confidence interval is at most \(\delta/2\), and the probability of this is at most \(\delta/2\) by the definition of a confidence interval.

  • Otherwise, \(Y=y\) with probability at most \(\delta/2\) by the definition of \(Y\).

 ◻

This procedure is sub-optimal for several reasons. One of them is that Hoeffding’s inequality applied to the Bernoulli model can be greatly improved when the probability of error is small; see, e.g., Vapnik’s [6] use of multiplicative Chernoff inequalities (in what he calls optimistic and pessimistic settings of learning problems).

Analogous corollaries of Theorems 1 and 2 become more comparable with the results that we obtain in [1]. However, the prediction sets derived in [1] are based on e-values (are “e-prediction sets”) whereas the prediction sets here are traditional ones. We expect that methods of this paper lead to much looser results, but their advantage is that they also work for the strong interpretation.

7 Conclusion↩︎

In this paper we derive confidence intervals and confidence sequences for causal effects in IID and sequential non-IID settings. These are some directions of further research:

  • The results of this paper only provide upper bounds for achievable widths of confidence intervals, and they need to be complemented by lower bounds. (It is easy to check that a \(\log\log\) term is unavoidable even in the adaptive setting of Figure 1 with \(\mathbf{X}=\mathbf{Y}=\{0,1\}\) and \(\mathbf{Z}=\{0\}\).)

  • This paper is based on the standard measure-theoretic probability [7][9]. To make our results as strong as possible, we could try and present them in the language of game-theoretic probability [10] (this was listed as direction of further research already in [3]).

8 Proofs↩︎

In the following two propositions we consider an IID Bernoulli sequence \(\xi_1,\xi_2,\dots\) with probability of success \(p\) and use the notation \(\hat{p}_n:=\frac{1}{n}\sum_{i=1}^n\xi_i\) for the standard estimate of \(p\). We start from a standard confidence interval for the probability of success given by Hoeffding’s inequality.

Proposition 8. For a fixed \(n\) and \(\delta>0\), \[\label{eq:interval} I := \left\{ p: \left| p - \hat{p}_n \right| < \sqrt{\frac{\ln\frac{2}{\delta}}{2n}} \right\}\qquad{(1)}\] is a \((1-\delta)\)-confidence interval for \(p\), in the sense of \[\mathbb{P} \left( p\in I \right) \ge 1-\delta.\]

Proof. By Hoeffding’s inequality (or Okamoto’s earlier result [11]), for all \(c>0\), \[\mathbb{P} \left( \left| p - \hat{p}_n \right| \ge c \right) \le 2\exp(-2c^2n),\] which gives the confidence interval ?? . ◻

We will also need the following confidence sequence.

Proposition 9. For each \(\delta>0\), \[\label{eq:sequence} I_n := \left\{ p: \left| p - \hat{p}_{\llfloor n\rrfloor} \right| < \sqrt{\frac{2\ln\mathop{\mathrm{lb}}\llfloor n\rrfloor+\ln\frac{3.3}{\delta}}{2\llfloor n\rrfloor}} \right\}\qquad{(2)}\] is a \((1-\delta)\)-confidence sequence, i.e., \[\label{eq:confidence} \mathbb{P} \left( \forall n: p\in I_n \right) \ge 1-\delta.\qquad{(3)}\]

Proof. Similar confidence sequences can be obtained using Ville’s [12] method of continuous mixtures of test martingales or its discrete analogue [10], but we will model our proof on [13]. Fix \(p\in[0,1]\).

Since \(\zeta(2)=\pi^2/6\), we can split the significance level \(\delta\) into the series \(\delta=\sum_{k=1}^{\infty}\delta_k\), where \[\delta_k = \frac{6}{\pi^2 k^2} \delta.\] Applying ?? with \(n_k=2^k\) in place of \(n\) and \(\delta_k\) in place of \(\delta\) gives \[\label{eq:last} \mathbb{P} \left( \left| p - \hat{p}_{n_k} \right| \ge \sqrt{\frac{\ln\frac{\pi^2k^2}{3\delta}}{2n_k}} \right) \le \delta_k.\tag{20}\] Finally, 20 implies ?? since \(\pi^2/3 \approx 3.29 < 3.3\). (This argument works for \(n\ge2\); otherwise, the inequality in ?? is trivial since our convention, introduced in Sect. 4, is that \(\ln\mathop{\mathrm{lb}}1:=\infty\).) ◻

Next we need a simple result from interval arithmetic. We are only interested in subintervals of \([0,1]\). Let \(c\pm\Delta c\), where \(c\in\mathbb{R}\) and \(\Delta c\ge0\), stand for the interval \[c\pm\Delta c := [c-\Delta c, c+\Delta c] \cap [0,1].\] For a binary operation \(*\) on the reals (we are mostly interested in addition and multiplication), we define its result on intervals pointwise: \[I_1 \mathbin{*} I_2 := \{p_1\mathbin{*}p_2: p_1\in I_1, p_2\in I_2\} \cap [0,1].\]

Lemma 1. For any two intervals \(a\pm\Delta a\) and \(b\pm\Delta b\), \[\begin{align} (a\pm\Delta a) + (b\pm\Delta b) &\subseteq (a+b)\pm(\Delta a+\Delta b), \tag{21}\\ (a\pm\Delta a) \times (b\pm\Delta b) &\subseteq (a\times b)\pm(\Delta a+\Delta b). \tag{22} \end{align}\] (And the analogous statement is also true for “\(-\)”.)

Figure 4: Illustration of an inequality.

Proof. The inclusion 21 is obvious, so we will only prove 22 . The latter inclusion reduces to the conjunction of two inequalities: \[\begin{align} (a-\Delta a) (b-\Delta b) &\ge a b - (\Delta a+\Delta b), \tag{23} \\ ((a+\Delta a)\wedge1) ((b+\Delta b)\wedge1) &\le a b + (\Delta a+\Delta b). \tag{24} \end{align}\] The inequality 23 is obvious, and in 24 we can assume, without loss of generality, \(a+\Delta a\le1\) and \(b+\Delta b\le1\), which reduces it to \[\label{eq:final} (a+\Delta a)(b+\Delta b) - a b \le \Delta a+\Delta b.\tag{25}\] The last inequality is illustrated in Figure 4: the dotted area of the plot represents the left-hand side of 25 , and the yellow area represents the right-hand side of 25 (with the darker yellow area counted twice). ◻

Corollary 2. Let \(E\) be an arithmetic expression involving \(m\) formal variables (counting the duplicates, if any) and binary operations “\(+\)”, “\(-\)”, and “\(\times\)”. Then, for any intervals \(a_i\pm\Delta a_i\), \(i=1,\dots,m\), \[\label{eq:combination} E(a_1\pm\Delta a_1,\dots,a_m\pm\Delta a_m) \subseteq E(a_1,\dots,a_m)\pm\sum_{i=1}^m\Delta a_i.\tag{26}\]

If the expression \(E\) in Corollary 2 is written as a multivariate polynomial, then \(m\) is the sum of the degrees of the monomials in \(E\). The number of binary operations in \(E\) is \(m-1\). In this paper we limit ourselves to using multivariate polynomials in expanded form (except for Remark 10 below).

Proof of Corollary 2. We proceed by induction on the number of operations “\(+\)”, “\(-\)”, and “\(\times\)” that \(E\) involves. The statement 26 is trivial if \(E\) is a formal variable and does not involve any operations. The inductive step is provided by Lemma 1. ◻

Proof of Theorem 1. In the proofs of Theorems 16 we will use the slightly informal notation exemplified by \(\eqref{eq:IID-back-1}\pm\eqref{eq:IID-back-2}\) being the confidence interval with midpoint 6 and half-width 7 .

We obtain the confidence interval \(\eqref{eq:IID-back-1}\pm\eqref{eq:IID-back-2}\) for 2 (involving \(2\left|\mathbf{Z}\right|\) probabilities) by combining the confidence intervals ?? for each of the \(2\left|\mathbf{Z}\right|\) constituent probabilities. To ensure the overall confidence level \(1-\delta\), we replace the \(\delta\) in ?? by \(\delta/(2\left|\mathbf{Z}\right|)\). By Corollary 2, we then indeed obtain the overall \((1-\delta)\)-confidence interval with midpoint 6 and semi-width \[\sum_z \left( \sqrt{\frac{\ln\frac{4\left|\mathbf{Z}\right|}{\delta}}{2N}} + \sqrt{\frac{\ln\frac{4\left|\mathbf{Z}\right|}{\delta}}{2\#\tilde{x} z}} \right),\] i.e., 7 . ◻

To derive 8 for Figure 1 with binary variables, notice that in the binary case we only need confidence intervals for three constituent probabilities, since an interval estimate for \(P(Z=0)\) gives one for \(P(Z=1)\) and vice versa. This allows us to replace \(\delta\) by \(\delta/3\) rather than \(\delta/4\) in ?? .

Proof of Theorem 2. The proof is similar to that of Theorem 1. We regard 4 as a multivariate polynomial with formal variables \(P(z\mid\tilde{x})\) (indexed by \(z\in\mathbf{Z}\)), \(P(y\mid x,z)\) (indexed by \((x,z)\in\mathbf{X}\times\mathbf{Z}\)), and \(P(x)\) (indexed by \(x\in\mathbf{X}\)). It is clear that 9 is the midpoint for the confidence interval given by Corollary 2, so we only needed to show that 10 is the resulting half-width.

The total number of distinct formal variables in 4 is \(K:=\left|\mathbf{X}\right|\left|\mathbf{Z}\right|+\left|\mathbf{X}\right|+\left|\mathbf{Z}\right|\):

  • there are \(\left|\mathbf{Z}\right|\) of \(P(z\mid\tilde{x})\);

  • there are \(\left|\mathbf{X}\right|\left|\mathbf{Z}\right|\) of \(P(y\mid x,z)\);

  • and there are \(\left|\mathbf{X}\right|\) of \(P(x)\).

To ensure that ?? are simultaneous confidence intervals for all of them at confidence level \(1-\delta\), we replace the \(\delta\) in ?? by \(\delta/K\).

Now we need to count the number of confidence intervals of different kinds, using the expanded form of the polynomial 4 . The first addend in 10 corresponds to the formal variables \(P(x)\); they contribute confidence intervals of half-width given by the first square root in 10 , there are \(\left|\mathbf{X}\right|\) of them, and there are \(\left|\mathbf{Z}\right|\) entries of each of them in the expanded form of the polynomial 4 . The second addend corresponds to the formal variables \(P(z\mid\tilde{x})\); they contribute confidence intervals of half-width given by the second square root in 10 , there are \(\left|\mathbf{Z}\right|\) of them, and there are \(\left|\mathbf{X}\right|\) entries of each of them in the expanded form of 4 . Finally, the third addend in 10 corresponds to the formal variables \(P(y\mid x,z)\); they contribute confidence intervals of half-width given by the third square root in 10 , and there is only one entry of each of them. ◻

Remark 10. This remark is about the proof of Theorem 2, but similar remarks can also be made about our proofs of Theorems 4 and 6 below. As far as the number of the operations “\(+\)” and “\(\times\)” is concerned, the expanded form of a polynomial is typically less efficient than what we get by applying multivariate Horner schemes (see, e.g., [14]); there are several other methods for optimizing the number of operations (see, e.g., [15]). Namely, applying the Horner scheme leaves the same number of additions and reduces the number of multiplications. Since the right-hand side of 4 is already in the Horner form obtained by starting from the formal variables \(P(z\mid\tilde{x})\), we will be better off applying Corollary 2 to it directly. This will give the half-width \[\begin{gather} \label{eq:version-1} \sum_z \left( \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#\tilde{x}}} + \sum_x \left( \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#x z}} + \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} \right) \right)\\ = \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} + \left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#\tilde{x}}} + \sum_{x,z} \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#x z}} \end{gather}\tag{27}\] in place of 10 . The multivariate Horner scheme depends on the order in which we apply it to different variables, and \[\label{eq:front-2} P(y\mid\mathop{\mathrm{do}}(\tilde{x})) = \sum_x P(x) \sum_z P(y\mid x,z) P(z\mid\tilde{x})\tag{28}\] is what we obtain in place of 4 when we start from the formal variables \(P(x)\). Using 28 will give a different half-width from 27 , namely \[\begin{gather} \label{eq:version-2} \sum_x \left( \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} + \sum_z \left( \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#x z}} + \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#\tilde{x}}} \right) \right)\\ = \left|\mathbf{X}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2N}} + \left|\mathbf{X}\right|\left|\mathbf{Z}\right| \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#\tilde{x}}} + \sum_{x,z} \sqrt{\frac{\ln\frac{2K}{\delta}}{2\#x z}}. \end{gather}\tag{29}\] We cannot say a priori which is larger, 27 or 29 . It is easy to check that 27 is less than 29 if and only if \[\frac{\#\tilde{x}}{N} < \left( \frac{1-1/\left|\mathbf{X}\right|}{1-1/\left|\mathbf{Z}\right|} \right)^2.\] Therefore, the half-width 27 looks better than 29 overall; in particular, 27 is less than 29 when \(\#\tilde{x}/N\le1/4\) or \(\left|\mathbf{X}\right|\ge\left|\mathbf{Z}\right|\).

Proof of Theorem 3. We apply Proposition 8 to estimating \(P(z)\) and Proposition 9 to estimating \(P(y\mid\tilde{x},z)\) in 2 . Since the total number of distinct formal variables in 2 is \(2\left|\mathbf{Z}\right|\), we replace the \(\delta\) in ?? and ?? by \(\delta/(2\left|\mathbf{Z}\right|)\). Since 13 is obviously the midpoint of the confidence interval given by Corollary 2, we only check that 14 is its half-width. Now we should count the formal variables taking into account their multiplicities. The first addend in 14 corresponds to \(P(z)\); they contribute confidence intervals given by Proposition 8 and there are \(\left|\mathbf{Z}\right|\) of them. The second addend corresponds to the formal variables \(P(y\mid\tilde{x},z)\); they contribute confidence intervals given by Proposition 9. ◻

In the case of Figure 1 with binary variables, we obtain 15 if we again replace \(\delta\) by \(\delta/3\) rather than \(\delta/4\) (and round up 9.9 to 10).

Proof of Theorem 4. The proof is similar to that of Theorem 2; the main difference is that the formal variables \(P(z\mid\tilde{x})\) and \(P(y\mid x,z)\) contribute confidence intervals given by Proposition 9 (involving iterated logarithm terms) rather than Proposition 8. ◻

Proof of Theorem 5. The proof of Theorem 5 is analogous, and the only difference is that we use the confidence sequence ?? for estimating \(P(z)\) as well. ◻

Proof of Theorem 6. The difference from the proof of Theorem 4 is that, unlike 16 , 18 uses the iterated logarithm Proposition 9 rather than Proposition 8 in its first addend as well. ◻

References↩︎

[1]
Vladimir Vovk and Ruodu Wang. Conformal e-prediction in the presence of confounding. Technical Report https://arxiv.org/abs/2603.11134, https://arxiv.org e-Print archive, March 2026.
[2]
Judea Pearl. Causality: Models, Reasoning, and Inference. Cambridge, Cambridge University Press, second edition, 2009.
[3]
Vladimir Vovk. Another semantics for Pearl’s action calculus. In Alex Gammerman, editor, Computational Learning and Probabilistic Reasoning, chapter 7, pages 127–146. Wiley, New York, 1996.
[4]
Jouni Helske, Santtu Tikka, and Juha Karvanen. Estimation of causal effects with small data in the presence of trapdoor variables. Journal of the Royal Statistical Society A, 184:1030–1051, 2021.
[5]
Rohit Bhattacharya and Razieh Nabi. On testability of the front-door model via Verma constraints. In Proceedings of the 38th Conference on Uncertainty in Artificial Intelligence (UAI 2022), volume 180 of Proceedings of Machine Learning Research, pages 202–212, 2022.
[6]
Vladimir N. Vapnik. Statistical Learning Theory. Wiley, New York, 1998.
[7]
Andrei N. Kolmogorov. Grundbegriffe der Wahrscheinlichkeitsrechnung. Springer, Berlin, 1933. translation: Foundations of the Theory of Probability. Chelsea, New York, 1950.
[8]
Albert N. Shiryaev. Probability-1. Springer, New York, third edition, 2016.
[9]
Albert N. Shiryaev. Probability-2. Springer, New York, third edition, 2019.
[10]
Glenn Shafer and Vladimir Vovk. Game-Theoretic Foundations for Probability and Finance. Wiley, Hoboken, NJ, 2019.
[11]
Masashi Okamoto. Some inequalities relating to the partial sum of binomial probabilities. Annals of the Institute of Statistical Mathematics, 10:29–35, 1959.
[12]
Jean Ville. Etude critique de la notion de collectif. Gauthier-Villars, Paris, 1939.
[13]
Václav Voráček. Treatment of statistical estimation problems in randomized smoothing for adversarial robustness. In NeurIPS 2024, 2024.
[14]
Martine Ceberio and Vladik Kreinovich. Greedy algorithms for optimizing multivariate Horner schemes. ACM SIGSAM Bulletin, 38:8–15, 2004.
[15]
J. Kuipers, A. Plaat, J. A. M. Vermaseren, and H. J. van den Herik. Improving multivariate Horner schemes with Monte Carlo tree search. Computer Physics Communications, 184:2391–2395, 2013.