Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose that I want to generate a random probability vector $p = (p_1,\dots,p_d) \in [0,1]^d$, distributed uniformly over the simplex of probability vectors in $\mathbb{R}^d$. I would like to generate $U_i \stackrel{i.i.d.}{\sim} F, \;i=1,\dots,d$ from some distribution $F$, so that $(p_i) := (\frac{U_i}{\sum_{j=1}^d U_j})$ gives the desired random probability vector. What should $F$ be?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

An exponential distribution $f_U(u)= \lambda \, e^{-\lambda \,u}$, $u \ge 0$, with arbitrary $\lambda>0$ should work. The joint probability

$$f_{\bf u}({\bf u})=\lambda^d \exp[-\lambda (u_1+u_2 +\cdots +u_d)]$$

is constant over the unit simplex. And it's also uniform over any simplex $u_1+u_2 +\cdots +u_d = t$. And the operation $(p_i) := (\frac{U_i}{\sum_{j=1}^d U_j})$ amounts to a radial projection over the unit simplex, which, by geometric similarity, preserves the uniformity.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.