# How to decompose the Naive Average Treatment Effect into the ATE, Selection Bias, and Differential Effect Bias

From this online document, it is assumed that we have a treatment and control group, with $$N_1$$ and $$N_0$$ being the number of treated and control units, respectively. $$D$$ is the treatment variable while $$Y^1$$ and $$Y^0$$ are the treated and control potential outcomes. Then, they define a "Native" Average Treatment Effect and decompose it into the ATE, Selection Bias, and Differential Effect Bias.

\begin{align} & E\left[\frac{1}{N_1} \sum_{i:d_i=1}{Y_i} - \frac{1}{N_0} \sum_{i:d_i=0}{Y_i}\right] \\ & \\ & = \underbrace{E[Y^1 | D=1] - E[Y^0 | D=0]}_{\text{NATE}} \\ &= \underbrace{E[Y^1 - Y^0]}_{\text{ATE}} + \underbrace{E[Y^0 | D=1] - E[Y^0 | D=0]}_{\text{Selection bias}} + \underbrace{E[D]*(E[\Delta | D=1] - E[\Delta | D=0])}_{\text{Differential effect bias}} \end{align}

I am uncertain if the third line holds without assumptions, as I cannot figure out how it is derived. Are there certain assumptions invoked above?

I believe that there is a small mistake in the third line. $$E[D]$$ should be $$1-E[D]$$, apart from that we only really need counterfactual consistency. Starting from the ATE
\begin{align} & E[Y^1-Y^0]=E[\Delta] \\ & \\ & = E[\Delta|D=1]P(D=1)+E[\Delta|D=0]P(D=0)\\ &\\ &= E[\Delta|D=1]\left(1-P(D=0)\right)+E[\Delta|D=0]P(D=0)\\ &\\ &=\left(E[\Delta|D=0]-E[\Delta|D=1]\right)P(D=0)+E[\Delta|D=1]\\ &\\ &=\left(E[\Delta|D=0]-E[\Delta|D=1]\right)P(D=0)+E[Y^1|D=1]-E[Y^0|D=1]\\ &\\ &=\left(E[\Delta|D=0]-E[\Delta|D=1]\right)P(D=0)+E[Y^1|D=1]-E[Y^0|D=1]\pm E[Y^0|D=0]\\ &\\ &=\left(E[\Delta|D=0]-E[\Delta|D=1]\right)P(D=0)+(\underbrace{E[Y^1|D=1]-E[Y^0|D=0]}_{\text{NATE}})- \underbrace{(E[Y^0|D=1] -E[Y^0|D=0])}_{\text{Selection Bias}}\\ \end{align}
Where all we used above was counterfactual consistency. Remember that since D is binary $$P(D=1)=E[D]$$ and take things to the left side and you obtain: \begin{align} &\underbrace{E[Y^1|D=1]-E[Y^0|D=0]}_{\text{NATE}}\\ &\\ &=\underbrace{E[Y^1-Y^0]}_{\text{ATE}}+\underbrace{(E[Y^0|D=1] -E[Y^0|D=0])}_{\text{Selection Bias}}+\left(E[\Delta|D=1]-E[\Delta|D=0]\right)P(D=0)\\ &\\ &=\underbrace{E[Y^1-Y^0]}_{\text{ATE}}+\underbrace{(E[Y^0|D=1] -E[Y^0|D=0])}_{\text{Selection Bias}}+\left(E[\Delta|D=1]-E[\Delta|D=0]\right)(1-E[D]) \\ \end{align}