I'm working on the following problem I got in a hw but I'm stuck. It just asks to find the distribution function of a random variable $X$ on a discrete probability spaces that takes values in $[A,B]$ and for which $Var(X) = \left(\frac{B-A}{2}\right)^{2}.$
I got that this equality gives the expected values $E(X) = \frac{A+B}{2}$ and $E(X^{2}) = \frac{A^{2}+B^{2}}{2}$, but I can't see why this gives a unique distribution (as the statement of the problem suggests).
I also found the distribution function $p(x) = 0$ for $x \in (A,B)$ and $p(A)=\frac{1}{2}$, $p(B)=\frac{1}{2}$ that works for example, but I don't see how this is the only one. Can anyone shed some light please?
Thanks a lot!