Variance and Standard Deviation
Variance (var) and standard deviation (stdev) are basic statistical concepts. Both tools measure variability within a dataset.
Variance
Variance measures how spread out data points are within a dataset. The variance is the average of the squared differences from the mean and provides a figure of how far the datapoints are from the mean.
Calculation:
1. find the mean (average) of the datapoints
2. subtract each datapoint from the mean
3. square each result from step 2
4. find the mean (average) of all outcomes from step 3
Example: 10 + 12 + 2 + 7 + 5 + 3 + 7 + 2 (dataset)
Step 1 | 10 + 12 + 2 + 7 + 5 + 3 + 7 + 2 = 48 48 ÷ 8 = 6 (mean) |
Step 2 | (10 – 6), (12 – 6), (2 – 6), (7 – 6), (5 – 6), (3 – 6), (7 – 6), (2 – 6) 4, 6, -4, 1, -1, -3, 1, -4 |
Step 3 | 42, 62, -42, 12, -12, -32, 12, -42 16, 36, 16, 1, 1, 9, 1, 16 |
Step 4 | 16 + 36 + 16 + 1 + 1 + 9 + 1 + 16 = 96 96 ÷ 8 = 12 (variance) |
Standard deviation
Standard deviation also measures how variable data points are within a dataset. Standard deviation is the square root of the variance and provides a figure of how apart the datapoitns are within a dataset.
Calculation:
1. find the mean (average) of the datapoints
2. subtract each datapoint from the mean
3. square each result from step 2
4. find the mean (average) of all outcomes from step 3
5. find the square root of step 4
Example: 10 + 12 + 2 + 7 + 5 + 3 + 7 + 2 (dataset)
Step 1 | 10 + 12 + 2 + 7 + 5 + 3 + 7 + 2 = 48 48 ÷ 8 = 6 (mean) |
Step 2 | (10 – 6), (12 – 6), (2 – 6), (7 – 6), (5 – 6), (3 – 6), (7 – 6), (2 – 6) 4, 6, -4, 1, -1, -3, 1, -4 |
Step 3 | 42, 62, -42, 12, -12, -32, 12, -42 16, 36, 16, 1, 1, 9, 1, 16 |
Step 4 | 16 + 36 + 16 + 1 + 1 + 9 + 1 + 16 = 96 96 ÷ 8 = 12 (variance) |
Step 5 | √12 3.4641016151377544 or 3.46 (standard deviation) |
Next: Visualisation