[R] Generate random numbers up to one

Alberto Monteiro albmont at centroin.com.br
Tue Mar 6 20:27:12 CET 2007


Ted Harding wrote:
> 
> And, specifically (to take just 2 RVs X and Y), while U = X/(X+Y)
> and V = Y/(A+Y) are two RVs which summ to 1, the distribution of U
> is not the same as the distribution of X conditional on (X+Y = 1).
> 
This question appeared in October 2006, and the answer was
the Dirichlet distribution with parameters (1,1,1...1):

http://en.wikipedia.org/wiki/Dirichlet_distribution

It's the distribution of uniform U1, U2, ... Un with the
restriction that U1 + U2 + ... + Un = 1.

Alberto Monteiro



More information about the R-help mailing list