I am trying to generate N random samples in J dimensions subject to a constraint. Each dimension j is bounded by a unique "Lower_Bound" and "Upper_Bound," which both are bounded [0,1]. The constraint is that the sum across j for each sample n = 1.0. EG, for each n, the sum of j(i) = 1.
Owing to the potential of uniques range for every dimension, it is not obvious to me how I can generate the samples to ensure a uniform distribution over the space. Simply creating an RV for each j-th element in order would bias the results.
I have come up a (possibly inelegant) solution: I generate an ordered list of length J, which I shuffle for every iteration of N. I then using each shuffled list to generate j(i).
Query - does this generate samples uniformly distributed over the space, and is there a statistical test I can perform to quantify the uniformity? By uniformly distributed, I mean there is an equal probability of picking any point on the J dimensional surface.
The reason I raise this point is because most of the sampling algorithms I have come up with have subtle biases which result in some parts of the space being sampled more than others.
I need an analogue to a Gini coeffecient, I am out of my depth here!