# Sum of uniform random variable and non-uniform random variable [closed]

Let $G=\mathbf{Z}/p \mathbf{Z}$ where $p$ is prime, $X\in G$ be a uniform random variable and $Y\in G^{*}$ be any random variable.

Is it possible to have $Z=X+Y \in G$ with a uniform distribution?

If so, is there any condition on the variable $Y$ that guarantees that $Z$ is uniform?

## closed as unclear what you're asking by Did, JKnecht, drhab, Semiclassical, hardmathApr 22 '16 at 22:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Uniform on what? – Did Apr 22 '16 at 14:27
• It's certainly possible. Say $X$ is uniform on $[0,1]$, $X$ and $Y$ are independent, and $P(Y=0)=P(Y=1)=1/2$. – David C. Ullrich Apr 22 '16 at 14:30
• @NumBee Let us know when you decide what the question actually is - there's nothing about $\Bbb Z/ p\Bbb Z$ in the edited version... – David C. Ullrich Apr 22 '16 at 14:37
• @NumBee If, as suggested in your comment, you actually mean to be talking about random variables with values in $G=\Bbb Z/p\Bbb Z$, and so the sum is also supposed to be the sum in $G$, then (assuming $X$ and $Y$ are independent) if $X$ is uniform on $G$ then $X+Y$ is also uniform on $G$ for any $Y$. – David C. Ullrich Apr 22 '16 at 14:40
• If there's no assumption of independence then you can't expect to say anything about $X+Y$. This is sort of so clear that the other commenters have been assuming you're talking about independent variables, without, er, comment. – David C. Ullrich Apr 22 '16 at 14:53

Guessing that $G^*$ denotes the set of non-zero elements of $G$, and hoping that the question has finally stabilized: If $X$ and $Y$ are independent then $X+Y$ is uniform on $G$. Without assuming independence I don't see how you can expect to say anything about $X+Y$.

• Yes, $G*:=G\setminus\{0\}$. So if independence is needed, is this a standard result for discrete variables? – NumBee Apr 22 '16 at 15:08
• I don't know about "standard", but it's clear for any finite group. Say there are $p$ elements. So $P(X=a)=1/p$ for every $a$. Given $b in G$, $X+b=a$ if and only if $X = a-b$, so $P(X+b=a)=P(X=a-b)=1/p$. That's the result for constant $Y$; the result for a random variable $Y$ follows. – David C. Ullrich Apr 22 '16 at 18:51

Let $U$ be uniform continuous on $[0,1]$ and $V$ be uniform discrete on $\{0,1,\cdots,m\}$. Then $U+V$ is uniform continuous on $[0,m+1]$.

More generally, assume $U$ to be uniform continuous on $[0,1]$ and $V$ to be another random variable such that $U+V$ is uniform continuous on some other interval. By translation, we can assume that this interval is $[0,L]$ for some $L>0$.

Taking moment-generating functions, we see that: $$\frac{e^t-1}{t}\cdot M_V(t)=\frac{e^{Lt}-1}{Lt}\implies M_V(t)=\frac{e^{Lt}-1}{L(e^t-1)}$$

From here, I can't entirely finish - I know that integer $L$ gives discrete uniform $V$, but I'm not sure for which other values of $L$ it gives a proper MGF.

• Good answer to what is alas no longer the question. People shouldn't do that... – David C. Ullrich Apr 22 '16 at 14:57
• Sorry for the delay in editing my question. But I appreciate the answer! – NumBee Apr 22 '16 at 15:10