Variance is a measure of dispersion that indicates how far the values in a dataset are spread out from the mean.
Example 1: Calculate the variance of the sample data: 7, 11, 15, 19, 24.
We have the data, 7, 11, 15, 19, 24
Find mean of the data.
x̄ = (7 + 11 + 15 + 19 + 24)/5
= 76/5
= 15.2Using the formula for variance we get,
s2 = ∑ (xi - x̄)2/(n - 1)
= (67.24 + 17.64 + 0.04 + 14.44 + 77.44)/(5 - 1)
= 176.8/4
= 44.2
Example 2: Calculate the number of observations if the variance of the dataset is 12 and the sum of squared differences of data from the mean is 156.
We have,
(xi - x̄)2 = 156
σ2 = 12Using the formula for variance we get,
σ2 = ∑ (xi - x̄)2/n
12 = 156/n
12n = 156
n = 156/ 12
n = 13
Example 3: Calculate the variance for the given data
xi | fi |
|---|---|
| 10 | 1 |
| 4 | 3 |
| 6 | 5 |
| 8 | 1 |
xi
fi
fixi
(xi - x̄)
(xi - x̄)2
fi(xi - x̄)2
10 1 10 4 16 16 4 3 12 -2 4 12 6 5 30 0 0 0 8 1 8 2 4 4 Mean (x̄) = ∑(fi xi)/∑(fi)
= (10×1 + 4×3 + 6×5 + 8×1)/(1+3+5+1)
= 60/10 = 6n = ∑(fi) = 1+3+5+1 = 10
Now,
σ2 = (∑in fi(xi - x̄)2/n)
= (16 + 12 + 0 +4)/10
= 3.2Variance(σ2) = 3.2
Example 4: Find the variance of the following data table
Class | Frequency |
|---|---|
| 0-10 | 3 |
| 10-20 | 6 |
| 20-30 | 4 |
| 30-40 | 2 |
| 40-50 | 1 |
Class
Xi
fi
f×Xi
Xi - μ
(Xi - μ)2
f×(Xi - μ)2
0-10
5
3
15
-15
225
675
10-20
15
6
90
-5
25
150
20-30
25
4
100
5
25
100
30-40
35
2
70
15
225
450
40-50
45
1
45
25
625
625
Total
16
320
2000
Mean (μ) = ∑(fi xi)/∑(fi)
= 320/16 = 20σ2 = (∑in fi(xi - μ)2/n)
= [(2000)/(16)]
= (125)The variance of given data set is 125.