10. Minimum Variance. In a set of $n$ numbers, one of the numbers is 0, and another is 1. What is the smallest possible variance of such a set? What should the set be for this to happen?
Solution. Let the numbers be $a_{k}$, where $k=1, \ldots, n$, and the arithmetic mean of all numbers $a$.

The variance of the set is

$$
S^{2}=\frac{(0-a)^{2}+\left(a_{2}-a\right)^{2}+\ldots+\left(a_{n-1}-a\right)^{2}+(1-a)^{2}}{n}
$$

We can split the sum in the numerator into two groups - the first term will be combined with the last, and the second group will include the remaining terms (if any):

$$
\left(a^{2}+(1-a)^{2}\right)+\left(\left(a_{2}-a\right)^{2}+\ldots+\left(a_{n-1}-a\right)^{2}\right)
$$

If $n=2$, the second group is absent. If $n>2$, to make this sum as small as possible, we set

$$
a_{2}=a_{3}=\ldots=a_{n-1}=a
$$

Then

$$
S^{2}=\frac{a^{2}+(1-a)^{2}}{n}
$$

We estimate the numerator from below using the inequality between the arithmetic mean and the quadratic mean[^3]

If $a>1$ or $a<0$, then $a^{2}+(1-a)^{2} > 1$.

If $0 \leq a \leq 1$, then $a^{2}+(1-a)^{2} \geq 2\left(\frac{a+1-a}{2}\right)^{2}=\frac{1}{2}$, with equality holding if and only if $a=1-a$, that is, when $a=\frac{1}{2}$.

Under these conditions, the variance is $S^{2}=\frac{\left(0-\frac{1}{2}\right)^{2}+\left(1-\frac{1}{2}\right)^{2}}{n}=\frac{1}{2 n}$.

Answer: $\frac{1}{2 n}$. All numbers, except the first and the last, are equal to $\frac{1}{2}$.