# Variance of a sum of variables with coefficients too

Can someone help me with the proof here? How do I start the proof? How do I simplify $$(\sum_{i=1}^k a_i(Y_i - E(Y_i))^2$$?

I'd end up getting a large multiplication between each $$a_i(Y_i - E(Y_i)$$ making my calculation really long.

Are there any summation properties that may help me as I am probably unaware of them?

Thank you!

\begin{align}E\left[\left(\sum_{i=1}^k a_i(Y_i - E[Y_i])\right)^2\right] &= E\left[\sum_{i=1}^k \sum_{j=1}^k a_i a_j (Y_i - E[Y_i])(Y_j - E[Y_j])\right] \\ &= \sum_{i=1}^k \sum_{j=1}^k a_i a_j E\left[(Y_i - E[Y_i])(Y_j - E[Y_j])\right]. \end{align}
Now, what can you say about $$E\left[(Y_i - E[Y_i])(Y_j - E[Y_j])\right]$$ when $$i \ne j$$? (Hint: use independence.)