3

Suppose that the random variable X has the cumulative density function F(x). Show that the expected value of the random variable $(X-c)^2$ is minimum if c equals the expected value of X.

I know that the cumulative distribution function ("c.d.f.") of a continuous random variable X is defined as:

\begin{equation} F(x) = \int_{-\infty}^{x} f(t) dt \end{equation}

for $-\infty < x < \infty$.

Mestica
  • 538
  • 1
    But do you know how the expected value is defined? Because, absent that vital piece of information, you do not know enough to even start working towards a solution. – Dilip Sarwate Jun 14 '16 at 19:33
  • Very good! Now, how about the expected value of $(X-c)^2$? Do you know a formula that will allow you to figure that out without first finding the CDF or pdf of $(X-c)^2$? – Dilip Sarwate Jun 14 '16 at 19:47

3 Answers3

3

$$\mathbb E[(X-c)^2]=\mathbb E[X^2]-2c\mathbb E[X]+c^2.$$ I think you can easily minimize the function defined by $$f(c)=\mathbb E[X^2]-2c\mathbb E[X]+c^2.$$

Surb
  • 55,662
  • What follows if I use f(c) in $f(\mathbb{E}[X]) = \mathbb{E}[X^2] - 2\mathbb{E}[X]\mathbb{E}[X] + \mathbb{E}[X]^2 => \mathbb{E}[X^2] -\mathbb{E}[X]^2 => Var(X)$? Do I differentiate? – Mestica Jun 14 '16 at 20:00
  • 1
    @Ralf17: Either you derivate, or you can also know that if the dominant coefficient is positif, then the parabola will take it's minimum at $c=\frac{-b}{2a}=\frac{2\mathbb E[X]}{2}=\mathbb E[X].$ It's as easy as it looks :-) – Surb Jun 14 '16 at 20:27
  • Could you please explain the intuition behind this optimization problem? – David Morante Aug 15 '21 at 04:44
0

You can use LOTUS: $$ \mathbb E[(X-c)^2] = \int_{-\infty}^{\infty} (x-c)^2 f(x) ~dx $$ We take partial derivate with respect to $c$ to try to find the minimum. $$ \frac{\partial}{\partial c} \int_{-\infty}^{\infty} (x-c)^2 f(x) ~dx = \int_{-\infty}^{\infty} \frac{\partial}{\partial c} (x-c)^2 f(x) ~dx = \int_{-\infty}^{\infty} -2(x-c) f(x) ~dx = 0 \\ \implies \int_{-\infty}^{\infty} x f(x) ~dx - c\int_{-\infty}^{\infty} f(x) ~dx = 0 \\ \implies \mathbb E[X] = c $$

0

-To add more details and generalize just a little bit more you can conclude that $\forall c \in \mathbb{R}$ you have that: $ V(X) \leq E[(X-c)^2]$

-Indeed:
1- $ V(X) = E[X^2] - E^2[X] $
2- $E[(X-c)^2] = E[X^2] +c^2 -2c E[X] $ now let define the following polynomial of degree $2$ depending to $c$ : $ P(c) = c^2 -2c E[X] +E[X^2] $
The minimum of this polynomial is obtained at $c = E[X] $ but on the other side $ P(c= E[X] ) = E[X^2] - E^2[X] = V(X) \leq P(c)$

Q.E.D.

OffHakhol
  • 708