Hi there,

I just wanna verify my solution to this:

Let $\displaystyle X$ be a Discrete Uniform random variable over the interval $\displaystyle [-n, n], n \ge 1$. What is the distribution of $\displaystyle |X|$?

The PMF of the Discrete Uniform RV is given by: $\displaystyle p_X(x) = \frac{1}{n-m+1}, x \in [m, n]$

Let $\displaystyle Y$ be the RV such that $\displaystyle Y = |X|$

Thus $\displaystyle p_Y(y) = \sum_{\{x | |x| = y\}}p_X(x)$

Note that in this case $\displaystyle x \in [-n, n]$, thus $\displaystyle p_X(x) = \frac{1}{2n+1}$

$\displaystyle p_Y(0) = \sum_{\{x | |x| = 0\}}p_X(x) = \sum_{\{x | x = 0\}}p_X(x) = \frac{1}{2n+1}$ since $\displaystyle 0 \in [-n, n]$ as $\displaystyle n \ge 1$

$\displaystyle p_Y(1) = \sum_{\{x | |x| = 1\}}p_X(x) = \sum_{\{x | x = -1, 1\}}p_X(x) = p_X(-1) + p_X(1) = \frac{2}{2n+1}$

$\displaystyle p_Y(2) = \sum_{\{x | |x| = 1\}}p_X(x) = \sum_{\{x | x = -2, 2\}}p_X(x) = p_X(-2) + p_X(2) = \frac{2}{2n+1}$

$\displaystyle p_Y(n) = \sum_{\{x | |x| = 1\}}p_X(x) = \sum_{\{x | x = -n, n\}}p_X(x) = p_X(-n) + p_X(n) = \frac{2}{2n+1}$

Thus the PMF of $\displaystyle Y = |X|$ is given by:

$\displaystyle p_Y(y) = \frac{1}{2n+1}$ if $\displaystyle y = 0$ and $\displaystyle p_Y(y) = \frac{2}{2n+1}$ if $\displaystyle y = 1, 2, \cdots, n$

Thanks