Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sampling uniformly from the n-simplex.

12 views
Skip to first unread message

Jon McAuliffe

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to

i need to generate a random vector deviate from the n-simplex. my
initial thought was to generate n uniform deviates on [0,1], then
normalize them all to their sum. i'm concerned that this does not
result in the correct behavior, however. can anyone comment? please
email replies.

thanks
jon.

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!


Horst Kraemer

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to
On Mon, 20 Dec 1999 11:56:19 -0800, Jon McAuliffe
<jo...@thoughtport.com> wrote:

>
> i need to generate a random vector deviate from the n-simplex. my
> initial thought was to generate n uniform deviates on [0,1], then
> normalize them all to their sum. i'm concerned that this does not
> result in the correct behavior, however. can anyone comment?

Indeed, this is not correct. A correct procedure is this:

Create a vector of n uniform RVs in [0..1] numbered u_1...u_{n-1}.
Sort u_i in ascending order, together with s_0=0,s_n=1, this yields an
ascending sequence

0=s_0 <= s_1 <= ... <= s_{n-1} <= s_{n} = 1

then the vector of the differences

d_i := s_i-s_{i-1}, i=1,..,n


has the desired property that d_i are uniformly distributed in the set
Sum d_i = 1.


Regards
Horst


0 new messages