Measures of Dispersion: Range, Variance & Standard Deviation
Why the average alone is never enough — range, variance, standard deviation, the population vs sample (n-1) question, Excel walkthroughs, and the coefficient of variation.
14. Dispersion — Definition & Overview
[S]
Definition (from the slide)
- The measure of dispersion refers to the variability within the data.
- Variability is the measure of how close or how far the data lie from the central value.
- Reliability of a measure of central tendency is more if dispersion in the data is less. ← highlighted on the slide
- It includes range, variance, standard deviation, coefficient of variation, and interquartile range.
The five measures
| Measure | Formula | Character |
|---|---|---|
| Range | Max − Min | Simplest; uses only 2 points |
| Variance | Avg. squared deviation from mean | Squared units |
| Standard Deviation | √Variance | Original units — the one you report |
| Coefficient of Variation | (σ / mean) × 100% | Compares across different scales |
| IQR | Q3 − Q1 | Middle 50%; ignores outliers |
Why dispersion is necessary
A measure of central tendency alone is not enough. Two datasets can have identical means and behave completely differently — the Machine A vs. B example in §15 is exactly this. The mean tells you where the data sits; dispersion tells you how much you can trust that centre.
15. Range
[T+S]
Range = Maximum − Minimum
What the slide says
- The simplest measure of spread — the full extent of variation between the smallest and largest value in a dataset.
- It tells you how far the data stretches — the total distance between the two extreme values.
- It uses only 2 data points (max and min). It says nothing about how the rest of the data is distributed, and it is highly sensitive to a single outlier.
15.1 Example 3 — Machine A vs. Machine B
Target specification: 10.0 mm diameter.
| Sample parts (mm) | Mean | Range | |
|---|---|---|---|
| Machine A | 9.9, 10.0, 10.1, 10.0, 10.0 | 10.0 | 10.1 − 9.9 = 0.2 |
| Machine B | 9.5, 10.5, 9.6, 10.4, 10.0 | 10.0 | 10.5 − 9.5 = 1.0 |
The mean is identical for both machines. “Mean is same for both. After that, we’ll calculate the range.”
Verdict: Machine A is better. Its parts cluster tightly around the 10.0 mm target; Machine B’s scatter widely. In manufacturing, consistency is quality.
This example is the whole justification for dispersion as a concept. Equal means, completely different machines. Only a spread measure can separate them.
15.2 The twist — how one value flips the verdict
The slide was then edited live to extend both machines to 6 sample parts:
| Sample parts (mm) | Range | |
|---|---|---|
| Machine A | 9.9, 10.0, 10.1, 10.0, 10.0, 11 | 11 − 9.9 = 1.1 |
| Machine B | 9.5, 10.5, 9.6, 10.4, 10.0, 10.4 | 10.5 − 9.5 = 1.0 |
Machine A’s range jumps 0.2 → 1.1. Machine A now looks WORSE than Machine B.
Every one of Machine A’s other five parts is still excellent. One single value reversed the entire conclusion.
This is the sensitivity weakness of range demonstrated rather than asserted — and precisely why variance and standard deviation exist.
15.3 Industrial range case studies
[S]
Machine Temperature Monitoring (IoT sensor)
A smart factory’s IoT sensor logs CNC machine temperature every minute for one hour:
72, 75, 74, 78, 73, 76, 74, 90, 75, 74 (°C)
Maximum = 90 °C Minimum = 72 °C Range = 18 °C
Interpretation (from the slide): an 18 °C range is unusually wide for stable machine operation. The spike to 90 °C likely signals a cooling fault or overheating event — exactly the kind of signal predictive maintenance systems watch for in real time.
Production Cycle Time (robotic arm)
A robotic arm’s assembly cycle time is auto-logged for 8 consecutive cycles on a smart line:
12.1, 12.3, 12.0, 12.4, 12.2, 15.8, 12.1, 12.3 (seconds)
Maximum = 15.8 s Minimum = 12.0 s Range = 3.8 s
Interpretation (from the slide): most cycles cluster tightly at 12.1–12.4 seconds, but one took 15.8 seconds. Across thousands of logged cycles, a range spike like this automatically triggers alerts for micro-stoppages or bottlenecks on the line.
The pattern in both cases: the range is not the final answer — it is an alarm trigger. A wide range says “go look at this.”
15.4 Range in the AI bias example
Recall §3.3: the range across group mean probabilities (0.9 − 0.5 = 0.4) was the number that got the model rejected. Range appears in three completely different contexts in this session — manufacturing quality, IoT monitoring, and AI fairness.
16. Variance
[T]
Formula
Σ (xᵢ − μ)²
Variance σ² = ─────────────
N
Reading the formula in plain words
- Take each value xᵢ in the dataset (if you have 20 observations, each one is an x)
- Subtract the mean μ → this is the deviation: how far that value sits from the centre
- Square it
- Take the average of all those squared deviations
“Squares of deviations from mean — you are taking the average. That is called variance.” “It says how much data is spread away from the mean.”
Symbol note: μ (mu) is the mean. The averaging symbol “always tells the average.”
The worked example — calories burned
Data: 100, 150, 200, 250, 300 (calories burned per day)
Mean μ = (100 + 150 + 200 + 250 + 300) / 5
= 1000 / 5
= 200 calories
Then for each value: subtract 200, square the result, sum them all, divide by 5 (the number of values) → variance.
Deviations: −100, −50, 0, +50, +100
The units problem
Question posed to the class: “What are the units of variance here? Is it calories, or calories squared?”
Answer: calories².
And this is the problem. “The disadvantage is the units will not match with the original data.”
“If you say 500 calories squared — no one can understand. No one can understand.”
That is what standard deviation exists to fix.
17. Standard Deviation
[T]
Formula
Standard Deviation σ = √Variance
Why it exists
Variance is in calories². Taking the square root returns you to calories — the same units as the original data.
√(calories²) = calories
“Your data is in calories. The original data is in calories. Standard deviation answer is in calories. It is easy to compare, or it is easy to discuss that number with anybody.”
The interpretability comparison
| Statement | Interpretable? |
|---|---|
| ”Your variance is 100 calories²” | No. “You don’t know what it is… it is very difficult to interpret." |
| "Your standard deviation is 10 calories” | Yes. “There is a variation of 10 calories around the centre.” |
“So just for interpretation, we use square root of variance.”
What SD means conceptually
How much the data deviates from the mean / how spread out it is around the centre.
- SD near zero → values sit very close to the mean; near-constant data
- SD high → values are widely scattered around the mean
Both variance and standard deviation measure the same thing. The square root exists purely so the number is reportable.
18. Population vs. Sample — the n − 1 Question
[T]
A student asked directly: “Why do we have a different formula for population and for sample?”
The two formulas
| Formula | Divide by | |
|---|---|---|
| Population variance | σ² = Σ(xᵢ − μ)² / N | N |
| Sample variance | s² = Σ(xᵢ − x̄)² / (n − 1) | n − 1 |
The instructor’s answer
- It is very difficult to get the whole population.
“Example: salaries of all employees in India. It’s very difficult to go to each and every employee, collect it, and take the average.”
- So you randomly sample instead — pick some set of people from each group.
- To correct for that, the sample formula divides by n − 1.
“Just to ensure, out of 25 we are keeping 24. We are reducing one value.”
- The underlying concept is called degrees of freedom.
Explicitly deferred
“That I will cover later. I don’t want to confuse you with the n and n−1 on the first day itself. Even though I keep it in the formula, whenever it comes to sample, always n − 1 will come into the picture.”
For this session, only the population formulas were used. Sample variance and sample standard deviation in the Excel sheet were explicitly skipped: “Currently, sample variance, sample standard deviation, we’ll ignore it. We’ll cover in the next class.”
19. Excel Walkthroughs
[T]
Two datasets were worked live in Excel. The workflow is identical for both.
19.1 Exercise 1 — temperature sensor, 25 readings
A temperature sensor takes one reading per minute for 25 minutes.
| Step | What you compute | Excel formula | Result |
|---|---|---|---|
| 1 | Maximum | =MAX(C6:C30) | 90 |
| 2 | Minimum | =MIN(C6:C30) | 72.6 |
| 3 | Range | =C33-C34 | 17.4 |
| 4 | Mean μ | =AVERAGE(C6:C30) | 75.64 |
| 5 | Deviation column (x − μ) | =C6-$C$37, dragged down | per row |
| 6 | Squared deviation column | multiply the deviation by itself | per row |
| 7 | Sum of squared deviations | =SUM(...) | 244.90 |
| 8 | Population variance | 244.90 ÷ 25 | 9.8 |
| 9 | Population standard deviation | √9.8 | 3.13 |
The $ locking tip
When the deviation column references the mean cell, that reference must not shift as you drag the formula down.
“You have to keep the dollar before c and after c.” →
$C$37
A student hit exactly this bug: “When I copy paste, only one dollar was coming.” The fix is dollar signs both before and after the column letter.
The critical observation — the outlier effect
Almost every reading sits around 74–76. Yet the standard deviation came out as 3.13 — far too large for data that tightly clustered.
“Tell me why it is deviating a lot?” Student: “Outlier.” Instructor: “Outlier — 90. That’s why we are getting a lot of standard deviation.”
The test performed live: replace the 90 with 75, recompute.
Population standard deviation drops from 3.13 → approximately 1.10
The lesson: “If your data is having really outliers, then mean will impact, standard deviation will impact — everything will impact. Make sure your data is not having the outliers.”
19.2 Exercise 2 — second dataset
Same method, different numbers:
| Step | Value |
|---|---|
| Minimum | 11.34 |
| Sum of squared deviations Σ(x − μ)² | 12.75 |
| Population variance | 12.75 ÷ 25 = 0.51 |
| Population standard deviation | √0.51 ≈ 0.71 |
Again with the reminder to use $ locking on the mean reference.
20. Coefficient of Variation
[S]
The problem it solves
Standard deviation is an absolute measure. When two datasets have very different means, comparing their raw standard deviations is misleading. CV expresses variability relative to the mean, as a percentage.
Formula
CV = (Standard Deviation / Mean) × 100 %
Worked example — comparing consistency of product weights
Two products; we want to compare the consistency of their weights from a sample of measurements.
Product A: Weights = [10, 12, 14, 13, 11]
Product B: Weights = [100, 102, 98, 105, 101]
Step 1 — Means
Product A mean = 12
Product B mean = 101.2
Step 2 — Standard deviations
σ_A = 1.414
σ_B = 2.315
At this point Product B looks more variable — its absolute SD is larger (2.315 > 1.414).
Step 3 — Coefficients of variation
Product A CV ≈ 11.78 %
Product B CV ≈ 2.28 %
Interpretation (verbatim sense from the slide)
Product B has less relative variability in its weights than Product A — even though the absolute standard deviation of Product B is higher.
The CV allows us to make this comparison meaningful, especially when the means of the datasets are different.
Exam-relevant: this example is deliberately built so raw SD and CV give opposite verdicts. When comparing spread across datasets on different scales → use CV.