Statistics: Mean Deviation, Variance and Standard Deviation
Two data sets can have the same mean but be spread out very differently. Measures of dispersion, mainly mean deviation, variance and standard deviation, describe that spread. This lesson covers them for raw, discrete and grouped data, the coding (step-deviation) method, the effect of adding or multiplying by a constant, and the combined standard deviation of two groups. Throughout, we use the population formulas (dividing by n, the number of observations), which is the convention in FSc, Class 11 and entry tests.
Asked in: ECAT, NUST NET, JEE Main, FSc and Class 11-12 boards
Range and mean deviation
The range is the largest value minus the smallest. It is quick but depends only on two values.
The mean deviation about a central value A is the average of the absolute deviations |xᵢ − A|. It is usually taken about the mean or the median. The mean deviation is smallest when it is taken about the median.
- Range = largest value − smallest value
- MD about A = Σ|xᵢ − A| ÷ n
- Frequency data: MD = Σfᵢ|xᵢ − A| ÷ N, N = Σfᵢ
Variance and standard deviation (population formulas)
The variance σ² is the mean of the squared deviations from the mean, and the standard deviation σ is its positive square root. In this lesson we divide by n, the number of observations (population variance). Some statistics courses divide by n − 1 for a sample; entry-test answers use n unless the question says otherwise.
The shortcut form 'mean of the squares minus the square of the mean' avoids working out every deviation.
- σ² = Σ(xᵢ − x̄)² ÷ n
- σ² = Σxᵢ² ÷ n − x̄²
- σ = √σ²
- Variance of 1, 2, …, n = (n² − 1)/12
Discrete and grouped frequency data
For a frequency table, weight each value by its frequency. For continuous classes such as 10–20, use the class mark (mid-point) 15 as the value of every observation in that class.
With N = Σf, compute Σfx and Σfx², then the mean and the variance follow directly.
- x̄ = Σfx ÷ N
- σ² = Σfx² ÷ N − (Σfx ÷ N)²
- Class mark = (lower limit + upper limit) ÷ 2
Coding (step-deviation) method
When class marks are large and equally spaced, put u = (x − A)/h, where A is an assumed mean (often the middle class mark) and h is the class width. The u-values are small integers, which makes the arithmetic easy.
Then x̄ = A + h × ū and σₓ = h × σᵤ. The assumed mean A does not affect the standard deviation.
- u = (x − A)/h
- x̄ = A + h × (Σfu ÷ N)
- σₓ = h × √[Σfu² ÷ N − (Σfu ÷ N)²]
Change of origin and scale
Adding the same constant to every observation (change of origin) shifts the mean by that constant but does not change the spread: variance, SD and mean deviation stay the same.
Multiplying every observation by k (change of scale) multiplies the mean and the SD by k (the SD by |k|) and the variance by k². So for y = ax + b: ȳ = ax̄ + b, σᵧ = |a|σₓ and σᵧ² = a²σₓ².
- y = ax + b: ȳ = a x̄ + b
- σᵧ = |a| σₓ
- Var(y) = a² Var(x)
- Mean deviation of y = |a| × mean deviation of x
Combined mean and variance of two groups
For two groups with sizes n₁, n₂, means x̄₁, x̄₂ and variances σ₁², σ₂², first find the combined mean x̄. Then each group contributes its own variance plus the square of the distance of its mean from x̄.
This formula also lets you correct a variance when a value was copied wrongly: rebuild Σx and Σx² from the given mean and variance, replace the wrong value with the right one, and recompute.
- x̄ = (n₁x̄₁ + n₂x̄₂) ÷ (n₁ + n₂)
- σ² = [n₁(σ₁² + d₁²) + n₂(σ₂² + d₂²)] ÷ (n₁ + n₂), dᵢ = x̄ᵢ − x̄
- Σx = n x̄ and Σx² = n(σ² + x̄²)
Coefficient of variation
To compare the spread of data sets with different means or units, use the coefficient of variation, the SD as a percentage of the mean.
The set with the smaller CV is more consistent (less variable). For example, a batsman with a smaller CV of scores is the more consistent player.
Solved examples
- Find the mean deviation about the mean of 3, 7, 8, 10 and 12.
- Mean = (3 + 7 + 8 + 10 + 12) ÷ 5 = 40 ÷ 5 = 8.
- Absolute deviations from 8: 5, 1, 0, 2, 4, with sum 12.
- MD = 12 ÷ 5 = 2.4.
Answer: 2.4 - Find the mean deviation about the median of 4, 6, 9, 11, 15, 21, 25.
- The data are already in order and n = 7, so the median is the 4th value, 11.
- Absolute deviations from 11: 7, 5, 2, 0, 4, 10, 14, with sum 42.
- MD about the median = 42 ÷ 7 = 6.
Answer: 6 - Find the variance and standard deviation for the data: x = 2, 4, 6, 8 with frequencies 3, 5, 8, 4.
- N = 3 + 5 + 8 + 4 = 20 and Σfx = 6 + 20 + 48 + 32 = 106, so x̄ = 106 ÷ 20 = 5.3.
- Σfx² = 3(4) + 5(16) + 8(36) + 4(64) = 12 + 80 + 288 + 256 = 636.
- σ² = 636 ÷ 20 − 5.3² = 31.8 − 28.09 = 3.71.
- σ = √3.71 ≈ 1.93.
Answer: Variance 3.71, SD ≈ 1.93 - Use the coding method to find the mean and SD of: classes 0–10, 10–20, 20–30, 30–40, 40–50 with frequencies 5, 8, 15, 16, 6.
- Class marks are 5, 15, 25, 35, 45. Take A = 25 and h = 10, so u = −2, −1, 0, 1, 2.
- N = 50, Σfu = −10 − 8 + 0 + 16 + 12 = 10 and Σfu² = 20 + 8 + 0 + 16 + 24 = 68.
- x̄ = 25 + 10 × (10 ÷ 50) = 25 + 2 = 27.
- σᵤ² = 68 ÷ 50 − (0.2)² = 1.36 − 0.04 = 1.32, so σₓ² = 100 × 1.32 = 132 and σₓ = √132 ≈ 11.49.
Answer: Mean 27, variance 132, SD ≈ 11.49 - Group A has 40 students with mean mark 50 and SD 6. Group B has 60 students with mean mark 55 and SD 8. Find the mean and SD of all 100 students.
- Combined mean = (40 × 50 + 60 × 55) ÷ 100 = (2000 + 3300) ÷ 100 = 53.
- d₁ = 50 − 53 = −3 and d₂ = 55 − 53 = 2.
- σ² = [40(36 + 9) + 60(64 + 4)] ÷ 100 = (1800 + 4080) ÷ 100 = 58.8.
- σ = √58.8 ≈ 7.67.
Answer: Mean 53, SD ≈ 7.67 - The mean and SD of 20 observations were found to be 30 and 4. Later it was found that the value 25 had been copied as 35. Find the correct mean and SD.
- Wrong Σx = 20 × 30 = 600 and wrong Σx² = 20(4² + 30²) = 20 × 916 = 18320.
- Correct Σx = 600 − 35 + 25 = 590, so the correct mean = 590 ÷ 20 = 29.5.
- Correct Σx² = 18320 − 35² + 25² = 18320 − 1225 + 625 = 17720.
- Correct variance = 17720 ÷ 20 − 29.5² = 886 − 870.25 = 15.75, so SD = √15.75 ≈ 3.97.
Answer: Mean 29.5, SD ≈ 3.97
Exam shortcuts
- Use σ² = (mean of squares) − (square of mean) whenever Σx and Σx² are given or easy to find; it avoids computing every deviation.
- For y = ax + b, ignore b completely when finding the SD or variance; only a matters, as |a| for the SD and a² for the variance.
- In the coding method, remember to multiply σᵤ by h at the end; forgetting it is the most common lost mark.
- For combined variance, never just average the two variances; add the d² terms for the gap between each group mean and the combined mean.
- For the numbers 1 to n, the variance is (n² − 1)/12; for an arithmetic progression with common difference d, multiply this by d².
Common mistakes
- Dividing by n − 1 when the question (or the syllabus) expects the population formula with n.
- Forgetting that adding a constant leaves the SD unchanged, or that multiplying by a negative number still gives a positive SD.
- Using class limits instead of class marks for grouped data.
- Correcting Σx after a copying error but forgetting to correct Σx², or using the old mean in the new variance.
- Combining two groups by averaging their SDs or variances directly.
Practice MCQs
- What is the mean deviation about the mean of 1, 3, 5, 7, 9, 11?
A) 3.5
B) 6
C) 0
D) 3
Answer: D) 3 — The mean is 36 ÷ 6 = 6, and the absolute deviations are 5, 3, 1, 1, 3, 5 with sum 18, so MD = 18 ÷ 6 = 3. 3.5 divides by 5 instead of 6 and rounds, 0 adds signed deviations (which always sum to zero), and 6 is the mean itself. - What is the (population) variance of 5, 7, 9, 11, 13?
A) 4
B) 8
C) 10
D) 2√2
Answer: B) 8 — The mean is 9 and the squared deviations are 16, 4, 0, 4, 16, with sum 40, so σ² = 40 ÷ 5 = 8. 10 divides by n − 1 = 4 (the sample formula), 2√2 is the SD rather than the variance, and 4 is half the correct value. - The mean of a data set is 15 and its variance is 9. Each value is multiplied by 2 and then 5 is subtracted. The new mean and variance are:
A) mean 25, variance 36
B) mean 25, variance 13
C) mean 25, variance 18
D) mean 30, variance 36
Answer: A) mean 25, variance 36 — New mean = 2 × 15 − 5 = 25. The variance is multiplied by 2² = 4 and is unaffected by subtracting 5, so it becomes 36. 18 multiplies the variance by 2 instead of 4, 30 forgets to subtract 5 from the mean, and 13 applies the change 2 × 9 − 5 to the variance. - A batsman's scores have mean 40 and standard deviation 6. What is the coefficient of variation?
A) 0.15%
B) 15%
C) 6.67%
D) 24%
Answer: B) 15% — CV = (σ ÷ x̄) × 100% = (6 ÷ 40) × 100% = 15%. 6.67% is the mean divided by the SD, 24% uses 6 × 4, and 0.15% forgets to multiply by 100 but still writes a percent sign. - For 10 observations, Σx = 60 and Σx² = 400. What is the standard deviation?
A) 6
B) √34
C) 4
D) 2
Answer: D) 2 — Mean = 6 and σ² = 400 ÷ 10 − 6² = 40 − 36 = 4, so σ = 2. 4 is the variance, √34 uses 40 − 6, and 6 is the mean. - The mean deviation is least when it is measured about the:
A) median
B) mean
C) largest value
D) mode
Answer: A) median — The sum Σ|xᵢ − A| is smallest when A is the median, so the mean deviation about the median is never larger than about any other point. The mean minimises the sum of squared deviations, not absolute ones; the mode and the largest value have no such property. - What is the mean deviation about the median of 2, 4, 7, 9, 18?
A) 3.5
B) 4.4
C) 4.2
D) 7
Answer: C) 4.2 — The median is 7. The absolute deviations are 5, 3, 0, 2, 11, with sum 21, so MD = 21 ÷ 5 = 4.2. 4.4 is the mean deviation about the mean 8, 7 is the median itself, and 3.5 uses 21 ÷ 6. - For x = 1, 2, 3, 4, 5 with frequencies 1, 2, 4, 2, 1, the variance is:
A) 1.2
B) 1.5
C) 1.33
D) 2.4
Answer: A) 1.2 — N = 10 and by symmetry the mean is 3. Σf(x − 3)² = 1(4) + 2(1) + 4(0) + 2(1) + 1(4) = 12, so σ² = 12 ÷ 10 = 1.2. 1.5 divides by the 8 non-central observations, 2.4 ignores the frequencies and divides 12 by 5 values, and 1.33 divides by N − 1 = 9. - Using u = (x − 50)/10, a frequency distribution gives ū = −0.4 and σᵤ = 1.5. The mean and SD of x are:
A) mean 46, SD 1.5
B) mean 46, SD 15
C) mean 49.6, SD 1.5
D) mean 54, SD 15
Answer: B) mean 46, SD 15 — x = 50 + 10u, so x̄ = 50 + 10(−0.4) = 46 and σₓ = 10 × 1.5 = 15. 49.6 adds ū without multiplying by h, SD 1.5 forgets the factor h = 10, and 54 adds 4 instead of subtracting it. - What is the (population) variance of the first 10 natural numbers?
A) 5.5
B) 38.5
C) 9.17
D) 8.25
Answer: D) 8.25 — (n² − 1)/12 with n = 10 gives 99/12 = 8.25. 9.17 is 82.5 ÷ 9, the sample variance, 5.5 is the mean, and 38.5 is the mean of the squares (385 ÷ 10) before subtracting 5.5². - The variance of x is 5. What is the variance of 4 − 2x?
A) 16
B) 24
C) 20
D) 10
Answer: C) 20 — Var(a x + b) = a² Var(x), so Var(4 − 2x) = (−2)² × 5 = 20. 10 multiplies by 2 instead of 4, 24 adds the 4 as if the constant changed the spread, and 16 subtracts it. - The mean of two numbers is 6 and their (population) variance is 4. The numbers are:
A) 3 and 9
B) 4 and 8
C) 2 and 10
D) 5 and 7
Answer: B) 4 and 8 — Write the numbers as 6 − d and 6 + d; the variance is d² = 4, so d = 2 and the numbers are 4 and 8. 2 and 10 have variance 16, 5 and 7 have variance 1, and 3 and 9 have variance 9. - The mean and variance of 10 observations were found to be 12 and 9. Later it was found that 8 had been recorded as 18. What is the correct variance?
A) 6
B) 9
C) 32
D) 8
Answer: A) 6 — Wrong Σx = 120 and wrong Σx² = 10(9 + 144) = 1530. Correct Σx = 110 (mean 11) and correct Σx² = 1530 − 324 + 64 = 1270, so the variance is 127 − 121 = 6. 32 corrects the mean but keeps the wrong Σx² (153 − 121), 9 leaves the variance unchanged, and 8 is the value that was misread, not a variance. - Two groups of 25 students each have means 10 and 14 and the same variance 4. What is the standard deviation of all 50 students?
A) 2
B) 4
C) 2√2
D) √20
Answer: C) 2√2 — Combined mean = 12, so d₁ = −2 and d₂ = 2. σ² = [25(4 + 4) + 25(4 + 4)] ÷ 50 = 8, and σ = √8 = 2√2. 2 just keeps the common SD and ignores the gap between the means, 4 is the variance of each group, and √20 uses the whole gap 14 − 10 = 4 as d, adding 4² = 16 instead of 2² = 4. - Find the standard deviation of the grouped data: classes 10–20, 20–30, 30–40, 40–50 with frequencies 2, 3, 3, 2.
A) 105
B) 10.5
C) √105
D) 9
Answer: C) √105 — Class marks are 15, 25, 35, 45 and by symmetry the mean is 30. Σf(x − 30)² = 2(225) + 3(25) + 3(25) + 2(225) = 1050, so σ² = 1050 ÷ 10 = 105 and σ = √105 ≈ 10.25. 105 is the variance, not the SD, 9 is the mean deviation about the mean, and 10.5 divides 1050 by 100 instead of by N = 10 (√105 is about 10.25).
Questions
Why do we divide by n and not n − 1?
Dividing by n gives the population variance, which is what FSc, Class 11 and most entry tests use. Dividing by n − 1 gives the sample variance used in inferential statistics. If a question does not say, use n.
Which is better, mean deviation or standard deviation?
Standard deviation is used far more because squares are easier to handle algebraically: it combines neatly across groups and changes simply under a x + b. Mean deviation is easier to understand but harder to work with.
Does the choice of assumed mean in the coding method change the answer?
No. Any A gives the same mean and SD; a good choice just makes the u-values small. The class width h, however, must be the actual common width.
Can the standard deviation be zero?
Yes, exactly when all observations are equal. It can never be negative, because it is the positive square root of an average of squares.