Let X and Y be two independent $U[0,1]$ random variables. Find the PDF of Z = (X+Y) mod 1

3.6k Views Asked by At

The question states:

Let X and Y be two independent $U[0,1]$ random variables. Find the probability density of $Z = (X+Y)$ mod $1$ meaning that $Z = X+Y$ if $X+Y < 1$ and $Z = X+Y-1$ if $X+Y>1$

I believe since $X$ and $Y$ are independent, the pdf is simply the convolution of the pdf of $X$ and the pdf of $Y$. Although this might seem like a simple question, I'm not sure what that looks like or how to find the convolution of these two random variables.

Thanks so much for your help in advanced, I really appreciate it!

2

There are 2 best solutions below

7
On

I think, there might be a simpler solution (may be a number theoretic or combinatoric solution), but I wrote mine. I hope it will be helpful. Please draw the chart for the integration to understand better.

Let $W=X+Y$, then for $0<w\leq 1$, we have

\begin{eqnarray*} \Pr(X+Y\leq w)=\int_0^w\int_0^{w-x}\mathrm{d}y\mathrm{d}x=\frac{w^2}{2} \end{eqnarray*}

for $1<w\leq 2$, we have

\begin{eqnarray*} \Pr(X+Y\leq w)=1-\Pr(X+Y>w)=1-\int_{w-1}^1\int_{w-x}^1\mathrm{d}y\mathrm{d}x=2w-\frac{w^2}{2}-1 \end{eqnarray*}

Hence,

\begin{eqnarray*} F_{X+Y}(w)&=&0, \; w\leq 0\\ &=&\frac{w^2}{2}, \; 0<w\leq 1\\ &=&2w-\frac{w^2}{2}-1, \; 1<w\leq 2\\ &=&1, \; w>2 \end{eqnarray*}

Next, we know that $Z=W\bmod 1$, then for $0<z\leq 1$, we get

\begin{eqnarray*} \Pr(W\bmod 1\leq z)&=&\Pr(W\leq z)+\Pr(1<W\leq 1+z)\\ &=&F_{X+Y}(z)+[F_{X+Y}(1+z)-F_{X+Y}(1)]=z \end{eqnarray*}

Hence,

\begin{eqnarray*} F_{(X+Y)\bmod 1}(z)&=&0, \; z\leq 0\\ &=&z, \; 0<z\leq 1\\ &=&1, \; z>1 \end{eqnarray*}

or

\begin{eqnarray*} f_{(X+Y)\bmod 1}(z)&=&1, \; 0<z<1\\ &=&0, \; \mathrm{elsewhere} \end{eqnarray*}

It means $Z\sim U(0,1)$.

This is a complicated solution, there should be another simpler solution. I will gladly read thet if you get any idea

1
On

For any value of $X$ in $[0;1]$, then since $Y$ is uniformly distributed over $[0;1]$, the sum is conditionally uniformly distributed over a shifted interval.

$$(X+Y)\mid X~\sim~\mathcal U[X;X+1]$$

Clearly then the modular sum ($Z$) is conditionally uniformly distributed over $[0;1]$ (given $X$), as it is just a cut-and-paste of the interval.

$$((X+Y)\bmod 1)\mid X~\sim~\mathcal U[0;1]$$

$$Z\mid X~\sim~\mathcal U[0;1]$$

Then the distribution of $Z$ can be found.

$\Box$

Since $X$ is uniformly distributed, and $Z$ is conditionally uniform given any $X$, so too $Z$ is uniform. $$\begin{align}\because~f_Z(z) ~=~ & \int_{\Bbb R} f_X(x)f_{Z\mid X}(z\mid x)\operatorname{d} x \\[1ex] ~=~& \mathbf 1_{z\in[0;1]}\\[2ex]\therefore\quad Z~\sim~&\mathcal U[0;1]\end{align}$$

$\blacksquare$