Convolution of two discrete uniform random variables

267 Views Asked by At

$X$ and $Y$ are two i.i.d discrete uniform random variables over $ A =\{0, 1, ..., N\}$, that is, $P(X = k) = P(Y = k) = 1/(N + 1)$ for all $k \in A$. Determine the $pmf$ of $|X - Y|$.

I tried solving without convolution like this:

$X$ is uniform over $\{0, 1, ..., N\}.$

$-Y$ is uniform over $\{-N, -N + 1, ..., 0\}$

$X - Y$ is uniform over $\{-N, ..., 0, 1, ..., N\}$

$|X - Y|$, however, is uniform over $\{0, 1, ..., N\} = A$

Thefore the $pmf$ of $Z = |X - Y|$ is the same as the $pmf$ of $X$ or $Y$.

Is this correct?

1

There are 1 best solutions below

1
On BEST ANSWER

No, $\ X-Y\ $ is not uniform over $\ \{-N, ...,-1, 0, 1, ..., N\}\ $. $\ X-Y=-N\ $, for instance, only when $\ X=0\ $ and $\ Y=N\ $, so $\ P\left(X-Y=-N\right)=1/\left(N+1\right)^2\ $. But $\ X-Y=0\ $ whenever $\ X\ $ and $\ Y\ $ both take the same of any of the $\ N+1\ $ values in the set $\ A\ $, so $\ P\left(X-Y=0\right)=\left(N+1\right)/\left(N+1\right)^2=1/\left(N+1\right)\ $.

For a similar reason, $\ \left\vert X-Y\right\vert\ $ is not uniform over $\ A\ $.

Addendum: The required mass-distribution function of $\ \left\vert X-Y\right\vert\ $ can be obtained by calculating \begin{eqnarray} P\left(\left\vert X-Y\right\vert=0 \right)&=&\sum_\limits{x=0}^NP\left( X=x, Y=x\right)\\ &=&\frac{N+1}{\left(N+1\right)^2}=\frac{1}{N+1}\ , \end{eqnarray} and, for $\ 1\le k\le N\ $, \begin{eqnarray} P\left(\left\vert X-Y\right\vert=k \right)&=&\sum_\limits{x=0}^{N-k}P\left( X=x, Y=x+k\right)\\ &&+\sum_\limits{x=k}^{N}P\left( X=x, Y=x-k\right)\\ &=& \frac{2\left(N-k+1\right)}{\left(N+1\right)^2} \end{eqnarray}