1

Given

  • I have a $n$ dimensional $\vec{a}$.
  • All elements of $\vec{a}$ are between 0 and a positive number $K$.
  • $n$ is about 15 to 20.

Problem

I want to randomly and unbiasedly choose a vector $\vec{b}$ such that:

  • Elements of $\vec{b}$ are between 0 and 1.
  • $\vec{a} \cdot \vec{b} = 1$

How to do that?

Attempt

I thought about the following:

  • Choose $\vec{c}$, a random direction perpendicular to $\vec{b}$.
  • Find range of $\theta$ such that $\vec{b} = \frac{\vec{a}}{\lVert \vec{a} \rVert} + \theta\vec{c}$ is within bounds.
  • Randoly choose a $\theta$

The problem is that this is not unbiased. Some directions have a larger range of legal $\theta$, and those directions should be chosen more often.

R zu
  • 168
  • 10
  • Is that equivalent to choosing a random point on a simplex with $\vec{a}$ as the normal vector? – R zu Nov 07 '18 at 18:16
  • Before going to $n$-dimensional, have you made a detailed analysis on 2-dimensional? How do you define unbiased? Are you able to formalize your requirement, "Some directions have a larger range of legal θ, and those directions should be chosen more often" into probability terms? – John L. Nov 07 '18 at 18:31
  • Unbiased: Every $\vec{c}$ that satisfies the conditions in the problem has equal chance to be chosen. "Some directions..." is not a requirement in the problem. – R zu Nov 07 '18 at 19:17

1 Answers1

1

Uniformly sampling from a simplex with equation $\vec{a} \cdot \vec{b} = 1$, and reject samples out of bounds.

Several answers are posted here for uniform sampling over a simplex: Uniform sampling from a simplex

R zu
  • 168
  • 10