Equivalence of summations Show that $$\frac{1}{n}\sum^{n}_{i=1} (x_{i} - \bar{x})^{2}\equiv \frac{1}{n}\sum^{n}_{i=1}x_{i}^{2} - \bar{x}^{2}.$$ Note that $\bar{x} = \frac{1}{n}\sum^{n}_{i=1} x_{i}$. So I have started by:
\begin{align}
\frac{1}{n}\sum^{n}_{i=1} (x_{i} - \bar{x})^{2} &= \frac{1}{n}\sum^{n}_{i=1} (x_{i}^{2} - 2x_{i}\bar{x} + \bar{x}^{2}) \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n}\sum_{i=1}^{n}x_{i}\bar{x} + \frac{1}{n}\sum^{n}_{i=1}\bar{x}^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n}\sum_{i=1}^{n}x_{i}\left(\frac{1}{n}\sum^{n}_{i=1}x_{i}\right) + \frac{1}{n}\sum_{i=1}^{n}\left(\frac{1}{n}\sum^{n}_{i=1}x_{i}\right)^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n^{2}}\left(\sum_{i=1}^{n}x_{i}\right)^{2} + \frac{1}{n^{3}}\left(\sum^{n}_{i=1}x_{i}\right)^{2}
\end{align}
Not really sure what to do next, any hints?
 A: When you go from the 3rd line of your calculation to the last line, you made a mistake. Thus the $\frac{1}{n^3}$ should really be $\frac{1}{n^2}$. 
\begin{align}
\frac{1}{n}\sum^{n}_{i=1} (x_{i} - \bar{x})^{2} &= \frac{1}{n}\sum^{n}_{i=1} (x_{i}^{2} - 2x_{i}\bar{x} + \bar{x}^{2}) \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n}\sum_{i=1}^{n}x_{i}\bar{x} + \frac{1}{n}\sum^{n}_{i=1}\bar{x}^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n}\sum_{i=1}^{n}x_{i}\left(\frac{1}{n}\sum^{n}_{i=1}x_{i}\right) + \frac{1}{n}\sum_{i=1}^{n}\left(\frac{1}{n}\sum^{n}_{i=1}x_{i}\right)^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \frac{2}{n^{2}}\left(\sum_{i=1}^{n}x_{i}\right)^{2} + \frac{1}{n^{2}}\left(\sum^{n}_{i=1}x_{i}\right)^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2}- \frac{1}{n^{2}}\left(\sum_{i=1}^{n}x_{i}\right)^{2} \\
&= \frac{1}{n}\sum^{n}_{i=1} x_{i}^{2} - \bar{x}^{2}
\end{align}
A: \begin{align}
\sum_{i=1}^n (x_i-\bar x)^2 & = \sum_{i=1}^n (x_i^2 -2\bar x x_i + \bar x^2) \\[10pt]
& = \left(\sum_{i=1}^n x_i^2\right) -2\bar x \left( \sum_{i=1}^n x_i\right) + n\bar x^2 \\[10pt]
& = \left(\sum_{i=1}^n x_i^2\right) -2\bar x \left( n\bar x\right) + n\bar x^2 = \cdots\cdots\cdots
\end{align}
