What's the best way to sample from multivariate probability density functions that are proportional to $\exp(-\|x\|_2)$ or $\|x\|_2^p \exp(-\|x\|_2)$ for some positive integer $p$ with $x \in \mathbb{R}^d$?
1 Answer
The density of $R=\|\mathbf{x}\|_2$ is proportional to the density of $\mathbf{x}$ at $r=\|\mathbf{x}\|_2$ times the surface area of a $d$-sphere which is proportional to $r^{d-1}$ and thus, a $\operatorname{Gamma}(d+p,1)$ density. To simulate from the target density, one algorithm is to first simulate $\mathbf{z}$ from a standard $d$-dimensional multivariate normal, simulate $R \sim \operatorname{Gamma}(d+p,1)$ and finally compute $\mathbf{x}=R\frac{\mathbf{z}}{\|\mathbf{z}\|_2}$.