non-uniform distribution

Ian hobson42 at gmaiil.com
Sat Jun 12 09:21:04 EDT 2010


On 12/06/10 11:05, Javier Montoya wrote:
> Dear all,
>
> I need to generate a vector of random float numbers between [0,1] such
> that their sum equals 1 and that are distributed non-uniformly.
> Is there any python function that generates such a vector?
>
> Best wishes
>    
Hi Javier,

The answer to your question is "No", and the reason is that your 
requirement is impossible.

Whatever distribution you choose - and you have not said what you 
require - will be altered by any scaling to meet the constraint that the 
total is 1.

What exactly are you trying to achieve?

Regards

Ian



More information about the Python-list mailing list