TITLE: Restrictions on a bounded variable's mean and standard deviation
QUESTION [5 upvotes]: Given a random variable whose values are between $0$ and $1$, it is not difficult to see that the mean, or the expected value, is between $0$ and $1$, and the standard deviation is between $0$ and $\tfrac{1}{2}$.
However, not every combination is possible. If $\sigma=0$ then the mean could indeed be everywhere in $[0,1]$, but I tend to believe that $\sigma=\frac{1}{2}$ is only possible if $E[X] = \frac{1}{2}$.
Am I right? Are there simple restrictions involving a bounded variable's expected value and standard deviation?
Edit: Using the equality $\sigma(X) = \sigma(X-\frac{1}{2})$ we can get the equality $\sigma^2+(E[X]-\frac{1}{2})^2 = E[(X-\frac{1}{2})^2]$, the last expression being bounded by $0$ and $\frac{1}{4}$, so we get that the possible combinations must lie in the upper half circle (in the $\sigma-\mu$ plane) of radius $\frac{1}{2}$ around $\sigma=0,\mu=\frac{1}{2}$. Can we get a better result, or can any combination in the circle be reached?

REPLY [3 votes]: Tim Jones's answer is indeed the same as you have found.  
An alternative approach would be to note that for any given mean $\mu$ the variance $\sigma^2$ and standard deviation $\sigma$ is maximised when the random variable only takes the values $0$ or $1$, i.e. a Bernoulli random variable which takes the value $1$ with probability $\mu$ and the value $0$ with probability $1-\mu$.  In such a case the mean is $\mu$ and the standard deviation $\sigma = \sqrt{\mu(1-\mu)}$.  
Any smaller non-negative standard deviation can be achieved, for example when the random variable takes the value $1$ with probability $k\mu$, the value $0$ with probability $k(1-\mu)$ and the value $\mu$ with probability $1-k$, giving a mean of $\mu$ and a standard deviation $\sigma = \sqrt{k\mu(1-\mu)}$ with $0\le k\le 1$. So in general (corresponding to Tim Jones's result) $$0 \le \sigma \le  \sqrt{\mu(1-\mu)}.$$
This is indeed a semi-circle, as it can be rewritten by completing the square as $\sigma \ge 0$ and $$\sigma^2 +\left(\mu-\frac12\right)^2 \le \left(\frac12\right)^2$$
i.e. as you say "of radius $\frac{1}{2}$ around $\sigma=0,\mu=\frac{1}{2}$".