# Which real random law maximize the standard deviation?

Which random variable $$X:\Omega\rightarrow \mathbb R$$ has the maximal standard deviation for the two following cases:

1. $$\Omega$$ is descrete and, let's $$n\in \mathbb N$$ such that $$|\Omega|=n$$
2. $$\Omega$$ is $$[0;1]$$

I believe standard deviation $$\sigma$$ of random variable $$X$$ is $$\sigma(X) = \sqrt{\mathbb E[X²]-\mathbb E[X]^2}$$. So our problem would be to find

$$\displaystyle\arg \max_{X\in \mathbb R^\Omega} \mathbb E[X^2] - \mathbb E[X]^2$$

How should I continue from there?

## 1 Answer

Case 2 does not give a meaningful optimization problem since virtually any random variable can be defined on the unit interval. You can let $$U$$ be the identity map on $$\left[0,1\right]$$ with $$P$$ being the Lebesgue measure. Then $$U \sim U\left[0,1\right]$$, and you can create any random variable $$X$$ with cdf $$F$$ by taking $$X = F^{-1}\left(U\right)$$. In this way you can create continuous random variables with infinite variance (Pareto) or undefined variance (Cauchy).

If what you mean is that the random variable must have bounded support, then the variance is maximized by assigning equal probability to the lower and upper bounds. It is well-known that, if $$0 \leq X\left(\omega\right) \leq a$$ for all $$\omega$$, then $$Var\left(X\right) \leq \frac{a^2}{4}$$, and the bound is attained with equality when $$P\left(X=0\right)=P\left(X=a\right)=\frac{1}{2}$$.