# Randomized Controlled Trials

### The Basic Foundation

In this section, we consider the case where there are unobserved confounders. In such a case, we cannot rely on regression, as these unobserved confounders prevent a learner from identifying $p^*(y|a, x)$ correctly. One may tempted to simply fit a predictive model on $(a, y)$ pairs to get $p(y|a; \theta)$ to approximate $p^*(y|a)$ and call it a day. We have however learned earlier that this does not approximate the causal effect, that is, $p^*(y|\mathrm{do}(a))$, due to the spurious path, $a \leftarrow x \to y$, which is open because we did not observe $x$. When there are unobserved confounders, we can actively collect data that allows us to perform causal inference. This is a departure from a usual practice in machine learning, where we often assume that data is provided to us and the goal is for us to use a learning algorithm to build a predictive model. This is often not enough in causal inference, and we are now presented with the first such case, where the assumption of ‘no unobserved confounder’ has been violated. In order to estimate the causal effect of the action $a$ on the outcome $y$, we severed the edge from the confounder $x$ to the action $a$, as in

This suggests that if we collect data according to the latter graph $\overline{G}$, we may be able to estimate the causal effect of $a$ on $y$ despite the unobserved confounder $x$. To do so, we need to decide on the prior distribution over the action, $\overline{p}(a)$, such that $a$ is independent of the covariate $x$. It is a common practice to choose a uniform distribution over the action as $\overline{p}(a)$. For instance, if $a$ is binary,

[] \begin{align} \overline{p}(a=0) = \overline{p}(a=1) = 0.5. \end{align} []

The prior distribution over the covariate $x$, $p(x)$, is not what we choose, but is what the environment is like. That is, instead of specifying $p(x)$ nor sampling explicitly from it (which was by assumption impossible), we go out there and recruit samples from this prior distribution. In the vaccination example above, this would correspond to recruiting subjects from a general population without any particular filtering or selection.[Notes 1] For each recruited subject $x$, we assign the treatment $a$, drawn from $\overline{p}(a)$ that is independent of $x$. This process is called ‘randomization’, because this process assigns an individual drawn from the population, $x \sim p(x)$, randomly to either a treatment or placebo group according to $\overline{p}(a)$, where ‘randomly’ refer to ‘without any information’. This process is also ‘controlled’, because we control the assignment of each individual to a group. For the randomly assigned pair $(a,x)$, we observe the outcome $y$ by letting the environment (nature) simulate and sample from $p^*(y|a,x)$. This process is a ‘trial’, where we try the action $a$ on the subject $x$ by administering $a$ to $x$. Putting all these together, we call this process of collecting data from $\overline{G}$ a randomized controlled trial (RCT). It is important to emphasize that $x$ is not recorded, fully known nor needed, and we end up with

[] \begin{align} D = \left\{ (a_1, y_1), \ldots, (a_N, y_N) \right\}. \end{align} []

Using this dataset, we can now approximate the interventional probability as

[] \begin{align} \mathbb{E}_G\left[ y | \mathrm{do}(a=\hat{a})\right] &= \mathbb{E}_{\overline{G}} \left[ y | a = \hat{a}\right] \\ &= \sum_{y} y \frac{ \sum_{x} p(x) \cancel{\overline{p}(\hat{a})} p(y | \hat{a}, x)} {\cancel{\overline{p}(\hat{a})}} \\ &= \sum_{x} \sum_{y} y p(x) p(y | \hat{a}, x) \\ &\approx \frac{\sum_{n=1}^N \mathds{1}(a_n = \hat{a}) y_n} {\sum_{n'=1}^N \mathds{1}(a_{n'} = \hat{a})}, \end{align} []

because $x_n \sim p(x)$, $a_n \sim \overline{p}(a)$ and $y_n \sim p(y|\hat{a}, x)$. As evident from the final line, we do not need to know the confounder $x$, which means that RCT avoids the issue of unobserved, or even unknown, confounders. Furthermore, it does not involve $\overline{p}(a)$, implying that we can use an arbitrary mechanism to randomly assign each subject to a treatment option, as long as we do not condition it on the confounder $x$. If we have strong confidence in the effectiveness of a newly developed vaccine, for instance, we would choose $\overline{p}(a)$ to be skewed toward the treatment ($a=1$).

### Important Considerations

Perhaps the most important consideration that must be given when implementing a randomized controlled trial is to ensure that the action $a$ is independent of the covariate $x$. As soon as dependence forms between $a$ and $x$, the estimated causal effect $\mathbb{E}_G\left[ y | \mathrm{do}(a=\hat{a})\right]$ becomes biased. It is however very easy for such dependency to arise without a careful design of an RCT, often due to subconscious biases formed by people who implement the randomized assignment procedure.

For instance, in the case of the vaccination trial above, a doctor may subconsciously assign older people less to the vaccination arm[Notes 2] simply because she is subconsciously worried that vaccination may have more severe side effects on an older population. Such a subconscious decision will create a dependency between the action $a$ and the covariate $x$ (the age of a subject in this case), which will lead to the bias in the eventual estimate of the causal effect. In order to avoid such a subconscious bias in assignment, it is a common practice to automate the assignment process so that the trial administrator is not aware of to which action group each subject was assigned.

Second, we must ensure that the causal effect of the action $a$ on the outcome $y$ must stay constant throughout the trial. More precisely, $p^*(y|a,x)$ must not change throughout the trial. This may sound obvious, as it is difficult to imagine how for instance the effect of vaccination changes rapidly over a single trial. There are however many ways in which this does not hold true. A major way by which $p^*(y|a,x)$ drifts during a trial is when a participant changes their behavior. Continuing the example of vaccination above, let us assume that each participant knows that whether they were vaccinated and also that the pandemic is ongoing. Once the participant knows that they were given placebo instead of actual vaccine, they may become more careful about their hygiene, as they are worried about potential contracting the rampant infectious disease. Similarly, if they knew they were given actual vaccine, they may become less careful and expose themselves to more situations in which they could contract the disease. That is, the causal effect of vaccination changes due to the alteration of participants' behaviours. It is thus a common and important practice to blind participants from knowing to which treatment groups they were assigned. For instance, in the case of vaccination above, we would administer saline solution via injection to control (untreated) participants so that they cannot tell whether they are being injected actual vaccine or placebo. Putting these two considerations together, we end up with a double blind trial design. In a double blind trial design, neither the participant nor the trial administrator is made aware of their action/treatment assignment. This helps ensure that the underlying causal effect is stationary throughout the study and that there is no bias creeping in due to the undesirable dependency of the action/treatment assignment on the covariate (information about the participant.)

The final consideration is not about designing an RCT but about interpreting the conclusion from an RCT. As we saw above, the causal effect from the RCT based on $\overline{G}$ is mathematically expressed as

[] \begin{align} \mathbb{E}_G\left[ y | \mathrm{do}(a=\hat{a})\right] = \sum_{x} \sum_{y} y p(x) p(y | \hat{a}, x). \end{align} []

The right hand side of this equation includes $p(x)$, meaning that the causal effect is conditioned on the prior distribution over the covariate. We do not have direct access to $p(x)$, but we have samples from this distribution, in the form of participants arriving and being included into the trial. That is, we have implicit access to $p(x)$. This implies that the estimated causal effect would only be valid when it is used for a population that closely follows $p(x)$. If there is any shift in the population distribution itself or there was any filtering applied to participants in the trial stage that does not apply after the trial, the estimated causal effect would not be valid anymore. For instance, clinical trials, such as the vaccination trial above, are often run by research-oriented and financially-stable clinics which are often located in affluent neighbourhoods. The effect of the treatment from such a trial is thus more precise for the population in such affluent neighbourhoods. This is the reason why inclusion is important in randomized controlled trials. Overall, a successful RCT requires the following conditions to be met:

• Randomization: the action distribution must be independent of the covariate.
• Stationarity of the causal effect: the causal effect must be stable throughout the trial.
• Stationarity of the popluation: the covariate distribution must not change during and after the trial.

As long as these three conditions are met, RCT provides us with an opportunity to cope with unobserved confounders.

## General references

Cho, Kyunghyun (2024). "A Brief Introduction to Causal Inference in Machine Learning". arXiv:2405.08793 [cs.LG].

## Notes

1. Of course, we can filter these subjects to satisfy a certain set of criteria (inclusion criteria) in order to estimate a conditional average treatment effect.
2. An ‘arm’ here refers to a ‘group’.