How to prove that $E(Y|D=1)=E(DY)/E(D)$

56 Views Asked by At

How to prove that $$E(Y|D=1)=E(DY)/E(D)$$ and $$E(Y|X,D=1)=E(DY|X)/E(D|X),$$ where $D$ is a binary variable and takes value of 0 and 1.

2

There are 2 best solutions below

1
On BEST ANSWER

First observe that $$\mathbb E[D]=1\cdot P(D=1)+0\cdot P(D=0)=P(D=1)\tag{1}$$ So, \begin{align}\mathbb E[YD]&=\mathbb E[Y\cdot 1\mid D=1]P(D=1)+\mathbb E[Y\cdot 0\mid D=0]P(D=0)\\&\overset{(1)}=\mathbb E[Y\mid D=1]\mathbb E[D]+0\end{align} and the result follows by rearranging terms and assuming that $P(D=1)>0$. Can you do the same for the $X$ part?

0
On

The unconditional case is shown as above. For the conditional case, first observe that $$\mathbb E[D|X]=1\cdot P(D=1|X)+0\cdot P(D=0|X)=P(D=1|X)\tag{1}$$ So, \begin{align}\mathbb E[YD|X]&=\mathbb E[YD|X,D=1]\cdot P(D=1|X)+\mathbb E[YD|X,D=0]\cdot P(D=0|X)\\&\overset{(1)}=\mathbb E[Y| X, D=1]\cdot\mathbb E[D|X]\end{align} and the conditional equation follows by rearranging terms and assuming that $P(D=1|X)\neq0$.