1

If I want to generate independent, exponentially distributed random numbers, I can take the inverse of the CDF, i.e., if $$X\sim\lambda e^{-\lambda x}$$ for $x\in\mathbb{R}_+,$ then a random number $u$, drawn uniformly from $[0;1],$ would allow me to construct numbers distributed as $X$, using the CDF for $X$:

\begin{align} u=1-e^{-\lambda x} \implies x=-\frac{1}{\lambda}\ln(1-u) \end{align}

I would like to do the same, but for multivariate distributions, specifically spherically symmetric ones. For the normal multivariate distribution, this is easy, as all variables are iid. However, this is not the case for other distributions, and this is where my troubles lie.

Example: Let's say I want to generate numbers drawn from some distribution described in this technical report, say the multivariate Student distribution with $\mu=0$ and $\sigma=\nu=1$:

$$p(\mathbf{y})=\frac{\Gamma\!\left(\frac{n+1}{2}\right)}{\pi^{\frac{n}{2}}\Gamma\!\left(\frac{n}{2}\right)}\left(1+|\mathbf{y}|^2\right)^{-\frac{n+1}{2}},$$ where $\mathbf{y}$ is the $n$-dimensional vector that I would like to generate.

How can I, given the distribution, generate such vectors, preferably using only uniformly or normally distributed random numbers?

I have Matlab and Mathematica at my disposal. In the case of the multivariate Student distribution, I've found mvtrnd (documentation), but I don't know how to choose the correlation matrix such that the resulting distribution is still spherically symmetric... it seems a bit arbitrary.

However, even if I can get this function to work, such in-built features may not exist for all distributions I'd like to draw from. Therefore I'd like more general methods of generation. I've looked a bit at the hit-or-miss method, but this is very inefficient for higher dimensions and I wouldn't know what to do when the distribution in question has infinite support.

My goal is to draw vectors from a list of different spherically symmetric distributions to see if these vectors all have the same probability of having some specific property that I'm investigating, regardless of the distribution (as long as it is spherically symmetric).

Thank you.

  • Since you have spherical symmetry, the problem decomposes into two problems: the "universal" problem of sampling uniformly from the unit sphere, and the "context-dependent" problem of sampling the norm from the particular distribution you have to deal with. Do you know how to do the former? – Ian Mar 14 '17 at 14:58
  • @Ian I have a working algorithm for generating numbers that are chose uniformly from the unit $n$-ball (and I suspect it is easy to find for the sphere as well). However, I don't see the split - isn't the spherical symmetry incorporated into the distributions in question? – Bobson Dugnutt Mar 14 '17 at 15:08
  • My point is that since you have spherical symmetry, your problem is to choose a norm, then sample a point from the sphere, then multiply the two. So once you know how to sample from the sphere, you can forget about the problem being multivariate at all. – Ian Mar 14 '17 at 15:37
  • @Ian I haven't really worked with norms or metrics (I suspect those concepts are related?); if you'd explain in an answer (how to choose a norm for a given dist.), I'd be very grateful - it sounds a lot easier than I would have expected! – Bobson Dugnutt Mar 14 '17 at 15:41
  • When I said norm I just meant norm of a vector (same as length). In other words if you have a spherically symmetric random vector $X$ then you can write $X=R \Theta$ where $\Theta$ is uniformly distributed on the unit sphere and $R$ is some arbitrary nonnegative random variable independent of $\Theta$. So if you know how to generate $\Theta$ then the problem is now single-variate. It might still be hard to generate $R$, but at least you can forget about the multivariate character of the problem. – Ian Mar 14 '17 at 15:47
  • @Ian Ah, okay. I assume you mean $[R\Theta]_i=R_i \Theta_i$, and not the inner product? How would $R$ be generated for instance in the case of the Student dist.? Is it simply that the entries of $R$ are iid as the univariate Student dist. (and this is the sense in which the problem becomes univariate)? – Bobson Dugnutt Mar 14 '17 at 15:59
  • I mean that $R$ is a scalar, nonnegative random variable, equal to $| X |$, while $\Theta$ is uniformly distributed on the sphere, and the multiplication is that of a scalar with a vector. Thus for fixed $\Theta$, $X$ becomes univariate (specifically, determined by $R$). – Ian Mar 14 '17 at 18:06
  • @Ian I see now. So the question then becomes how to generate $||X||$ for a given distribution. I can see that the pdf of the 2-norm for a multivar. normal dist. is the chi dist. Do you know of any resources where results similar to this (i.e., for other dist.s) are listed? (This is my final request, I promise! (: ) – Bobson Dugnutt Mar 14 '17 at 18:45
  • Unfortunately I'm no expert on this issue, so the main example I know is for Gaussians, where the density is proportional to $r^{n-1} e^{-r^2}$ (which can be related to the incomplete Gamma function in a straightforward manner). – Ian Mar 14 '17 at 20:16
  • @Ian No problem, thank you very much for your time! Do you have a reference for that $X$ can be written as $\Theta ||X||,$ or is it easy to see? (Oh god, that was definitely the last question!) – Bobson Dugnutt Mar 14 '17 at 20:31
  • That's pretty much just what spherical symmetry means, so yeah it's pretty easy to see. – Ian Mar 14 '17 at 20:34
  • @Ian True. Thanks again! – Bobson Dugnutt Mar 14 '17 at 20:36

0 Answers0