How to differentiate this improper integral?

77 Views Asked by At

I have a continuous random variable $X$. What I would want to prove is that its median minimizes the expected absolute risk $$\rho(c)=\int_{\Omega}|X-c|f(x)dx=E[|X-c|]$$ where $\Omega$ is the support of $X$ and $f$ its density.

The risk can be expressed like this: $$\rho(c) = \int_{x \in \Omega \land \geq c}(x-c)f(x)dx + \int_{x \in \Omega \land x < c}(c-x)f(x)dx$$

If $\Omega=[\alpha, \beta]$ with $\alpha, \beta \in R$, I can proceed as follows: \begin{eqnarray} \frac{d\rho(c)}{dc}=\frac{d}{dc}\int_{c}^{\beta}(x-c)f(x)dx + \frac{d}{dc}\int_{\alpha}^{c}(c-x)f(x)dx \end{eqnarray} and then differentiate under the sign of integral to get: \begin{eqnarray} &&\frac{d}{dc}\int_{c}^{\beta}(x-c)f(x)dx = \int_{c}^{\beta}(-f(x))dx + (\beta-c)\times \frac{d\beta}{dc} - (c-c)f(c)\frac{dc}{dc} = -\int_{c}^{\beta}f(x)dx \\ &&\frac{d}{dc}\int_{\alpha}^{c}(c-x)f(x)dx = \int_{\alpha}^{c}f(x)dx \end{eqnarray} from where it's straightforward to get: \begin{eqnarray} &&\frac{d\rho(c)}{dc} = 0 = -\int_{c}^{\beta}f(x)dx + \int_{\alpha}^{c}f(x)dx \\ &&-1 + F(c) + F(c) = 0 \\ &&F(c) = 0.5 \\ \end{eqnarray} So if $c$ is a median, then the risk is minimized (because it is a convex function).

However, if $\Omega=(\infty, \infty)$, I'm not sure what to do with: $$\frac{d}{dc}\int_{c}^{\infty}(x-c)f(x)dx$$ and $$\frac{d}{dc}\int_{\infty}^{c}(c-x)f(x)dx$$

Differentiating the former w.r.t $c$ gives the following expression: $$(\infty-x)\frac{d\infty}{dc}=\lim_{y\rightarrow \infty}(y-x)\frac{d y}{dc}$$

Since $y$ does not depend on $c$, it can be treated as a constant , so $\frac{dy}{dc}=0$, but how to show that the whole limit is $0$ (because in that case, the proof is analogous to that for finite $\alpha$ and $\beta$)? $(y-c)\frac{dy}{dc}$ is of the indeterminate form $\infty\times 0$ as $y \rightarrow \infty$.