Probabilistic method exercise The following exercise appeared in my exam which i could not solve.

Let $X_1,X_2,...$ be a sequence of iid real random variables such that $$P(X_i=0)=p,P(X_i=1)=q,P(X_i=2)=r$$ where $p+q+r=1$.Let $X= \sum_{i=1}^{\infty} \frac{X_i}{3^i}$.Compute $E(X)$ and $E(X^2)$ then deduce  that unless $p=q=r=\frac{1}{3}$ there exist $a,b \in (0,1)$ such that $p(a<x<b )\neq b-a$

I computed that $E(X)=\frac {q+2r}{2}$.Is this correct ? For the second part the hint was given to use probabilistic method but i could not solve it.Any ideas to do it?
 A: Things work out as @Did pointed out. 
We have
$$\mu=E(X)  =\frac{q+2r}2=\frac12,$$
$$\mu_1=E(X_1)=q+2r =1,$$
$$\sigma_1^2=var(X_1)=q+4r-\mu_1^2$$
$$\sigma^2=var(X)=(var(X_1)) \cdot \frac18=\frac{q+4r-\mu_1^2}8 = \frac1{12},$$
Then we have
$$
1 + 2r -1 = \frac23.
$$
This gives $p=q=r=1/3$. 
A: Here's my take at this problem:
Edit: I made a mistake on the value of $\bar X_i$. It should be $q+2r$, not $\frac{q+2r}{2}$.
$Var({X_i}) = (0-\bar{X_i})^2P(X_i = 0) + (1-\bar{X_i})^2P(X_i = 1) + (2-\bar{X_i})^2P(X_i = 2) $
$= (1-q-r)(q+2r)^2 + q(1-(q+2r))^2 + r(2-(q+2r))^2  
= -q^2-4 q r+q-4 r^2+4 r= V$.
Now, $$Var(X) = Var(\sum\frac{1}{3^i}X_i) = \sum \frac{1}{(3^i)^2}Var(X_i) = V\sum\frac{1}{9^i} = \frac{V}{8}.$$
$$E[X^2] = E[X]^2 + Var[X] = \left(\frac{q+2r}{2}\right)^2 + \frac{V}{8} = \frac{1}{8}(q^2+4 q r+q+4 r^2+4 r).$$
A: Here is another approach to the last part of the question. I think this
is more in the spirit of the suggested 'probabilistic method':
Let $P$ be the distribution of $X$ on $\Omega = \{ (\omega_1,...) | \omega_k \in \{0,1,2\} \}$. We have $X_k(\omega) = \omega_k$, of course.
Note that $P \{ \omega \} = 0 $ for any $\omega \in \Omega$ unless one of the $p,q,r$ are
exactly one.
Clearly, if one of the $p,q,r$ are exactly one, then $P$ is not uniform.
So, suppose this is not the case.
Note that $X(\omega ) \in (0,{1 \over 3} )$ iff $X_1(\omega) = 0$ and
$(X_2(\omega),X_3(\omega),....) \neq (2,2,2,...)$, and similarly, mutatis
mutandis,
for the intervals $({1 \over 3}, {2 \over 3})$, $({2 \over 3}, 1)$.
Then $P(0,{1 \over 3} ) = p, P({1 \over 3}, {2 \over 3}) = q$ and 
$P({2 \over 3}, 1) = r$, from which the desired result follows.
