# Compute expected value from two dimensional normal distribution

Random vector (X, Y) has the two-dimensional normal distribution with the density $$f(x,y)=\frac{1}{2\pi\sqrt{2}}\exp\left\{ -\frac{1}{8} \left[ 4x^2 +8x(y+3)+6(y+3)^2 \right] \right\}$$

Compute $$\mathbb{E} \left[ XY - 2X - 3Y^2 + 1 \right ]$$

Find the covariance matrix of the random vector $$(U, V) = (-2X+Y, X-Y)$$

Solution:

$$det \; C = 2$$

$$f(x,y)=\frac{1}{2\pi\sqrt{2}}\exp\left\{ -\frac{1}{4} \left[ 2x^2 +4x(y+3)+3(y+3)^2 \right] \right\}$$

$$m = \begin{pmatrix} 0\\ -3 \end{pmatrix} = \begin{pmatrix} \mathbb{E} X\\ \mathbb{E} Y \end{pmatrix}$$

$$C = \begin{pmatrix} 3 & 2\\ 2 & 2 \end{pmatrix} = \begin{pmatrix} Var X & Cov(X, Y)\\ Cov(X, Y) & Var Y \end{pmatrix}$$

$$\mathbb{E} \left[ XY - 2X - 3Y^2 + 1 \right ] = \mathbb{E}[XY] - 2\mathbb{E}X - 3\mathbb{E}[Y^2] + 1$$

$$Cov(X,Y)=\mathbb{E}[XY]-\mathbb{E}X\mathbb{E}Y \rightarrow \mathbb{E}[XY]=2$$

$$Var Y = \mathbb{E}(Y^2)-(\mathbb{E}Y)^2 \rightarrow (\mathbb{E}Y)^2 = 11$$

$$\mathbb{E} \left[ XY - 2X - 3Y^2 + 1 \right ] =2-2\cdot0-3\cdot11+1=-30$$

$$A \cdot \begin{pmatrix} X\\ Y \end{pmatrix} = \begin{pmatrix} -2X & Y\\ X & -Y \end{pmatrix} \rightarrow A = \begin{pmatrix} -2 & 1\\ 1 & -1 \end{pmatrix}$$

$$C_{UV} = A \cdot C \cdot A^T = \begin{pmatrix} 6 & -2\\ 2 & 1 \end{pmatrix}$$

I am asking for verification of the solution and corrections if needed.

• Does that mean that there is a mistake in the problem itself? Jun 22, 2022 at 17:07
• Never mind, I think it is fine
– Vons
Jun 22, 2022 at 17:11

The term in the exponent of $$f(x,y)$$ can be written as
$$\begin{split}-\frac 18\left[4x^2+8x(y+3)+6(y+3)^2\right] &= -\frac 12 \left[x^2+2x(y+3)+\frac 32(y+3)^2\right]\\ &=-\frac 12\begin{pmatrix}x\\ y+3\end{pmatrix}^T\begin{pmatrix}1&1\\1&3/2\end{pmatrix}\begin{pmatrix}x\\y+3\end{pmatrix}\end{split}$$
Thus $$\Sigma^{-1}=\begin{pmatrix}1&1\\1&3/2\end{pmatrix}$$ and the covariance matrix is $$\Sigma=\frac 1{3/2-1}\begin{pmatrix}3/2&-1\\-1&1\end{pmatrix}=\begin{pmatrix}3&-2\\-2&2\end{pmatrix}$$