# Expressing the expectation in terms of Var and Cov

Iam trying to express $E\left[\left(\sum_{i=1}^{n}X_{i}-\mu_{i}n\right)^{2}\right]$ in terms of Var and Cov. $\mu_{i}=E[X_{i}]$ and $(X_{i})_{i\geq 1}$ stationary.

-
And more specifically, what did you try? (Unrelated: it seems that $\mu_i$ does not depend on $i$, could you confirm this point?) –  Did Oct 24 '12 at 5:27

Just to be clear, the $\mu_i n$ is not part of the sum, despite the $i$ there. In fact, all $\mu_i$ are equal because of stationarity. If $Y_i = X_i - \mu_i$, you're looking at $E \left[ \left(\sum_i Y_i \right)^2\right]$.
Hint: what are $E[Y_i Y_j]$ and $E[Y_i^2]$ in terms of variance and covariance?