TITLE: How to generate random points in $\ell_p$ balls?
QUESTION [11 upvotes]: How do I feasibly generate a random sample from an $n$-dimensional $\ell_p$ ball? Specifically, I'm interested in $p=1$ and large $n$. I'm looking for descriptions analogous to the statement for $p=2$: Take $n$ standard gaussian random variables and normalize.

REPLY [26 votes]: For arbitrary p, this paper does exactly what you want.  Specifically, pick $X_1,\ldots,X_n$ independently with density proportional to $\exp(-|x|^p)$, and $Y$ an independent exponential random variable with mean 1. Then the random vector
$$\frac{(X_1,\ldots,X_n)}{(Y+\sum |X_i|^p)^{1/p}}$$
is uniformly distributed in the unit ball of $\ell_p^n$.
The paper also shows how to generate certain other distributions on the $\ell_p^n$ ball by modifying the distribution of $Y$.