Do derivative and expectation operators commute only for discrete random variablesÉ

181 Views Asked by At

Suppose we have a function $$g(r)=E(f(r,X))$$ where $X$ is a random variable and $g:\mathbb{R}\rightarrow\mathbb{R}$.

If $X$ is a discrete random variable, we can simply write $$g(r)=\sum_{x\in range(X)} f(r,x) P(X=x)$$ such that $$g'(r)=\sum_{x\in range(X)} \frac{\partial}{\partial r}f(r,x) P(X=x)$$

Under what conditions will the expression $$g'(r)=E\left(\frac{\partial}{\partial r}f(r,X)\right)$$ hold in general?