Derivative of an Expected Value In my lecture slides there was an optimization problem involving a random variable $w$, that we can call "wage". Part of the maximization problem was taking the derivative of the expected value of $E(w)$ which it doesn't explain how the answer was derived but it said was the p.d.f of the random variable $w$ as such:
\begin{eqnarray*}
\frac{dE(w)}{dw} & = \frac{1}{dw}& \int_\bar{w}^\infty wdF(w) =\frac{1}{dw}\int_\bar{w}^\infty  wf(w)=f(w)
\end{eqnarray*}
Is this true??
 A: No.   Not at all.
$\mathsf E(w)$ would be a constant, and the derivative of a constant is zero.
Further $\displaystyle \mathsf E(w) = \int_{-\infty}^\infty \psi\operatorname d F(\psi)$, where $\psi$ is the variable of integration - a token whose scope is bound within the integral.   You cannot take the derivative of this token from outside the integral.
A: No.
$$\frac{dE(w)}{dw} = \frac{d}{dw} \int_{-\infty}^\infty wdF(w) = \int_{-\infty}^\infty \frac{d}{dw} wdF(w)$$
How would you evaluate, even if w had a pdf,
$$\frac{d}{dw} wdF(w)$$
?
Actually, 
$$\frac{dE(w)}{dw} = \frac{d}{dw} \int_{-\infty}^\infty wdF(w) = \frac{d}{dw} (a) = 0$$
where $a$ is the real (or complex or extended real) number s.t.
$$\int_{-\infty}^\infty wdF(w) = a$$

Your thinking might apply to situations like:


*

*mgf


$$M_{X}'(w) = \frac{d}{dw} E[e^{Xw}] = E[\frac{d}{dw} e^{Xw}] = E[Xe^{Xw}]$$
$$= \int_{\mathbb R} xe^{xw} f_{X}(x) dx$$


*$$\frac{d}{dw} E[wX] = E[\frac{d}{dw} wX] = E[X]$$

*$$\frac{d}{dw} F_X(w) = \frac{d}{dw} \int_{-\infty}^{w} dF_X(t)$$
$$= \frac{dF_X(w)}{dw}$$
If X has a pdf:
$$= \frac{d}{dw} \int_{-\infty}^{w} f_X(t) dt$$
$$= f_X(w)$$
