Correlated multivariable gaussian random number generation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
iibewegung
Messages
14
Reaction score
0
[tex]\mathrm{prob} \propto \mathrm{e}^{-\frac{(a -x_1)^2}{2 \sigma^2}} \mathrm{e}^{-\frac{(x_1 -x_2)^2}{2 \sigma^2}} \mathrm{e}^{-\frac{(x_2 -x_3)^2}{2 \sigma^2}} \mathrm{e}^{-\frac{(x_3 -b)^2}{2 \sigma^2}}[/tex]

a and b are known real constants.
Is there a way to generate [tex]x_1[/tex], [tex]x_2[/tex], [tex]x_3[/tex] independently using a single gaussian random-number generator 3 times, then transforming them somehow?

I'm almost certain this appears in statistics or applied math textbooks but I don't know what to look for.
 
Physics news on Phys.org
iibewegung said:
Is there a way to generate [tex]x_1[/tex], [tex]x_2[/tex], [tex]x_3[/tex] independently using a single gaussian random-number generator 3 times, then transforming them somehow?

Yes there is.

First you need to rewrite your PDF as a standard http://en.wikipedia.org/wiki/Multivariate_normal_distribution" [itex]\Sigma^{1/2}[/itex] of [itex]\Sigma[/itex].

Then you can generate samples using

[tex]x = \Sigma^{1/2} y + \mu[/tex]

where [itex]y[/itex] is a 3-vector of single Gaussian (zero mean, variance=1) random numbers.
 
Last edited by a moderator: