Mean Square Error Minimization Conditioned On Multivariate Normal Random Variables

1.1k Views Asked by At

Problem:

I want to show if the following MSE cost function can be expressed in a closed form:

$E[(Y-g(X))^2 | \boldsymbol X] \tag 1 $

and that if we can find a closed form $g(X)$ that minimizes (1). That is,

$$\arg \min_{g(x)} E[(Y-g(X))^2 | \boldsymbol X] \tag 2$$

where $\boldsymbol X=[X_1, X_2, ....., X_n]^T$ are jointly Gaussian random variables and $g(X)$ can be thought of a prediction conditioned on $\boldsymbol X$. Therefore, we can assume that $g(X)$ is also jointly distributed with the set $\boldsymbol X$. In other words,

$$(X1, X2, ...., X_A, g(X)) \sim \mathcal{N}(\mu, \Sigma). $$

where $\mu$ and $\Sigma$ are the mean and covariance matrix of $(X1, X2, ...., X_n, g(X))$, respectively.

So the question:

1) Can we find a closed form g(X) that minimizes the cost function in (1)?

2) Can we express the MSE cost function given by (1) in a closed form?

Details:

I want to observe some jointly distributed normal (not neccessarily independent) random variables $\boldsymbol X = \boldsymbol x$ and then make a prediction $g(X)$, which is also assumed to be Gaussian, and to determine the MSE with respect to the true value $Y$. That is, I want to ultimately find a closed form $g(X)$ that minimizes the conditional mean square error given in (1).

What I Did

Instead of (1), I defined the optimization problem as

$$\arg \min_{g(X)} E[(Y-g(X))^2] \tag 3 $$

without conditioning on $\boldsymbol X$.

Then,

$$E\left[Y-g(X)\right]^2 = \int_yy^2f_{Y|X}(y|x)dy - 2g(X)\int_yyf_{Y|X}(y|x)dy \\+ [g(X)]^2\int_yf_{Y|X}(y|x)dy \tag 4 $$

We can disregard the first term since it does not include $g(X)$. The integral in the second term is equal to the conditional expected value of $Y$ given $X$, and the integral in the last term is simply 1. Thus

$$\arg \min_{g(x)} E\left[Y-g(X)\right]^2 = \arg \min_{g(x)} \{ -2g(X)E(Y\mid X) + [g(X)]^2 \}.$$

Taking the derivative w.r.t $g(X)$, we can find that

$g(X) = E(Y\mid X) \tag 5 .$

Now I couldn't figure out how to write (1) in an integral form similar to (4) and how to use the joint normal distribution in equition. Any suggestions or lead to the solution will be appreciated. Thanks in advance!