I have been trying to work through the proof of the population variance estimator using the sample variance. In the 4th line of the proof (link below), $$\sum_{j\neq i} \mathsf E[Y_i\cdot Y_j]$$ ...is simplified in the next line to $(n-1)μ^2$
How does that step come about?
I tried expanding the summation over yj, but to no avail.
Note: This is for sampling with replacement.
When $i\neq j$ then the random variables are independent and identically distributed, so: $$\mathsf E(Y_i\cdot Y_j) = \mathsf E(Y_i)\mathsf E(Y_j) = \mu^2$$. Where $\mu$ is the population mean.
So for a particular value of $i$, there are $n-1$ values of $j$ such that $j\neq i$ Hence:
$$\sum\limits_{i=1}^n\left(\ldots -\tfrac 2n \sum\limits_{j\neq i}\mathsf E(Y_i\cdot Y_j)\ldots\right) \\ = \sum\limits_{i=1}^n\left(\ldots -\tfrac 2n (n-1)\mu^2\ldots\right)$$