Skip to content
Prev 273973 / 398506 Next

How to draw 4 random weights that sum up to 1?

On 10.10.2011 18:10, Alexander Engelhardt wrote:
Yes, although better combine both ways to

w <- runif(4)
w <- w / sum(w)

Uwe Ligges