# An efficient way to generate multivariate normal distribution by Gibbs sampler? [closed]

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.

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