# Can sum of two random variables be uniformly distributed

Say $$X$$ and $$Y$$ are two random variables where $$X\in [-\alpha,\alpha]$$, $$Y\in [-\alpha,\alpha]$$ and $$Z=X+Y$$. Is it possible to find two independent random variables with certain pdf (not necessarily identically distributed) that force $$Z$$ to be uniformly distributed (i.e. $$Z\sim \mathcal{U}[-2\alpha,2\alpha]$$)?

As the sum of $$N$$ random variables with zero mean resembles Gaussian distribution with zero mean, I suspect it is not possible to find two such random variables. Do you know any counterexample?

• Very rough sketch of argument: We can conclude that $P(|Z|>2\alpha-\epsilon) >0$ for every $2\alpha>\epsilon>0$, from which it follows that both $X$ and $Y$ have positive probability densities near the endpoints, but then $Z$ will more likely be $0$ than $\pm 2\alpha$... – uvs May 8 '14 at 13:18
• No, the sum $Z$ of two independent random variables $X$ and $Y$ cannot be uniformly distributed on an interval. The density function of a uniformly distributed random variable is discontinuous at the end points of the interval. However, the density of $Z$ is the convolution of the densities of $X$ and $Y$, $$f_Z(z) = \int_{-\infty}^\infty f_X(x)f_Y(z-x)\,\mathrm dx$$ and is a continuous function of $z$ (though not necessarily a differentiable function of $z$) for all $z$. – Dilip Sarwate May 8 '14 at 14:14
• The arguments in the previous comments apply when X and Y both have densities. Are you requiring this? – Did May 8 '14 at 15:32
• @Did I was assuming that $X$ and $Y$ are continuous random variables with density functions and not taking the OP's statement "$X \in \{-\alpha, \alpha\}$" literally but rather as typographical errors; assuming that the OP meant to write "$X\in [-\alpha,\alpha]$" – Dilip Sarwate May 8 '14 at 16:54
• @DilipSarwate I got that, and I agree that $X,Y\in\{-\alpha,\alpha\}$ makes little sense and should read $X,Y\in[-\alpha,\alpha]$. But my question to the OP is different--hence let us wait a reaction. – Did May 8 '14 at 21:25

Recall if $U_n$ are IID with Bernoulli distribution $$\mathbb P[U_n=0]=\frac{1}{2},\qquad \mathbb P[U_n=1]=\frac{1}{2},$$ then $$Z = \sum_{n=1}^\infty U_n 2^{-n}$$ is uniformly distributed on $[0,1]$. So let $$X = \sum_{n\text{ even}} U_n 2^{-n},\qquad Y = \sum_{n\text{ odd}} U_n 2^{-n}$$ to get independent $X,Y$ with $X+Y=Z$.
Let $X \sim {\mathcal U}[-\alpha, \alpha]$ and let $Y$ be a discrete r.v. taking values $\pm\alpha$ with equal probabilities. Then $X+Y \sim {\mathcal U}[-2\alpha, 2\alpha]$.
I believe that the sum of $n \geq 3$ independent r.v.'s distributed on $[-\alpha, \alpha]$ cannot be uniform on $[-n\alpha, n\alpha]$, but I have no proof of this.