🏠 Home
Measures of Dispersion
Unit III · Lecture 18
BDS113 — Introduction to Statistics
Standard Deviation & Root Mean Square Deviation
Variance · Standard Deviation · RMSD · Shortcut Methods · Properties & Comparisons
Unit III · Lecture 18 of 40 · B.Sc. Data Science, 1st Year, Semester II
Measures of Dispersion
Unit III · Lecture 18
The Journey — Lecture 18
📐
Variance — The Foundation
Population variance · Sample variance · Why square the deviations?
📊
Standard Deviation — Definition & Calculation
Formula · Step-by-step method · Ungrouped & grouped data examples
🔧
Root Mean Square Deviation & Shortcut Methods
RMSD concept · Assumed mean method · Step-deviation method
⚖️
Properties, Comparisons & Quiz
Properties of SD · SD vs MAD vs Variance · Interactive tools · Practice quiz
Measures of Dispersion
Unit III · Lecture 18
🤔 From MAD to Variance & Standard Deviation
📖 The Motivation
In the previous lecture, we studied the Mean Absolute Deviation (MAD) — a simple and intuitive measure of spread. However, MAD has a critical limitation: it is not algebraically tractable. You cannot easily combine MADs from subgroups, use it in hypothesis testing, or build regression models with it.
To overcome this, statisticians developed variance and standard deviation — measures that use squared deviations instead of absolute values. These measures form the backbone of modern statistical analysis.
💡 Analogy: Choosing the Right Tool
Think of MAD as a hand saw — simple, easy to use, and good for basic cuts. Variance and standard deviation are like a power saw — more complex, but far more powerful and versatile. For simple tasks, either works. For advanced construction (hypothesis testing, regression, ANOVA), you need the power tool.
💬 Key Question: Why do we square the deviations instead of taking absolute values? Squaring has elegant mathematical properties — it is differentiable everywhere (unlike |x|), it penalises large deviations more heavily, and it allows algebraic decomposition. These properties make variance and SD the universal language of statistical variability.
Measures of Dispersion
Unit III · Lecture 18
📐 What is Variance?
📖 Formal Definition
Variance is the arithmetic mean of the squared deviations of observations from their mean. It measures the average squared distance of data points from the centre.
📖 Population Variance (σ²)
σ² = (1/N) × Σ(xᵢ − μ)²
Where:
• xᵢ = each observation
• μ = population mean
• N = population size
• σ² = population variance (sigma squared)
📖 Sample Variance (s²)
s² = (1/(n−1)) × Σ(xᵢ − x̄)²
Where:
• xᵢ = each observation
• x̄ = sample mean
• n = sample size
• s² = sample variance
• Dividing by (n−1) corrects for bias (Bessel's correction)
💡 Why (n−1) for sample variance? When we use the sample mean x̄ instead of the true population mean μ, we lose one degree of freedom. Dividing by (n−1) instead of n gives an unbiased estimate of the population variance. This is called Bessel's correction. For large samples, the difference between n and (n−1) is negligible.
Measures of Dispersion
Unit III · Lecture 18
📊 What is Standard Deviation?
📖 Formal Definition
The Standard Deviation (SD) is the positive square root of the variance. It measures the average amount of variability in a dataset, expressed in the same units as the original data (unlike variance, which is in squared units).
📖 Population Standard Deviation
σ = √σ² = √[(1/N) × Σ(xᵢ − μ)²]
📖 Sample Standard Deviation
s = √s² = √[(1/(n−1)) × Σ(xᵢ − x̄)²]
💡 Analogy: Variance vs Standard Deviation
If the marks of students are measured in points, then variance is in points² (squared units — hard to interpret). Standard deviation takes the square root and brings the measure back to points (original units — easy to interpret). Think of it as: variance is the raw material, and standard deviation is the finished product.
💬 Famous Quote: "The standard deviation is the yardstick by which we measure the 'typical' distance from the mean." — It tells us whether data points tend to be clustered close to the mean (small SD) or spread far away (large SD).
Measures of Dispersion
Unit III · Lecture 18
🔧 Root Mean Square Deviation (RMSD)
📖 Formal Definition
The Root Mean Square Deviation (RMSD) about a value A is defined as:
RMSD(A) = √[(1/n) × Σ(xᵢ − A)²]
It is the square root of the mean of squared deviations from any arbitrary value A — not necessarily the mean.
💡 Key Relationship
When A = x̄ (the mean), the RMSD becomes the standard deviation:
RMSD(x̄) = √[(1/n) × Σ(xᵢ − x̄)²] = SD
When A ≠ x̄, the RMSD is always greater than the SD. This is because the mean is the value that minimises the sum of squared deviations.
💡 The Minimum Property
Theorem: The sum of squared deviations Σ(xᵢ − A)² is minimum when A = x̄.
This means:
RMSD(A) ≥ SD for any value A
RMSD(A) = SD if and only if A = x̄
This is why the standard deviation (about the mean) is the most efficient measure of spread based on squared deviations.
💡 Practical Significance: RMSD is the general concept; standard deviation is the special case where A = x̄. In many textbooks, "standard deviation" and "RMSD about the mean" are used interchangeably. The RMSD framework also connects to the root mean square error (RMSE) used in machine learning and forecasting.
Measures of Dispersion
Unit III · Lecture 18
🪜 Step-by-Step: Calculating Standard Deviation
1
Find the Mean (x̄): x̄ = Σxᵢ / n
2
Calculate Deviations: dᵢ = xᵢ − x̄ for each observation.
3
Square Each Deviation: dᵢ² = (xᵢ − x̄)². This eliminates negative signs and penalises large deviations.
4
Sum the Squared Deviations: Σ(xᵢ − x̄)²
5
Divide by n (or n−1): Variance = Σ(xᵢ − x̄)² / n (population) or / (n−1) (sample).
6
Take the Square Root: SD = √Variance. This brings the result back to the original units.
💡 Shortcut Formula: An equivalent computational formula that avoids calculating deviations is:
σ² = (Σxᵢ² / n) − x̄² or equivalently σ² = (Σxᵢ² / n) − (Σxᵢ / n)²
This is especially useful for hand calculations and grouped data.
Measures of Dispersion
Unit III · Lecture 18
✏️ Example 1: SD of Ungrouped Data
📝 Problem
Find the variance and standard deviation of: 4, 8, 6, 5, 7, 10
📖 Solution
Step 1: Mean
x̄ = (4 + 8 + 6 + 5 + 7 + 10) / 6 = 40 / 6 = 6.67
Step 2–4: Deviations and Squared Deviations
| xᵢ | xᵢ − x̄ | (xᵢ − x̄)² |
| 4 | −2.67 | 7.1289 |
| 8 | +1.33 | 1.7689 |
| 6 | −0.67 | 0.4489 |
| 5 | −1.67 | 2.7889 |
| 7 | +0.33 | 0.1089 |
| 10 | +3.33 | 11.0889 |
| Σ(xᵢ − x̄)² = | 23.3334 |
Population Variance
σ² = 23.33 / 6 = 3.89
Population SD
σ = √3.89 ≈ 1.97
💡 Interpretation: On average, each data point deviates from the mean by approximately 1.97 units. The SD is in the same units as the original data, making it directly interpretable.
Measures of Dispersion
Unit III · Lecture 18
✏️ Example 2: SD of Frequency Distribution
📝 Problem
The number of goals scored in 30 matches is given below. Find the standard deviation.
| Goals (xᵢ) | 0 | 1 | 2 | 3 | 4 | 5 |
| Frequency (fᵢ) | 3 | 5 | 8 | 7 | 4 | 3 |
📖 Solution
Step 1: Mean
N = 3+5+8+7+4+3 = 30
Σfᵢxᵢ = (3×0)+(5×1)+(8×2)+(7×3)+(4×4)+(3×5) = 0+5+16+21+16+15 = 73
x̄ = 73/30 = 2.433
| xᵢ | fᵢ | fᵢxᵢ | xᵢ − x̄ | (xᵢ − x̄)² | fᵢ(xᵢ − x̄)² |
| 0 | 3 | 0 | −2.433 | 5.920 | 17.760 |
| 1 | 5 | 5 | −1.433 | 2.054 | 10.270 |
| 2 | 8 | 16 | −0.433 | 0.188 | 1.504 |
| 3 | 7 | 21 | +0.567 | 0.321 | 2.247 |
| 4 | 4 | 16 | +1.567 | 2.455 | 9.820 |
| 5 | 3 | 15 | +2.567 | 6.590 | 19.770 |
| Totals | 73 | | | 61.371 |
Variance
σ² = 61.371 / 30 = 2.046
Standard Deviation
σ = √2.046 ≈ 1.43 goals
Measures of Dispersion
Unit III · Lecture 18
✏️ Example 3: SD of Grouped Data (Class Intervals)
📝 Problem
The heights (in cm) of 50 students are grouped as follows. Find the standard deviation.
| Height (cm) | 150–155 | 155–160 | 160–165 | 165–170 | 170–175 |
| Frequency (fᵢ) | 6 | 12 | 18 | 10 | 4 |
📖 Solution (Direct Method)
Mid-points (xᵢ): 152.5, 157.5, 162.5, 167.5, 172.5
N = 6+12+18+10+4 = 50
Σfᵢxᵢ = (6×152.5)+(12×157.5)+(18×162.5)+(10×167.5)+(4×172.5) = 915+1890+2925+1675+690 = 8095
x̄ = 8095/50 = 161.9 cm
| Class | xᵢ | fᵢ | fᵢxᵢ | xᵢ − x̄ | (xᵢ − x̄)² | fᵢ(xᵢ − x̄)² |
| 150–155 | 152.5 | 6 | 915 | −9.4 | 88.36 | 530.16 |
| 155–160 | 157.5 | 12 | 1890 | −4.4 | 19.36 | 232.32 |
| 160–165 | 162.5 | 18 | 2925 | +0.6 | 0.36 | 6.48 |
| 165–170 | 167.5 | 10 | 1675 | +5.6 | 31.36 | 313.60 |
| 170–175 | 172.5 | 4 | 690 | +10.6 | 112.36 | 449.44 |
| Totals | 8095 | | | 1532.00 |
Variance
σ² = 1532 / 50 = 30.64
Standard Deviation
σ = √30.64 ≈ 5.54 cm
Measures of Dispersion
Unit III · Lecture 18
🔧 Shortcut Method: Assumed Mean
📖 When to Use
When data values are large (e.g., heights in cm, incomes in thousands), calculating (xᵢ − x̄)² directly is tedious. The assumed mean method simplifies computation by choosing an arbitrary value A (usually near the centre of the data) and working with deviations from A.
📖 Formula
Let dᵢ = xᵢ − A (deviation from assumed mean A)
Variance: σ² = (Σfᵢdᵢ² / N) − (Σfᵢdᵢ / N)²
SD: σ = √σ²
This is equivalent to: σ² = (mean of d²) − (mean of d)²
📝 Re-doing Example 3 with Assumed Mean
Let A = 162.5 (mid-point of the modal class), class width c = 5
dᵢ = (xᵢ − A) / c: d values are −2, −1, 0, 1, 2
| Class | fᵢ | dᵢ | fᵢdᵢ | fᵢdᵢ² |
| 150–155 | 6 | −2 | −12 | 24 |
| 155–160 | 12 | −1 | −12 | 12 |
| 160–165 | 18 | 0 | 0 | 0 |
| 165–170 | 10 | 1 | 10 | 10 |
| 170–175 | 4 | 2 | 8 | 16 |
| Totals | 50 | | −6 | 62 |
📖 Calculation
σ²(d) = (62/50) − (−6/50)² = 1.24 − 0.0144 = 1.2256
σ² = σ²(d) × c² = 1.2256 × 25 = 30.64
σ = √30.64 ≈ 5.54 cm ✓ (Same answer, much easier arithmetic!)
Measures of Dispersion
Unit III · Lecture 18
⚖️ RMSD vs Standard Deviation — Comparison
📝 Illustration
Consider the data: 2, 4, 6, 8, 10 (Mean = 6)
| Value of A | Σ(xᵢ − A)² | RMSD(A) = √[Σ(xᵢ−A)²/5] | Comparison |
| A = 0 | 4+16+36+64+100 = 220 | √44.0 = 6.63 | RMSD > SD |
| A = 4 | 4+0+4+16+36 = 60 | √12.0 = 3.46 | RMSD > SD |
| A = 6 (mean) | 16+4+0+4+16 = 40 | √8.0 = 2.83 | RMSD = SD (minimum!) |
| A = 8 | 36+16+4+0+4 = 60 | √12.0 = 3.46 | RMSD > SD |
| A = 10 | 64+36+16+4+0 = 120 | √24.0 = 4.90 | RMSD > SD |
Key Result
RMSD(A) ≥ SD, with equality iff A = x̄
The standard deviation is the minimum possible RMSD — achieved when deviations are measured from the mean.
Measures of Dispersion
Unit III · Lecture 18
🎬 Interactive: SD & RMSD Calculator
Enter data and an arbitrary value A to see both the SD and RMSD(A) computed step by step:
Measures of Dispersion
Unit III · Lecture 18
🔑 Properties of Standard Deviation
- SD ≥ 0: Standard deviation is always non-negative. It equals zero only when all observations are identical.
- SD is based on all observations: Every data point contributes to the SD, unlike the range.
- SD is in the same units as the data: Since variance is in squared units, taking the square root restores the original units (e.g., cm, kg, marks).
- SD is affected by outliers: Because deviations are squared, extreme values have a disproportionately large effect on SD.
- Effect of change of origin: If yᵢ = xᵢ + c (adding a constant), then SD(y) = SD(x). Adding a constant does not change the spread.
- Effect of change of scale: If yᵢ = c × xᵢ (multiplying by a constant), then SD(y) = |c| × SD(x). Multiplying scales the SD by the same factor.
- Combined effect: If yᵢ = a × xᵢ + b, then SD(y) = |a| × SD(x). The constant b has no effect; the multiplier a scales the SD.
- Minimum RMSD property: The SD about the mean is the minimum value of RMSD(A) for any A. This is a fundamental optimisation property.
Measures of Dispersion
Unit III · Lecture 18
⚖️ SD vs MAD vs Variance — Comparison
| Feature | MAD | Variance (σ²) | Std. Deviation (σ) |
| Based on | |xᵢ − x̄| | (xᵢ − x̄)² | √(xᵢ − x̄)² |
| Units | Same as data | Squared units | Same as data |
| Outlier effect | Moderate | High | High |
| Algebraic use | Poor | Excellent | Excellent |
| Used in testing | Rarely | Directly | Directly |
| Ease of computation | Easiest | Moderate | Moderate |
| Interpretability | Very intuitive | Less intuitive (squared) | Intuitive |
| Relationship | Independent | σ² = (SD)² | σ = √(Variance) |
💡 In Practice: Variance is used for mathematical derivations and computations. Standard deviation is used for reporting and interpretation (since it's in original units). MAD is used for intuitive understanding and in specific applications like forecasting error. For a symmetric, bell-shaped distribution: SD ≈ 1.25 × MAD.
Measures of Dispersion
Unit III · Lecture 18
🎬 Interactive: Effect of Outliers on SD
Click each scenario to see how adding an outlier affects the mean, MAD, and SD:
📊
Original Data
50, 55, 60, 65, 70
⚠️
Mild Outlier
50, 55, 60, 65, 70, 95
🚨
Extreme Outlier
50, 55, 60, 65, 70, 200
Measures of Dispersion
Unit III · Lecture 18
🔑 Summary: SD & RMSD
- Variance = mean of squared deviations from the mean. Population: σ² = Σ(xᵢ−μ)²/N. Sample: s² = Σ(xᵢ−x̄)²/(n−1).
- Standard Deviation = √Variance. It is the most widely used measure of dispersion, expressed in the same units as the data.
- RMSD(A) = √[Σ(xᵢ−A)²/n] for any value A. When A = x̄, RMSD = SD. For any other A, RMSD > SD.
- Minimum property: The sum of squared deviations is minimised when measured from the mean. This makes SD the most efficient RMSD.
- Shortcut formula: σ² = (Σfᵢxᵢ²/N) − x̄². The assumed mean method further simplifies computation for large values.
- Properties: SD ≥ 0; SD is in original units; SD is unaffected by origin shifts; SD scales linearly with multiplication.
- SD is sensitive to outliers because squaring amplifies large deviations. This is both a strength (detecting variability) and a weakness (susceptibility to extreme values).
- For symmetric distributions: SD ≈ 1.25 × MAD. This relationship helps convert between the two measures.
Measures of Dispersion
Unit III · Lecture 18
🧠 Quick Quiz — Lecture 18
Q1: The standard deviation is the positive square root of:
A) Mean
B) Variance
C) MAD
D) Range
Q2: If every observation in a dataset is multiplied by 3, the new SD will be:
A) Same as before
B) SD + 3
C) 3 × SD
D) 9 × SD
Q3: The RMSD about a value A is minimum when A equals:
A) Median
B) Mean
C) Mode
D) Any value — it doesn't matter
Q4: Variance is expressed in:
A) Same units as the data
B) Squared units of the data
C) Percentage
D) Dimensionless units
Q5: Why do we divide by (n−1) instead of n for sample variance?
A) To make the variance larger
B) To get an unbiased estimate of the population variance (Bessel's correction)
C) Because n is always odd
D) It is an arbitrary convention
Q6: If y = x + 10, then SD(y) equals:
A) SD(x) + 10
B) SD(x)
C) 10 × SD(x)
D) SD(x) / 10
Q7: Which of the following is NOT a property of standard deviation?
A) It is always non-negative
B) It is in the same units as the data
C) It is unaffected by outliers
D) It is based on all observations
Q8: The shortcut formula for variance is:
A) σ² = Σ(xᵢ − x̄) / n
B) σ² = (Σxᵢ²/n) − x̄²
C) σ² = Σ|xᵢ − x̄| / n
D) σ² = (Σxᵢ/n)²
Measures of Dispersion
Unit III · Lecture 18
📝 Homework & Practice
📝 Practice Tasks
1. Calculate the variance and standard deviation of: 12, 15, 18, 21, 24
2. Find the SD for the following frequency distribution:
Value: 5, 10, 15, 20, 25
Frequency: 4, 6, 10, 8, 2
3. Find the SD for the following grouped data using the assumed mean method:
Class: 0–10, 10–20, 20–30, 30–40, 40–50
Frequency: 5, 8, 15, 12, 10
4. The RMSD of a dataset about the value A = 10 is 5.2. If the mean of the dataset is 8, what can you say about the standard deviation?
5. Two datasets have the same mean of 50. Dataset A has SD = 5 and Dataset B has SD = 15. Describe the difference in their distributions.
6. If the variance of a dataset is 64, what is the standard deviation? If each value is multiplied by 2 and then 5 is added, what will be the new variance and SD?
7. BONUS: Prove that Σ(xᵢ − A)² = Σ(xᵢ − x̄)² + n(x̄ − A)² for any value A. Use this to explain why RMSD(A) ≥ SD.
💡 Tip: Always verify your SD calculation using the shortcut formula σ² = (Σxᵢ²/n) − x̄². If both methods give the same answer, your calculation is correct.
Measures of Dispersion
Unit III · Lecture 18
Thank You!
Questions? Let's discuss!
Upcoming in Unit III
Lecture 19: Coefficient of Variation — Comparing Variability Across Datasets
Lecture 20: Combined Variance & SD of Two Groups
Lecture 21: Lorenz Curve & Measures of Inequality
Unit III · Lecture 18 · BDS113 Introduction to Statistics · B.Sc. Data Science, Semester II