Question: I want to decompose a uniform random variable $X\sim\text{Uniform}\{0,q\}$, for some fixed constant $q$, such that it can be rewritten in terms of another random variable $\widetilde{X}$ whose mean is zero and variance is $1/n$. How can I do this? Thanks.
My attempt: I couldn't figure out how to do this for the discrete uniform random variable, but I managed to figure out how to do this for a Bernoulli random variable $X\sim\text{Bernoulli}(\alpha)$, for some fixed $\alpha\in(0,1)$. Hopefully this gives you a flavor of what I am looking for. I have $$ X=\alpha+\sqrt{n\alpha(1-\alpha)}\widetilde{X}, $$ where $\mathbb{E}[\widetilde{X}]=0$ and $\text{Var}[\widetilde{X}]=1/n$.
I managed to solve it. It is $$ X=\frac{q}{2}+\sqrt{\frac{n[(q+1)^2-1]}{12}}\times\widetilde{X}. $$