Creating random variables whose pairwise differences are uniformly distributed

Solution 1:

Wew this one took awhile. But here's a way to do it with $d_1 = 2, d_2 = 3$, and $d_3 = 4$:

  1. Pick $x$ from $U(-2, 2)$.
  2. Set $p_1(x) = x$.
  3. Set $p_2(x) = 0$.
  4. Toss a coin $c$. If $c$ is Heads, set

$$p_3(x) = \begin{cases} 3x+6 & \text{if }x<-1\\ -3x & \text{if }-1<x<1\\ 3x-6 & \text{if }1<x \end{cases}$$ Otherwise, if $c$ is Tails, set

$$p_3(x) = \begin{cases} -3x-6 & \text{if }x<-1\\ -3x & \text{if }-1<x<1\\ -3x+6 & \text{if }1<x \end{cases}$$

One can verify with conventional methods that all pairwise distributions satisfy the above requirements.

I've included below a graphical view of the above setting. The dashed red lines correspond to the $\frac{1}{2}$ probability of $p_3$ following either one. A graphical viewing of the above setting