Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we consider the following problem $$ \mathbb{E}[(Y-y)^2 | X=x] $$ I can easily show that the minimum with respect to $y$ occurs at $$ y=\mathbb{E}[Y |X=x] $$ How can I find the minimum of $$ \mathbb{E}[|Y-y| | X=x] $$ with respect to $y$? Since absolute value is not differentiable, I couldn't do the minimization.

share|cite|improve this question
up vote 1 down vote accepted

It is enough to solve $\displaystyle \min_y E|Y-y|$. Assume that $Y$ has a continuous density $f(y)$ (w.r.t. Lebesgue measure). You can write \begin{align*} E|Y - y| = \int_{-\infty}^\infty |z-y| f(z) dz = \int_{-\infty}^y (y-z) f(z) dz + \int_y^\infty (z-y) f(z) dz \end{align*} The two integrals on the right-hand side are differentiable. (Hint: fundamental theorem of calculus.)

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.