The simplex
2016-10-25 — 2016-10-25
Wherein a Method for Producing a Uniform Point on the N‑simplex Is Presented, in Which N Independent Uniform(0,1) Draws Are Ordered and Their Successive Differences Are Taken as the Simplex Coordinates.
classification
metrics
probability
statistics
On this page
The space of convex combinations of things. Hacks for it.
1 Simulating uniformly from the simplex
This one is apparently “folk wisdom”.
But say I wish to simulate a vector drawn uniformly from the \(n\)-simplex.
- Simulate \(n\) random uniform variables on the unit interval, \((u_1, u_2, \dots, u_n)\)
- Sort them in decreasing order, \((u'_1, u'_2, \dots, u'_n)\)
- The random vector is \((u'_1-0, u'_2-u'_1, u'_3-u'_2, \dots, u'_n-u'_{n-1})\)
2 Simulating Dirichlet distributions
See Dirichlet variables, which are distributions over the simplex. C&C gumbel max tricks.
3 References
Friedman. 2008. “An Elementary Illustrated Introduction to Simplicial Sets.” arXiv:0809.4221 [Math].