I have an upcoming Regression Models exam and I am currently doing an exercise. The point of the exercise is to find a conditional variance $\operatorname{Var}(Y | X, Z)$.
Given:
- A random vector $X = (Y, X, Z)$ is Gaussian distribution with mean $\mu = (1, 2, 4)^T$ and covariance matrix:
$$\Sigma = \begin{pmatrix} 2 & 3 & 1\\ 3 & 5 & 2\\ 1 & 2 & 6 \end{pmatrix}$$
The formula that I use is the following:
$\operatorname{Var}(Y | X) = E[(y - \mu(x))^2 | X) = \operatorname{Var}(Y) - \operatorname{Cov}(Y, X)\operatorname{Cov}(X, X)^{-1}\operatorname{Cov}(X, Y)$
The problem: I do not understand what to do when there's more than one variable in the condition.
The formula you are using is a special case of:
In your situation you have $n=3$ with $X_a$ being a (univariate) random variable, and $X_b$ being a bivariate vector. So to compute the conditional variance you just partition the covariance matrix $\Sigma$ that you've been handed into four submatrices, and plug the relevant pieces into (2).
ADDED: In more detail, $X_a=Y$ and $X_b=(X,Z)^T$ so your covariance matrix $\Sigma$ is partitioned into $$\Sigma=\left(\begin{matrix}\Sigma_{a,a}&\Sigma_{a,b}\\\Sigma_{b,a}&\Sigma_{b,b}\end{matrix}\right) =\left( \begin{array}{c|cc} 2&3&1\\ \hline 3&5&2\\ 1&2&6 \end{array} \right).$$ Now read off the submatrices: $$\Sigma_{a,a}=2,\qquad \Sigma_{a,b}=\left(\begin{matrix}3&1\end{matrix}\right),\qquad \Sigma_{b,a}=\left(\begin{matrix}3\\1\end{matrix}\right),\qquad \Sigma_{b,b}=\left(\begin{matrix} 5&2\\2&6\end{matrix}\right).$$ Plug into (2): $$\operatorname{Var}(Y\mid X,Z)= 2 - \left(\begin{matrix}3&1\end{matrix}\right) \left(\begin{matrix} 5&2\\2&6\end{matrix}\right)^{-1} \left(\begin{matrix}3\\1\end{matrix}\right). $$ I leave it to you to perform the matrix operations.