Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simplex point picking

  1. Aug 21, 2014 #1
    I have an application where I need to pick a probability distribution [itex](x_{1},\ldots,x_{n})[/itex] at random and uniformly from the simplex of all points for which the coordinates add up to 1, i.e. [tex]\sum_{i=1}^{n}x_{i}=1.[/tex] Surprisingly, I didn't find much about simplex point picking on the internet, but http://en.wikipedia.org/wiki/User:Skinnerd/Simplex_Point_Picking appears to address this issue. Skinnerd suggests to pick individual members of [itex](y_{1},\ldots,y_{n})[/itex] randomly from a uniform distribution over the interval [itex](0,1)[/itex] and then take [tex]x_{i}=\frac{\ln{}y_{i}}{\sum{}\ln{}y_{i}}.[/tex] So far so good (although, why does he need the minus sign in his [itex]x_{i}=-\ln{}y_{i}[/itex]?).

    My question is: what is the distribution of [itex]x_{i}[/itex] over the interval [itex](0,1)[/itex], i.e. what is the probability [itex]P(a<x<b)[/itex] that one of these coordinates is in [itex](a,b)\subseteq{}(0,1)[/itex]?
     
  2. jcsd
  3. Aug 22, 2014 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    If Xi = x, that leaves a hyperpyramid ##\Sigma_{i\neq i}X_j = 1 - x##. Can't you make the p.d.f of Xi proportional to the volume of that?
     
  4. Aug 24, 2014 #3
    volume of n-dimensional simplex

    Great idea! I am a little confused about terminology. Hyperpyramid at http://physicsinsights.org/pyramids-1.html seems to mean that the height of the pyramid is the same as the side of the base -- which is not what we want here. We want something more like a generalization for [itex]n[/itex] dimensions of a pentatope, see http://mathworld.wolfram.com/Pentatope.html. Mathworld advises on the volume of a simplex in [itex]n[/itex] dimensions at http://mathworld.wolfram.com/Cayley-MengerDeterminant.html. What haruspex is suggesting, as I see it, is that

    [tex]P(0<x<b)=S(\sqrt{2})-S(\sqrt{2}(1-b))[/tex]

    where [itex]S(z)[/itex] is the volume of a simplex in [itex]n[/itex] dimensions whose side length is [itex]z[/itex]. In our case, [itex]z=\sqrt{2}[/itex] because [itex]x_{1}+\ldots{}+x_{n}=1[/itex].
     
  5. Aug 24, 2014 #4

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Seems that simplex is the word I should have used.
    Not sure that's quite what I was saying. For a start, there should be a ratio of volumes in there.
    I think I'm saying the p.d.f., f(x) = Sn-1((1-x)√2)/Sn(√2), or maybe the subscripts should be n, n+1. You'd then to integrate that to get the interval probability.
     
  6. Aug 28, 2014 #5
    Yes, indeed, it should be a ratio, not a difference. Thanks, haruspex!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook