Variance measures how much the values in a dataset spread
out from the mean (average). It does this by calculating the average of
the squared distances of each value from the mean. A larger variance
means the numbers are more spread out.
Formula (Population):
σ2=∑(xi−μ)2N\sigma^2 = \frac{\sum (x_i -
\mu)^2}{N}σ2=N∑(xi−μ)2
Where:
• ×_i is each data point
• μ is the mean
• N is the number of values
Example:
Data: 2, 4, 6
Mean = (2+4+6)/3 = 4
Squared differences: (2−4)²=4, (4−4)²=0, (6−4)²=4
Variance = (4+0+4)/3 = 2
Here the data points vary by an average squared distance of
2 from the mean.