I am going to generate a sample of random variables conditioning on a linear constraint. To make it clear, suppose that I want to generate multivariate gaussian $(0,\Sigma)$ conditioning on the plane P:$aX_1+bX_2+cX_3+dX_4=e$, where $\Sigma$ is a diagonal matrix with 1 on the diagonal.
My guess is that, simply generate a sample X of the multivariate gaussian $(0,\Sigma)$, and then project X on to the plane P.
Here comes the questions: how I can verify the guess is correct or not. Should I really compute the exact distribution of the conditional multivariate gaussian, and compare it with that of my guess? Or is there other methods?
Thank you.
A Gaussian vector of variance matrix $\Sigma=\Sigma_X$ behaves nicely under a linear (or affine) map, $Y=AX+B$. It stays gaussian with variance: $\Sigma_Y=A \Sigma A^T$. If $A=P$ is an orthogonal projection (so $P^T=P=P^2$) and $\Sigma_X$ the identity times $\sigma^2$, then $$\Sigma_Y=P \Sigma_X P^T=\sigma^2 P^2=\sigma^2 P$$ and your new r.v. will have $\sigma^2$ as eigenvalue of multiplicity ${\dim\ }P$ and zero for the rest. I recommend choosing an orthogonal projection; typically what you want.