<p>The appendix to that section in Mostly Harmless, section 3.5, has a derivation.</p>
<p><span class="math-container">$$Cov(Y_i,S_i) = E[h(S_i)(S_i-E[S_i])]$$</span></p>
<p>Let <span class="math-container">$k_{-\infty}=\lim_{t\rightarrow -\infty} h(t)$</span>. By the fundamental theorem of calculus,</p>
<p><span class="math-container">$$h(S_i)=k_{-\infty} +\int_{-\infty}^{S_i} h'(t)dt $$</span></p>
<p>Thus,
<span class="math-container">$$ E[h(S_i)(S_i-E[S_i])] = \int_{-\infty}^\infty\int_{-\infty}^{S_i} h'(t) (s-E[S_i])g(s)dtds$$</span></p>
<p>where <span class="math-container">$g(s)$</span> is the density of <span class="math-container">$S_i$</span> at <span class="math-container">$s$</span>. Apply Fubini's theorem to switch the order of integration,
<span class="math-container">$$ E[h(S_i)(S_i-E[S_i])] = \int_{-\infty}^\infty h'(t)\int_{t}^{\infty}  (s-E[S_i])g(s)dtds$$</span></p>
<p>The inner integral is <span class="math-container">$E[S_i|S_i \ge t]Pr(S_i\ge t)+E[S_i]Pr(S_i \ge t) $</span></p>
<p><span class="math-container">$= E[S_i|S_i \ge t]Pr(S_i\ge t)+(E[S_i|S_i \ge t]Pr(S_i \ge t) + E[S_i|S_i &lt; t]Pr(S_i &lt; t))Pr(S_i \ge t)  $</span></p>
<p><span class="math-container">$=\mu_t :=(E[S_i |S_i \ge t]-E[S_i |S_i &lt;t])(Pr(S_i \ge t)(1-Pr(S_i \ge t)$</span></p>
<p>Then, setting <span class="math-container">$S_i =Y_i$</span>, the denominator can similarly be derived.</p>

CC BY-SA 4.0
2022-05-02T08:00:23.203Z
2022-05-02T08:00:23.203Z
Michael Gmeiner
<p>Suppose that <span class="math-container">$S_i$</span> is continuously distributed, not necessarily non-negative. The conditional expectation function of interest is <span class="math-container">$h(t):=E[Y_i|S_i=t]$</span> has derivative <span class="math-container">$h'(t)$</span>.</p>
<p>Equation 3.3.8 of Mostly Harmless Econometrics is:</p>
<p><span class="math-container">$$\frac{E[Y_i(S_i- E[S_i])]}{E[S_i(S_i-E[S_i])]} = \frac{\int h'(t)\mu_t dt}{\int \mu_t dt} $$</span>
where <span class="math-container">$\mu_t :=[E[S_i|S_i\ge t]-E[S_i |S_i&lt;t]][P(S_i\ge t)[1-P(S_i\ge t)]]$</span> and the integrals run over the support of <span class="math-container">$S_i$</span>.</p>
<p>That equation is not obviously true to me and I am looking for a proof.</p>

CC BY-SA 4.0
2022-04-21T12:33:51.700Z
You can find a discrete version of the derivation in Appendix A2 of  Angrist and Krueger (1999): Empirical strategies in labor economics in the Handbook of Labor economics (Ashenfelter and Card) volume 3. [link](https://www.uh.edu/~adkugler/Angrist&Krueger_HLE.pdf)
tdm
CC BY-SA 4.0
2023-10-25T03:58:57.573Z
The "+" sign should be "-" in the inner integral
laozhang
<econometrics>
Equation 3.3.8 in Mostly Harmless Econometrics
Michael Gmeiner
# Equation 3.3.8 in Mostly Harmless Econometrics

(Asked by: username_0 on 2022-04-21)

Suppose that $S\_i$ is continuously distributed, not necessarily non-negative. The conditional expectation function of interest is $h(t):=E[Y\_i|S\_i=t]$ has derivative $h'(t)$.

Equation 3.3.8 of Mostly Harmless Econometrics is:

$$\frac{E[Y\_i(S\_i- E[S\_i])]}{E[S\_i(S\_i-E[S\_i])]} = \frac{\int h'(t)\mu\_t dt}{\int \mu\_t dt} $$
where $\mu\_t :=[E[S\_i|S\_i\ge t]-E[S\_i |S\_i and the integrals run over the support of $S\_i$.

That equation is not obviously true to me and I am looking for a proof.

**Tags:** econometrics

> **Comments:**
> **username_1**: You can find a discrete version of the derivation in Appendix A2 of  Angrist and Krueger (1999): Empirical strategies in labor economics in the Handbook of Labor economics (Ashenfelter and Card) volume 3. [link](https://www.uh.edu/~adkugler/Angrist&Krueger_HLE.pdf)  
> **username_2**: The "+" sign should be "-" in the inner integral  

---

## 1 answers

### Answer by username_0 on 2022-05-02. Score: 3 | Accepted answer

The appendix to that section in Mostly Harmless, section 3.5, has a derivation.

$$Cov(Y\_i,S\_i) = E[h(S\_i)(S\_i-E[S\_i])]$$

Let $k\_{-\infty}=\lim\_{t\rightarrow -\infty} h(t)$. By the fundamental theorem of calculus,

$$h(S\_i)=k\_{-\infty} +\int\_{-\infty}^{S\_i} h'(t)dt $$

Thus,
$$ E[h(S\_i)(S\_i-E[S\_i])] = \int\_{-\infty}^\infty\int\_{-\infty}^{S\_i} h'(t) (s-E[S\_i])g(s)dtds$$

where $g(s)$ is the density of $S\_i$ at $s$. Apply Fubini's theorem to switch the order of integration,
$$ E[h(S\_i)(S\_i-E[S\_i])] = \int\_{-\infty}^\infty h'(t)\int\_{t}^{\infty} (s-E[S\_i])g(s)dtds$$

The inner integral is $E[S\_i|S\_i \ge t]Pr(S\_i\ge t)+E[S\_i]Pr(S\_i \ge t) $

$= E[S\_i|S\_i \ge t]Pr(S\_i\ge t)+(E[S\_i|S\_i \ge t]Pr(S\_i \ge t) + E[S\_i|S\_i < t]Pr(S\_i < t))Pr(S\_i \ge t) $

$=\mu\_t :=(E[S\_i |S\_i \ge t]-E[S\_i |S\_i

Then, setting $S\_i =Y\_i$, the denominator can similarly be derived.


---

