What's the right way to generate a random probability vector $p={p_1,\ldots,p_n} \in {(0,1)}^n$ where $\sum_i p_i=1$, uniformly distributed over the $(n-1)$-dimensional simplex?
What I have is
Intervals = Table[{0, 1}, {i, n}] RandomPoint := Block[{a}, a = RandomVariate[UniformDistribution[Intervals]]; a/Total[a]]; But I am unsure that this is correct. In particular, I'm unsure that it's any different from:
RandomPoint := Block[{a}, a = Table[Random[], {i, n}]; a/Total[a]]; And the latter clearly will not distribute vectors uniformly. Is the first code the right one?




DirichletDistributionmight help? $\endgroup$