THE VARIANCE AND STANDARD DEVIATION
The variance of a distribution is E((X_bar - X)**2), which is the mean of the squared difference from the mean. Hence, the variance measures the variability of the numbers from the average value of that same set of numbers. The standard deviation is the square root of the variance.
Another way to describe the variance is the sum of the squares of the difference between the numbers in X and the mean mu of the set X, divided by the number of values in X, as shown here:
variance = [SUM (xi - mu)**2 ] / n
For example, if the set X consists of {-10,35,75,100}, then the mean equals (-10 + 35 + 75 + 100)/4 = 50, and the variance is computed as follows:
variance = [(-10-50)**2 + (35-50)**2 + (75-50)**2 + (100-50)**2]/4
= [60**2 + 15**2 + 25**2 + 50**2]/4
= [3600 + 225 + 625 + 2500]/4
= 6950/4 = 1,737
The standard deviation std is the square root of the variance, as shown here:
std = sqrt(1737) = 41.677
If the set X consists of...