I am not being very precise here, because I do not know what would be the more precise terminology. I would definitely appreciate any comments on my method and my terminology.

By choosing uniformly from a part of a plane I mean that the probability of a point lying in a particular "sub area" of the whole area of choice should be the ratio of the "areas/ volume/ higher dimensional volume" of the sub area and the whole area.

Suppose I have to draw $x_1,x_2,x_3\geq 0$ uniformly from the plane $a_1 x+a_2 y +a_3 z=1$ with $a_i>0$

Can I draw $x$ from $U(0,\frac 1 {a_1})$, then $y$ from $U(0,\frac 1 {a_2} (1-a_1 x))$ and then $z$ would just be $\frac {1-a_1 x-a_2 y} {a_3}$. Does that sound correct?

As a followup question, if I am planning to choose any point from the sub plane of $a_1 x+a_2 y +a_3 z=1$ where $x>y>z\geq0$, should I draw $x$ from $U(\frac 1 {\sum_i a_1},\frac 1 {a_1})$, then $y$ from $U(\frac 1 {a_2+a_3} (1-a_1 x),\frac 1 {a_2} (1-a_1 x))$ and then $z$ would just be $\frac {1-a_1 x-a_2 y} {a_3}$.

Would the exercises be similar in higher dimensions?

  • $\begingroup$ Hello @JohnColeman, thanks for the response! I thought that once I restrict x,y,z to be non-negative, I do have a finite volume below the plane, what am I missing? $\endgroup$ – Juanito Jul 4 '16 at 19:26
  • $\begingroup$ "By choosing uniformly from a part of a plane". I called it a part of a plane, but I am glad to call it a bounded triangle if that helps the conversation! $\endgroup$ – Juanito Jul 4 '16 at 19:31
  • $\begingroup$ You are absolutely correct. I meant $a_i>0$. Thanks. $\endgroup$ – Juanito Jul 4 '16 at 19:32
  • 1
    $\begingroup$ This seems relevant: cs.stackexchange.com/q/3227 . This does as well: mathoverflow.net/q/76255/89084 $\endgroup$ – John Coleman Jul 4 '16 at 19:33
  • $\begingroup$ This is great. I am guessing that I can calculate $a1 x, a2 y, a3 z$ from their algorithm first, and then back calculate $x,y,z$ . Would that be sufficient? Also they do not comment on what happens when I restrict the area of choice to $x>y>z$. $\endgroup$ – Juanito Jul 4 '16 at 20:00

The triangle $$T:=\{(x_1,x_2,x_3)\>|\>x_k\geq0,\ a_1x_1+a_2x_2+a_3x_3=1\}$$ carries a natural measure, namely area. This area is related by a constant factor with the natural measure on its orthogonal projection $T'$ onto the $(x_1,x_2)$-plane, given by $$T'=\{x_1,x_2)\>|\>x_k\geq0,\ a_1x_1+a_2x_2\leq1\}\ .$$ We therefore have to choose a uniformly distributed point $(x_1,x_2)\in T'$, and then $x_3$ is given by $x_3={1\over a_3}(1-a_1x_1-a_2x_2)$.

In order to obtain such a point $(x_1,x_2)\in T'$ choose $x_1$ uniformly in $\bigl[0,{1\over a_1}\bigr]$, and independently $x_2$ uniformly in $\bigl[0,{1\over a_2}\bigr]$. If $a_1x_1+a_2x_2>1$ replace $(x_1,x_2)$ by its mirror point $(x_1',x_2'):=\bigl({1\over a_1}-x_1, \>{1\over a_2}-x_2\bigr)$.

Your proposal "Can I draw $x_1$ from $U(0,\frac 1 {a_1})$, then $x_2$ from $U(0,\frac 1 {a_2} (1-a_1 x))$, and then $x_3$ would just be $\frac {1-a_1 x_1-a_2 x_2} {a_3}$" does not lead to a uniform distribution in $T'$.

  • $\begingroup$ I figured that my method does not work from John's links and some other blog posts. Thanks for the follow up answer about what works. Would you also have an insight about what happens when we restrict the choice area to x>y>z? $\endgroup$ – Juanito Jul 4 '16 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.