Maximum of Variance

Suppose that a vector xRnx \in \mathbb{R}^n consists of the elements which are in [0,c][0, c] for a positive real number cc. Then i=1nxi2i=1ncxi=ci=1nxi=cnx\begin{aligned} \sum_{i=1}^n x_i^2 \le \sum_{i=1}^n c x_i = c \sum_{i=1}^n x_i = cn\overline{x} \end{aligned}

where x\overline{x} is the mean of xx elements. Let Var(x)Var(x) be the variance of xx elements, then Var(x)=1ni=1n(xix)2=1ni=1n(xi22xxi+x2)=1n{i=1nxi22xi=1nxi+nx2}=1n{i=1nxi22nx2+nx2}=1n{i=1nxi2nx2}1n(cnxnx2)=cxx2\begin{aligned} Var(x) &= \frac{1}{n} \sum_{i=1}^n (x_i - \overline{x})^2 = \frac{1}{n} \sum_{i=1}^n (x_i^2 - 2\overline{x}x_i + \overline{x}^2) \\ &= \frac{1}{n} \left\{ \sum_{i=1}^n x_i^2 - 2\overline{x} \sum_{i=1}^n x_i + n \overline{x}^2 \right\} \\ &= \frac{1}{n} \left\{ \sum_{i=1}^n x_i^2 - 2n\overline{x}^2 + n \overline{x}^2 \right\} \\ &= \frac{1}{n} \left\{ \sum_{i=1}^n x_i^2 - n\overline{x}^2 \right\} \\ &\le \frac{1}{n} (cn\overline{x} - n\overline{x}^2) = c\overline{x} - \overline{x}^2 \end{aligned}

If we define f(x)=cxx2f(\overline{x}) = c\overline{x} - \overline{x}^2, then its extreme value is as follows: f(x)=cxx2f(x)=c2x=0    x=c2f(c2)=c22c24=c24\begin{gather} f(\overline{x}) = c\overline{x} - \overline{x}^2 \\ f'(\overline{x}) = c - 2\overline{x} = 0 \implies \overline{x} = \frac{c}{2} \\ f\left( \frac{c}{2} \right) = \frac{c^2}{2} - \frac{c^2}{4} = \frac{c^2}{4} \end{gather}

It yields the following boundary. Var(x)cxx2c24\begin{aligned} Var(x) \le c\overline{x} - \overline{x}^2 \le \frac{c^2}{4} \end{aligned}


© 2023. All rights reserved.