- Foundation
- About 17 min
- 5 practice questions
Variance and standard deviation of ungrouped data
Explain why squared deviations are used, define variance and standard deviation, and calculate them for a list of observations by the definition and by σ² = Σx²/n − x̄².
If something looks wrong, please tell us.
Absolute values solved the problem of deviations cancelling, but they are awkward in algebra. Squaring is the other way to make every deviation non-negative, and it leads to the most widely used measure of spread in statistics, the standard deviation.
Squaring the deviations
For observations x₁, …, xₙ with mean x̄, the sum Σ(xᵢ − x̄)² is never negative, and it is zero only when every observation equals the mean (no dispersion at all). Small sums mean the data are bunched near the mean; large sums mean they are spread out. But the plain sum has a flaw: it grows with the number of observations.
Worked example 1: why we divide by n
Set A: 0, 20, 40, 60 (mean 30). Σ(x − 30)² = 900 + 100 + 100 + 900 = 2000. Set B: the 41 whole numbers 10, 11, …, 50 (mean 30). Σ(x − 30)² = 2(1² + 2² + … + 20²) = 2 × 2870 = 5740. The sum is larger for B, although A's values lie as far as 30 from the mean and B's at most 20. Dividing by the number of observations fixes this: A gives 2000/4 = 500 and B gives 5740/41 = 140. Now A correctly shows more spread.
Variance and standard deviation
Variance σ² = (1/n) Σ(xᵢ − x̄)². Standard deviation σ = √[(1/n) Σ(xᵢ − x̄)²].
The variance is in squared units (for marks, 'marks²'), which is hard to interpret. Taking the positive square root brings the measure back to the units of the data, so the standard deviation σ is the usual measure of dispersion about the mean.
A computing formula
Expanding the square gives a formula that avoids computing every deviation:
- Σ(xᵢ − x̄)² = Σxᵢ² − 2x̄Σxᵢ + nx̄².
- Since Σxᵢ = nx̄, this is Σxᵢ² − 2nx̄² + nx̄² = Σxᵢ² − nx̄².
- Divide by n: σ² = Σxᵢ²/n − x̄².
σ² = (mean of the squares) − (square of the mean) = Σxᵢ²/n − x̄².
Computing σ for a list of numbers
- Mean x̄ = Σxᵢ/n
- Squared deviations (xᵢ − x̄)², or simply xᵢ²
- Variance Σ(xᵢ − x̄)²/n, or Σxᵢ²/n − x̄²
- Standard deviation σ = √variance
Worked examples
Worked example 2: by the definition
Find the variance and standard deviation of 2, 4, 6, 8, 10. x̄ = 30/5 = 6. Deviations: −4, −2, 0, 2, 4; squares: 16, 4, 0, 4, 16; sum 40. σ² = 40/5 = 8 and σ = √8 = 2√2 ≈ 2.83.
Worked example 3: by the computing formula
Same data: Σx² = 4 + 16 + 36 + 64 + 100 = 220. σ² = 220/5 − 6² = 44 − 36 = 8, as before.
Worked example 4: a non-integer mean
Find the standard deviation of 3, 5, 6, 7, 9, 12. n = 6, Σx = 42, x̄ = 7. Deviations: −4, −2, −1, 0, 2, 5; squares: 16, 4, 1, 0, 4, 25; sum 50. σ² = 50/6 ≈ 8.33 and σ ≈ 2.89. Check: Σx² = 9 + 25 + 36 + 49 + 81 + 144 = 344, and 344/6 − 49 = 57.33 − 49 = 8.33.
Worked example 5: the two players again
Player P (10, 85, 40, 0, 95, 70; mean 50): squared deviations 1600, 1225, 100, 2500, 2025, 400, sum 7850, σ² ≈ 1308.3, σ ≈ 36.2 runs. Player Q (45, 55, 50, 48, 52, 50; mean 50): squared deviations 25, 25, 0, 4, 4, 0, sum 58, σ² ≈ 9.67, σ ≈ 3.1 runs. The standard deviation confirms what the mean deviation showed: Q is far more consistent.
| Data | Mean | Variance | Standard deviation |
|---|---|---|---|
| 2, 4, 6, 8, 10 | 6 | 8 | ≈ 2.83 |
| 3, 5, 6, 7, 9, 12 | 7 | ≈ 8.33 | ≈ 2.89 |
| Player P | 50 | ≈ 1308.3 | ≈ 36.2 |
| Player Q | 50 | ≈ 9.67 | ≈ 3.1 |
Key takeaways
- Variance is the mean of squared deviations from the mean; σ is its positive square root.
- σ² = Σxᵢ²/n − x̄² is often quicker.
- σ has the same units as the data; σ = 0 only when all values are equal.
Check your understanding
-
1. What is the variance of 1, 3, 5, 7, 9?
- 8
- 2√2
- 4
- 10
Show answer
Answer: A. Mean = 25/5 = 5. Squared deviations: 16, 4, 0, 4, 16, total 40. Variance = 40/5 = 8.
-
2. For 10 observations, Σx = 60 and Σx² = 400. What is the variance?
- 40
- 36
- 4
- 2
Show answer
Answer: C. x̄ = 60/10 = 6. σ² = Σx²/n − x̄² = 400/10 − 36 = 40 − 36 = 4.
-
3. What is the standard deviation of 4, 4, 4, 4, 4?
- 4
- 1
- 16
- 0
Show answer
Answer: D. All observations equal the mean 4, so every deviation is 0 and σ = 0: there is no dispersion.
-
4. What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?
- 2
- 4
- √2
- 5
Show answer
Answer: A. Mean = 40/8 = 5. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16, total 32. Variance = 32/8 = 4, so σ = 2.
-
5. Assertion (A): Standard deviation is preferred to variance for describing spread in the data's own units. Reason (R): Variance is measured in the square of the units of the observations.
- Both A and R are true, and R is the correct explanation of A
- Both A and R are true, but R is not the correct explanation of A
- A is true, but R is false
- A is false, but R is true
Show answer
Answer: A. Both are true. Squaring deviations puts variance in squared units; taking the square root returns to the original units. R explains A.
Sign in to keep track of the lessons you finish.