#### Variance 

The variance measures the average distance between each individual to the mean:

$$\frac{1}{n}\sum_{i=1}^n(z_i-\bar{z})^2$$

It is sometimes more convenient to use the equivalent formula


$$\frac{1}{n}\sum_{i=1}^nz_i^2-\bar{z}^2 = \bar{z^2}-\bar{z}^2$$

Note that for statistical reasons, one often prefers to use

$$\frac{1}{n-1}\sum_{i=1}^n(z_i-m)^2$$

for the variance. The two formulas give close results when $n$ is large.

