What is variance?

Variance is a mathematical measurement of dispersion. In other words it shows how numbers are spread from their average. Variance is used mostly in hypothesis testing, descriptive statistics, goodness of fit, statistical inference and Monte Carlo sampling. Also variance is square of the standard deviation.

How to calculate variance?

Population variance and sample variance are calculated differently.

Population variance

σ2=i=1N(xi-μ)2N

Sample variance

s2=i=1n(xi-x¯)2n-1