Let $X$ be an r.v. (discrete or continuous) such that $0 ≤ X ≤ 1$ always holds. Let $μ = \mathbb{E}(X)$. Show that $$a.) \ Var(X) \leq \mu - \mu^2 \leq \frac{1}{4} \\ b.) \ \textrm{ Show that there is only one possible distribution for }X \textrm{ for which } Var(X) = \frac{1}{4}. \\ \textrm{ What is the name of this distribution} ? $$
I have solved part $a.$ $$X-1\leq 0 \\ \implies X(X-1)\leq 0 \\ \implies X^2\leq X \\ \implies \mathbb{E}(X^2) \leq \mathbb{E}(X)=\mu\\ \implies \mathbb{E}(X^2)-\mu^2 \leq \mu-\mu^2 \\ \implies Var(X) \leq \mu-\mu^2$$
Now to show $\mu - \mu^2 \leq \frac{1}{4}$, let us consider $:\\ f(\mu)=\mu-\mu^2\\ \implies f'(\mu)=1-2\mu \\ \textrm{Setting } f'(\mu)=0, \textrm{ we have }\mu=\frac{1}{2}\\ \textrm{Also we have } f''(\mu)|_{\mu=\frac{1}{2}}=-2<0\\ \therefore f(\mu) \textrm{ has the maximum value } \frac{1}{4} \textrm{ at } \mu=\frac{1}{2}\\ \textrm{Hence } f(\mu)=\mu-\mu^2\leq\frac{1}{4} \\ \therefore Var(X) \leq \mu - \mu^2 \leq \frac{1}{4} $
For $b.$ how do I show that there is only one possible distribution for $X$ with variance $\frac{1}{4}$
Any help is valuable and appreciated.