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<t]][P(S_i\ge t)[1-P(S_i\ge t)]]$ 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.