# Assigning a probability function to a random variable such that its mean is $0$ and variance $1$.

I want to construct a random variable $$X_i$$ which can take one of three values: $$-1,0,1$$. I want to construct a probability function such that the variance of this random variable to be $$1$$. How can I do that?

Note that $$\mu=0$$, and $$\sum (x_i-\mu)^2=(-1)^2+0^2+1^2=2$$. Hence, one such probability function could be $$p(-1)=\frac{1}{2}$$ and $$p(1)=\frac{1}{2}$$. However, that would mean that there is no probability of the random variable taking the value $$0$$, which is weird.

• Are there any other solutions? Oct 4, 2023 at 18:43
• It is not particularly weird. You cannot get a variance bigger than $1$ here, so a variance of $1$ extreme and you should expect an extreme distribution Oct 4, 2023 at 18:50
• @kimchilover- I don't there are any solutions where there is a non-zero probability of the variable taking the value $0$ Oct 4, 2023 at 18:50

You just need to start from the basic definitions. In your case, the probability (mass) function is defined by three numbers, say $$a$$, $$b$$ and $$c$$ such that \begin{align} \Pr[X=-1] &= a \ge 0 \\ \Pr[X=0] &= b \ge 0 \\ \Pr[X=1] &= c \ge 0 \\ a+b+c&=1. \end{align} You want $$X$$ to be zero-mean, then $$\mu=-1\times \Pr[X=-1] + 0 \times \Pr[X=0]+1\times \Pr[X=1]=-a+c=0.$$ Also, you want the variance to be one, that is $$\sigma^2 = (-1-\mu)^2\times \Pr[X=-1] + (0-\mu)^2 \times \Pr[X=0]+(1-\mu)^2\times \Pr[X=1]=a+c=1.$$ Putting everything together, the masses $$a$$, $$b$$ and $$c$$ must satisfy the following system of equations \left\{ \begin{aligned} a+b+c &= 1 \\ -a+c &= 0 \\ a+c &= 1. \end{aligned} \right. The only solution is the one you gave - but now you can ask yourself what would happen if $$\mu \ne 0$$ or $$\sigma^2 \ne 1$$ and play with the masses.
• I suspect that in general that $|\mu| - \mu^2 \le \sigma^2 \le 1-\mu^2$ and if you have an equality then at least one of the points has probability $0$. Oct 4, 2023 at 20:37