We are looking at the sample variance ( of $n$ iid random variables)
$S^2 = \frac{1}{n-1} \Sigma_{i=1}^{n} (Y_i - \bar{Y} )^2$ where $\bar{Y}$ is the sample average.
My lecturer has rearranged this to:
$S^2 = \frac{1}{n-1} ( \Sigma_{i=1}^{n}Y_i - \frac{1}{n} \Sigma_{i \ne j} \ Y_i Y_j) $
But I cannot understand how he got that. It's talked about like a trivial manipulation but I can't see it.