TITLE: Is discrete uniform distribution fully characterized by first two moments?
QUESTION [1 upvotes]: Let $U$ be the discrete uniform on $\{0,1,\dots,n\}$. If a discrete random variable $X$ satisfies:
$$
\begin{align}
\mathbb{E}[X] &= \mathbb{E}[U] = n/2 \\
\mathrm{Var}(X) &= \mathrm{Var}(U) = ((n+1)^2-1)/12,
\end{align}
$$
is this sufficient to conclude that $X \equiv U$? For the case of $n=1$ and $n=2$ it can be shown to be true.
Addition: $X$ is known to have full support over $\{0,1,\dots,n\}$.

REPLY [2 votes]: No. For $n=3$: consider the distribution of $X$ given by $p=(1/5,2/5,1/10,3/10)$. (There are many other possible choices.)
You have
$$
\mathbb{E}[X] = \sum_{k=0}^3 k p_k = 0\cdot \frac{1}{5} + 1\cdot\frac{2}{5}+2\cdot\frac{1}{10}+3\cdot\frac{3}{10} = \frac{3}{2} = \mathbb{E}[U_3]
$$
and
$$
\mathbb{E}[X^2] = \sum_{k=0}^3 k^2 p_k = 0\cdot \frac{1}{5} + 1\cdot\frac{2}{5}+4\cdot\frac{1}{10}+9\cdot\frac{3}{10} = \frac{7}{2} = \mathbb{E}[U_3^2]
$$
{"set_name": "stack_exchange", "score": 1, "question_id": 2934399}