Consider "random" x, y, z such that x + y + z = 1.
A number of different definitions of "random" might make sense here, but I'm interested in those for which expected value of all three random variables is 1/3 and where the possible range includes everything from 0 to 1.
I
think choosing a random point in an equilateral triangle and finding its
barycentric coordinates fits this bill.
Question 1: is this the case?
But i'm also interesting in finding a simple algorithm for actually generating these values. And, in particular, one that scales easily to any number of dimensions:
x1 + x2 + ... + xn = 1
Generate random x_i where each has expected value 1/n but can take on any value between 0 and 1.
Question 2: What is the simplest algorithm to accomplish generating such numbers?