Derivation of $\frac{\sum (x - \bar{x})^2}{N} = \frac{\sum x^2 - \frac{(\sum x)^2}{N}}{N}$ I saw the above equation in an introductory statistics textbook, as a shortcut for evaluating the variance of a population.
I tried to prove it myself:
 
 
$$\sigma^2 = \frac{\sum (x - \bar{x})^2}{N} \tag{1}$$
$$\sigma^2 = \frac{\sum x^2 - \frac{(\sum x)^2}{N}}{N} \tag{2}$$
We are given that $(1) = (2)$:
$$\frac{\sum (x - \bar{x})^2}{N} = \frac{\sum x^2 - \frac{(\sum x)^2}{N}}{N} \tag{3}$$
Multiply $(3)$ through by $N$:
$$\sum(x - \bar{x})^2 = \sum x^2 - \frac{(\sum x)^2}{N} \tag{4}$$
Expand the LHS in $(4)$:
$$\sum\left(x^2 - 2x\bar{x} + \bar{x}^2\right) = {\sum x^2 - \frac{(\sum x)^2}{N}} \tag{5}$$
Expanding both sides in $(5)$:
$$\sum x^2 - 2x\sum\bar{x} + \sum\bar{x}^2 = \sum x^2 - \frac{\sum x\sum x}{N} \tag{6}$$
From $(6)$:
$$\sum\bar{x}^2 - 2\bar{x}\sum{x} = -\bar{x}\sum{x} \tag{7}$$
From $(7)$:
$$\sum\bar{x}^2 = \bar{x}\sum{x} \tag{8}$$
I don't know how to make the LHS equal RHS in $(8)$.

Starting from what you know:
$\sigma^2 =\dfrac{\sum (x - \bar{x})^2}{N} $
$= \dfrac{ \sum\left(x^2 - 2x\bar{x} +\bar{x}^2 \right)}{N}$
$= \dfrac{\sum x^2}N  - \dfrac{2\sum x\bar{x}}N  +\dfrac{\sum\bar{x}^2}N  $
$=\dfrac{\sum x^2}N - 2\bar{x}\dfrac{\sum x}{N} + \bar{x}^2 $
$=\dfrac{\sum x^2}N - {2\bar{x}^2} + \bar{x}^2 $
$= \dfrac{\sum x^2}N - {\bar{x}^2} $
$= \dfrac{\sum x^2}N - \dfrac {\sum{\bar{x}^2}}N $
$= \dfrac{\sum (x^2 - \bar{x}^2) }N $
