# Does Pr(Y | X=x) equal Pr(Y | do(X=x)) in a randomized experiment?

to examine the contrast between Pr (Y |do(X = x))$and$Pr (Y |do(X = x')),
we use an independent source of random noise to decide which experimental
subjects will get do(X = x) and which will get do(X = x'). It is easy to
convince yourself that this makes $Pr (Y |do(X = x))$ equal to Pr (Y |X = x).


I don't think $$Pr (Y |do(X = x))$$ equals $$Pr (Y |X = x)$$ in this case. Why is it easy to see?

Also, Shalizi says one paragraph below:

Experimental evidence is compelling, but experiments are often slow, expensive, and difficult. Moreover,
experimenting on people is hard, both because there
are many experiments we shouldn’t do, and because there are many experiments
which would just be too hard to organize. We must therefore consider how to do
causal inference from non-experimental, observational data.


If $$Pr (Y |do(X = x)) = Pr (Y |X = x)$$ in randomized studies, doesn't it mean that we can already estimate the causal effects by comparing $$Pr (Y |X = x)$$ and $$Pr (Y |X = x')$$, which is purely observational data, and there's no intervention needed in the first place?

• We may assume $X$ is the randomly allocated treatment-assignment in an intent-to-treat design? Oct 2 at 17:00
• The $do(X=X)$ notation benefits from thinking carefully about who is doing the doing, what is being assigned in treatment, and how it is being assigned. Oct 2 at 19:51

$$P(Y|do(X=x))=P(Y|X=x)$$ any time there are no backdoor paths between $$X$$ and $$Y$$. In a randomized trial, this is true. In an observational study, this is not (i.e., because treatment and outcome often have common causes). So you cannot simply compare $$P(Y|X=x)$$ and $$P(Y|X=x')$$ in an observational study and claim the difference is a causal effect, but you can do so in a randomized trial. In an observational study, there are a variety of ways to parametrically or nonparametrically identify the causal effect by removing or accounting for backdoor paths.

• Thanks, Noah! I think the problem is that I misinterpreted 𝑃(𝑌 | 𝑋=𝑥) in Shalizi's statement as from "some population" before the random treatment allocation. If there were a study that assigns "smoke" and "doesn't smoke" to two groups, the group that smokes definitely shouldn't have the same Y distribution as that of people who smoke as their natural habit.
– VDCN
Oct 4 at 4:00

If Pr (Y |do(X = x)) = Pr (Y |X = x) in randomized studies, doesn't it mean that we can already estimate the causal effects by comparing Pr (Y |X = x) and Pr (Y |X = x'), which is purely observational data, and there's no intervention needed in the first place?

No, exactly because experimental and observational data are very different.

Indeed in general $$P(Y|do(X=x)) \neq P(Y|X=x)$$ and this formalize the main difference.

The topic is vast. Shortly, considering that $$Y$$ and $$X$$ are the only variables involved in the system, only if $$X$$ is randomly assigned the equivalence hold.

I don't think $$Pr (Y |do(X = x))$$ equals $$Pr (Y |X = x)$$ in this [just defined] case. Why is it easy to see?

You can consider this rule like a (simplified) definition of causation.

However, in more general system, sometimes is possible to find a set of controls $$Z$$ so that $$P(Y|do(X=x)) = P(Y|Z=z, X=x)$$. This is a key rule for causal inference in observational studies. Moreover, under certain assumptions $$Z$$ can also be and empty set.