Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sampling Complexity of Multivariate Normal Distribution

What is the computational complexity of sampling from a multivariate normal distribution ?

Does the covariance matrix need to be inverted first, yielding a O(n^3) algorithm or there exists algorithms with complexity O(n^2) ?

like image 700
recursix Avatar asked Aug 30 '26 10:08

recursix


1 Answers

If C is your covariance matrix, and C=LLT is its Cholesky decomposition, then Lx would have the required covariance structure. Here, x is an n-vector of standard normal variables.

Cholesky decomposition takes O(n^3) time to compute. However, if you do it upfront and then just use L, you'll have amortized the cost across all the random samples you compute.

like image 132
NPE Avatar answered Sep 06 '26 21:09

NPE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!