I can sample from a normal distribution using Boost in c++.
I have now a simple question:
How can i sample from a multivariate normal distribution (n>2) using Boost functions (normal distribution, multi-arrays…) ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you won’t be able to do this without a little bit of linear algebra. Effectively, if you have a covariance matrix C, you can generate an upper triangular matrix L using Cholesky Decomposition such that C = L*L^T. This matrix L can be used now to generate a sample from the distribution with covariance C, by applying L to a vector of uncorrelated noise.