2
$\begingroup$

When learning Gibbs sampler, the most used example is bivariate normal. But what if we want to simulate multivariate normal distribution? The computation (mean and variance) of conditional distribution really annoys me.

Deriving the conditional distributions of a multivariate normal distribution gives some formula to compute it. But computing conditional mean and variable of each variable is quite complicated. For example, if you want to simulate trivariate normal distribution, any good way to computing conditional mean and variance of $x_2$ and $x_3$ after you have computed that of $x_1$ by that formula mentioned above in that link.

$\endgroup$
  • $\begingroup$ What is your question? $\endgroup$ – whuber Apr 1 '19 at 3:35
  • $\begingroup$ @whuber seeking an efficient way to computing conditional mean and variance of each variable $\endgroup$ – Spaceship222 Apr 1 '19 at 11:05
  • $\begingroup$ That's usually done using ordinary least squares regression. $\endgroup$ – whuber Apr 3 '19 at 14:23
  • $\begingroup$ @whuber How if given only mean and covariance matrix´╝č $\endgroup$ – Spaceship222 Apr 3 '19 at 15:42
  • $\begingroup$ stats.stackexchange.com/questions/107597 might help. $\endgroup$ – whuber Apr 3 '19 at 16:37