How to solve a conditional probability of a 3d-gaussian distribution

437 Views Asked by At

Like the question refers to

https://stats.stackexchange.com/questions/30588/deriving-the-conditional-distributions-of-a-multivariate-normal-distribution

which is a conditional probability of a 2d gaussian. Now I wonder if I have a 3d gaussian density $$P(A=a, B=b, C=c)\sim N(\mu,\sigma)$$ in which$$\mu=[\mu_1,\mu_2,\mu_3],\sigma=[[\sigma_{11}, \sigma_{12}, \sigma_{13}], [\sigma_{21}, \sigma_{22}, \sigma_{23}], [\sigma_{31}, \sigma_{32}, \sigma_{33}]]$$ Given $a_0$ and $b_0$. How do I derive the conditonnal distribution of $P(C=c\mid A=a_0,B=b_0)$?

1

There are 1 best solutions below

1
On

The question to which you links fully includes your own question. Your mistake is that you to the vectors and matrices in that other question to be scalars. To quote that question:

We have a multivariate normal vector ${\boldsymbol Y} \sim \mathcal{N}(\boldsymbol\mu, \Sigma)$. Consider partitioning $\boldsymbol\mu$ and ${\boldsymbol Y}$ into $$\boldsymbol\mu = \begin{bmatrix} \boldsymbol\mu_1 \\ \boldsymbol\mu_2 \end{bmatrix} $$ $${\boldsymbol Y}=\begin{bmatrix}{\boldsymbol y}_1 \\ {\boldsymbol y}_2 \end{bmatrix}$$ with a similar partition of $\Sigma$ into $$ \begin{bmatrix} \Sigma_{11} & \Sigma_{12}\\ \Sigma_{21} & \Sigma_{22} \end{bmatrix} $$

Here we can take $\boldsymbol\mu_1$ to be an $n\times1$ column vector and $\boldsymbol\mu_2$ to be an $m\times1$ column vector, and $\Sigma_{11}$ would then be an $n\times n$ matrix, $\Sigma_{12}$ would be an $n\times m$ matrix, $\Sigma_{21}$ would be the transpose of $\Sigma_{12},$ and thus an $m\times n$ matrix, and $\Sigma_{22}$ would be an $m\times m$ matrix.

The posted answer reports the conditional expected value of $\boldsymbol y_1,$ given that ${\boldsymbol y}_2={\boldsymbol a},$ to be $$ \boldsymbol\mu_1+\Sigma_{12}{\Sigma_{22}}^{-1}({\boldsymbol a}-\boldsymbol\mu_2). $$

Thus, in your notation, the conditional expected value of $C,$ given that $A=a_0$ and $B=b_0,$ is $$ \mu_1 + \big[\sigma_{12},\, \sigma_{13} \big] \left[ \begin{array}{cc} \sigma_{22} & \sigma_{23} \\ \sigma_{23} & \sigma_{33} \end{array} \right]^{-1} \left[ \begin{array}{c} b_0-\mu_2 \\ c_0-\mu_3 \end{array} \right] $$ which is a scalar and with some simplification can be expressed without matrix notation if that is useful.

The conditional variance is \begin{align} & \Sigma_{11}-\Sigma_{12}{\Sigma_{22}}^{-1}\Sigma_{21} \\[8pt] = {} & \sigma_{11} - \big[ \sigma_{12},\, \sigma_{13} \big] \left[ \begin{array}{cc} \sigma_{22} & \sigma_{23} \\ \sigma_{23} & \sigma_{33} \end{array} \right]^{-1} \left[ \begin{array}{c} \sigma_{12} \\ \sigma_{13} \end{array} \right]. \end{align} And this is also a scalar and can be written without matrix notation.