How to minimize $Variance(S)$?

Suppose $X_1,....,X_n$ are $iid$ random variables and for each of them $Variance(X_i)= \sigma^2$. $a_1...a_n$ are also real numbers and $\sum_{i=1}^n a_i = 1$ If $S = \sum_{i=1}^na_iX_i$, prove $var(S)$ is minimum if $a_i = 1/n, \ i=1,...,n$

So i did following:

$Var(S) = \sum_{i=1}^na_i^2Var(X_i) + 2\sum_{i<j}a_ia_jcov(X_i, X_j)$

I'm not sure how to take this from here. Any ideas?

• What is $cov(X_i, X_j)$ if $X_i$ and $X_j$ are independent? Dec 26, 2017 at 19:51
• Are the a$_i$s all nonnegative. Dec 26, 2017 at 23:21
• @Michael Good question--but it doesn't matter!
– whuber
Jan 16, 2019 at 13:06

Since $X_i$'s are independent, $\operatorname{Cov}(X_i,X_j)=0$ if $i\neq j$. It follows that $$\operatorname{Var}(S)=\operatorname{Var}\left(\sum_{i=1}^na_iX_i\right)=\sigma^2\sum_{i=1}^na_i^2.$$ We can bypass the lengthy Lagrangian method by using Cauchy-Schwarz inequality: $$1=\left(\sum_{i=1}^na_i\right)^2=\left(\sum_{i=1}^n\frac{a_i\sigma}{\sigma}\right)^2\leq\left(\sum_{i=1}^na_i^2\sigma^2\right)\left(\sum_{i=1}^n\frac{1}{\sigma^2}\right)=\frac{n\operatorname{Var}(S)}{\sigma^2}.$$ Now if $a_i=1/n$, then $$\operatorname{Var}(S)=\sigma^2\sum_{i=1}^n\frac{1}{n^2}=\frac{\sigma^2}{n},$$ which is exactly the lower bound given by Cauchy-Schwarz.