# For i.i.d. random varianbles $X$, $Y$, can $X-Y$ be uniform [0,1]?

Is there any distribution for two i.i.d. random variables $X,Y$ where the joint distribution of $X-Y$ is uniform over support [0,1]?

• If Y is ever (with positive probability) > X, then X-Y < 0, so it can't be U[0,1]. If X and Y are iid, how can Y be guaranteed (i.e., with probability 1) to not be > X unless X and Y are both the same constants with probability 1. In such case X - Y will equal 0 with probability 1. Therefore, there exists no iid X and Y such that X - Y is U[0,1]. Do you see a flaw in my reasoning? Aug 11, 2016 at 12:05
• @CagdasOzgenc, note that X and Y are i.i.d., so they have the same marginal distribution. Aug 11, 2016 at 12:16
• I think the word joint should be omitted. You are talking about the univariate distribution of $X-Y$, aren't you? Aug 11, 2016 at 12:32
• This is nearly identical to stats.stackexchange.com/questions/125360, but with $X+Y$ replaced by $X-Y$ (which appears to make the solution easier). I believe Silverfish's answer in that thread applies directly to this one.
– whuber
Aug 11, 2016 at 13:01

If $Y$ is ever (with positive probability) $> X$, then $X - Y < 0$, so it can't be $U[0,1]$. If $X$ and $Y$ are iid, $Y$ can not be guaranteed (i.e., with probability $1$) to not be $> X$ unless $X$ and $Y$ are both the same constants with probability 1. In such case $X - Y$ will equal $0$ with probability $1$. Therefore, there exists no iid $X$ and $Y$ such that $X - Y$ is $U[0,1]$.
For any i.i.d. $X$ and $Y$ the distribution of their difference is invariant under sign-change, $X - Y \overset{d}{\sim} Y - X$, and thus symmetric around zero, something $U[0, 1]$ is not.