📊 Dispersion Calculator
Enter comma-separated numbers to calculate all major measures of dispersion instantly.
What Are Measures of Dispersion?
Measures of central tendency tell you where data clusters, but they leave out half the story. Two datasets can have the same mean yet look nothing alike:
Dataset A: {98, 99, 100, 101, 102} — Mean = 100
Dataset B: {1, 50, 100, 150, 199} — Mean = 100
✓ Same mean. Completely different spread. You need a measure of dispersion to tell these datasets apart — the mean alone cannot do it.
Dispersion is also called variability, spread, or scatter. The larger the dispersion measure, the more spread out the data values are. A dispersion of zero means every value is identical.
Absolute vs. Relative Measures of Dispersion
All dispersion measures fall into one of two categories. Absolute measures are expressed in the same units as the raw data and describe the actual scatter of values. Relative measures are dimensionless ratios that allow fair comparison across datasets with different units or different means.
| Feature | Absolute Measures | Relative Measures |
|---|---|---|
| Units | Same as original data | No units (dimensionless) |
| Use case | Single dataset description | Comparing two or more datasets |
| Examples | Range, IQR, SD, Variance | CV, Coefficient of QD |
| Sensitivity | Depends on units and scale | Scale-independent |
Range — Definition, Formula, and Examples
The range is the simplest measure of dispersion: the difference between the maximum and minimum values in a dataset. You can calculate it in seconds, which makes it a useful first look at any data — but it tells you nothing about what happens between the extremes.
Dataset: {23, 56, 45, 65, 59, 55, 62, 54, 85, 25}
Find maximum: 85
Find minimum: 23
Range = 85 − 23 = 62
✓ Range = 62. This single number hides all the variation in between — note how it takes just two data points to compute it.
For grouped data with classes 10–20, 20–30, 30–40, 40–50: Range = 50 − 10 = 40.
Coefficient of Range (Relative Measure)
Advantages and Disadvantages of Range
| Advantages | Disadvantages |
|---|---|
| Simplest and fastest to calculate | Uses only 2 values — ignores everything in between |
| Easy for anyone to understand | Extremely sensitive to outliers |
| Good for quick quality-control checks | Cannot be calculated for open-ended distributions |
| Detects data entry errors immediately | Gets larger as sample size grows (not stable) |
Never use range as your only dispersion measure for serious analysis. A single unusual value completely redefines it. Always follow up with IQR or standard deviation. The dedicated range page covers additional edge cases.
Interquartile Range (IQR) and Quartile Deviation
The interquartile range measures the spread of the middle 50% of data — the range between the first quartile (Q1) and the third quartile (Q3). Because it ignores both tails, it resists the influence of outliers and is the natural partner to the median.
How to Find Q1, Q2, and Q3
Quartiles divide ordered data into four equal parts. Their positions are:
- Q1 (25th percentile): position (n+1)/4
- Q2 (50th percentile, median): position (n+1)/2
- Q3 (75th percentile): position 3(n+1)/4
When a position falls between two values, interpolate by averaging the two surrounding values. For a deeper walkthrough of how percentiles relate to quartiles, see percentiles.
Dataset (n = 10): {3, 7, 8, 12, 14, 18, 21, 25, 29, 35}
Data is already sorted. n = 10.
Q1 position: (10+1)/4 = 2.75. Interpolate between 2nd (7) and 3rd (8) values: Q1 = 7 + 0.75(8−7) = 7.75
Q2 position: (10+1)/2 = 5.5. Average of 5th (14) and 6th (18): Q2 = (14+18)/2 = 16
Q3 position: 3(10+1)/4 = 8.25. Interpolate between 8th (25) and 9th (29): Q3 = 25 + 0.25(29−25) = 26
IQR = Q3 − Q1 = 26 − 7.75 = 18.25
✓ IQR = 18.25. Use the IQR calculator to verify any dataset. The five-number summary calculator extends this to Min, Q1, Q2, Q3, Max.
Quartile Deviation (Semi-IQR)
Also called the semi-interquartile range, this tells you the typical distance from the median to either quartile. The relative version for cross-dataset comparison:
Five-Number Summary and Box Plots
The five-number summary {Min, Q1, Q2, Q3, Max} is the natural extension of quartiles. In a box plot, the box spans Q1 to Q3 (the IQR), and the whiskers extend to the minimum and maximum non-outlier values. Any point beyond 1.5 × IQR from Q1 or Q3 is typically flagged as a potential outlier.
Advantages and Disadvantages of IQR
| Advantages | Disadvantages |
|---|---|
| Not affected by extreme outliers | Ignores data outside the middle 50% |
| Best choice for skewed distributions | Less algebraically tractable than SD |
| Works for ordinal data | Does not use all data values |
| Natural partner to the median | Less informative for symmetric data |
See the full interquartile range page for additional examples, including the IQR method for outlier detection.
Mean Deviation — Definition, Formula, and Examples
Mean deviation (also called mean absolute deviation or MAD) is the arithmetic mean of the absolute differences between each data point and a central value — usually the mean or the median. It is more intuitive than variance because it stays in the original units and avoids squared values.
Why Absolute Values?
Without absolute values, positive and negative deviations cancel exactly. For any dataset, the deviations from the mean always sum to zero. The absolute value keeps the sign from destroying the information.
Mean Deviation About the Mean (Ungrouped Data)
Dataset: {2, 4, 6, 8, 10}
Mean: (2+4+6+8+10)/5 = 30/5 = 6
Absolute deviations: |2−6|=4, |4−6|=2, |6−6|=0, |8−6|=2, |10−6|=4
Sum of |deviations|: 4+2+0+2+4 = 12
M.D. = 12/5 = 2.4
✓ Mean Deviation = 2.4. On average, each value deviates 2.4 units from the mean of 6.
Mean Deviation About the Median
Mean deviation is minimized when calculated about the median. This is why some analysts prefer this version — the median minimizes the sum of absolute deviations, making M.D.(Median) the smallest possible value for any central reference point you choose.
Mean Deviation for Grouped Data
xᵢ = class midpoint
fᵢ = class frequency
x̄ = weighted mean from grouped data
MAD vs. Standard Deviation — Why Statistics Prefers SD
| Feature | Mean Absolute Deviation | Standard Deviation |
|---|---|---|
| Formula | Average of |deviations| | √(Average of squared deviations) |
| Weight on outliers | Equal weight (linear) | Greater weight (squaring amplifies) |
| Units | Same as data | Same as data |
| Mathematical tractability | Poor (not differentiable at zero) | Excellent (calculus-friendly) |
| Use in further statistics | Rarely | Constant (ANOVA, regression, t-tests) |
| Robustness | More robust to outliers | Less robust |
Standard deviation is preferred over MAD not because it is more intuitive, but because squared deviations have superior mathematical properties. They are differentiable, additive across independent groups, and they link directly to the variance used in every major statistical test.
Variance — Definition, Formula, and Examples
Variance is the average of the squared deviations from the mean. Squaring solves the sign cancellation problem (negative and positive deviations no longer cancel) while maintaining the algebraic properties that make further statistical work possible. For a standalone treatment, see the variance page.
Population Variance
μ = population mean
N = population size
Sample Variance (Bessel's Correction)
x̄ = sample mean
n = sample size
n−1 = degrees of freedom
Why n−1 Instead of n? — Bessel's Correction Fully Explained
The Intuition Behind n−1
The problem with dividing by n: The sample mean x̄ is calculated from the same data as the deviations. Because x̄ is by definition the value that minimizes the sum of squared deviations from the sample, using it instead of the unknown true population mean μ causes the sum of squared deviations to be systematically smaller than it would be if you knew μ. The sample clusters around its own mean more tightly than around the population mean.
The fix: Dividing by n−1 instead of n makes the sample variance slightly larger, which exactly compensates for this systematic underestimation. The result, s², is an unbiased estimator of σ² — meaning that across many samples, the average of s² equals σ².
Why n−1 specifically? One degree of freedom is consumed by the constraint that the deviations must sum to zero once x̄ is known. With n deviations forced to sum to zero, only n−1 can vary freely. The remaining one is determined by the others.
Practical rule: Data from an entire population → divide by N. Data from a sample estimating a population → divide by n−1.
Dataset: {4, 7, 13, 16} (n = 4, Mean = 10)
Squared deviations: (4−10)² = 36, (7−10)² = 9, (13−10)² = 9, (16−10)² = 36
Sum of squared deviations: 36+9+9+36 = 90
Population variance (÷ N=4): 90/4 = 22.5
Sample variance (÷ n−1=3): 90/3 = 30
✓ The sample variance (30) is larger than the population variance (22.5). This difference is what Bessel's correction accounts for.
Variance for Grouped Data
xᵢ = class midpoint
fᵢ = class frequency
Step-Deviation Method for Grouped Data
When class widths are equal, this shortcut saves significant arithmetic. Define a coded variable uᵢ for each class:
A = assumed mean (choose a convenient midpoint)
h = class width
The Problem with Squared Units
Variance is expressed in squared units. If your data is in metres, variance is in metres². A variance of 9 m² does not mean "9 metres of spread" — it means the squared average deviation is 9 m². This is why the standard deviation, which takes the square root and restores the original units, is what gets reported in most practical contexts. Variance remains essential inside formulas for ANOVA, regression, and related methods — see ANOVA.
Properties of Variance
- Non-negative: σ² ≥ 0 always. If σ² = 0, every value in the dataset is identical.
- Adding a constant: Var(X + c) = Var(X). Shifting all values by the same amount does not change variance.
- Multiplying by a constant: Var(cX) = c² × Var(X). Scaling by c multiplies variance by c².
- Independent samples: Var(X + Y) = Var(X) + Var(Y) when X and Y are independent.
When Variance > SD and When SD > Variance
This is false. If σ² = 4 → σ = 2 (SD < variance). If σ² = 0.25 → σ = 0.5 (SD > variance). If σ² = 1 → σ = 1 (equal). The relationship depends entirely on the scale of the data, not on any mathematical rule.
Standard Deviation — Definition, Formula, and Examples
Standard deviation is the positive square root of variance. It restores the measure of dispersion to the original units of the data, making it directly interpretable. It is the most widely used measure of spread for continuous, approximately symmetric data. For a standalone treatment, see the standard deviation page.
Population Standard Deviation
Sample Standard Deviation
Step-by-Step Calculation (6 Steps)
Dataset: {12, 14, 15, 16, 18, 19, 20, 22}
Find the mean: (12+14+15+16+18+19+20+22)/8 = 136/8 = 17
Deviations from mean (xᵢ − 17): −5, −3, −2, −1, +1, +2, +3, +5
Squared deviations: 25, 9, 4, 1, 1, 4, 9, 25
Sum of squared deviations: 25+9+4+1+1+4+9+25 = 78
Sample variance: s² = 78 / (8−1) = 78/7 ≈ 11.14
Sample SD: s = √11.14 ≈ 3.34
✓ s ≈ 3.34. This means individual values in the dataset typically deviate about 3.34 units from the mean of 17.
Standard Deviation for Grouped Data
uᵢ = (xᵢ − A) / h
A = assumed mean
h = class width
Standard Deviation and the Empirical Rule
For data that follows a normal distribution, the empirical rule tells you exactly how much of the data falls within each band of standard deviations:
| Distance from Mean | % of Data Covered (Normal Distribution) |
|---|---|
| μ ± 1σ | 68.27% |
| μ ± 2σ | 95.45% |
| μ ± 3σ | 99.73% |
Standard Deviation vs. Standard Error — Full Comparison
Confusing these two is one of the most common errors in published research. They answer different questions entirely.
| Standard Deviation (SD) | Standard Error (SEM) | |
|---|---|---|
| What it measures | Spread of individual data values | Precision of the sample mean |
| Formula | s = √[Σ(x−x̄)²/(n−1)] | SEM = s / √n |
| Effect of larger n | Relatively stable | Decreases (more precise) |
| When to report | Describing spread in the data | Constructing confidence intervals |
| Common misuse | Using SEM to appear less variable | Treating as a data descriptor |
See standard deviation vs. standard error and the standard error page for further detail.
Properties of Standard Deviation
- Always ≥ 0; equals zero only when all values are identical.
- Uses every data point in its calculation.
- Same units as the original data (unlike variance).
- Adding a constant c to every value leaves σ unchanged.
- Multiplying every value by a constant c multiplies σ by |c|.
- It is not an unbiased estimator of σ (unlike s² for σ²), though the bias is negligible for large n.
Advantages and Disadvantages of Standard Deviation
| Advantages | Disadvantages |
|---|---|
| Uses all data values | Sensitive to outliers (squaring amplifies them) |
| Same units as data | Less appropriate for skewed distributions |
| Foundation for t-tests, ANOVA, regression | More complex to compute than range or IQR |
| Can be combined across groups (pooled SD) | Requires interval or ratio-level data |
Coefficient of Variation (CV)
The coefficient of variation is the only dispersion measure that is truly dimensionless. By expressing standard deviation as a percentage of the mean, it lets you compare variability across datasets that have different units or very different means — something no absolute measure can do. See the standalone coefficient of variation page for worked examples.
Comparing wage consistency across two factories
Factory A: Mean wage = ₹400, SD = ₹40 → CV = (40/400) × 100 = 10%
Factory B: Mean wage = ₹500, SD = ₹75 → CV = (75/500) × 100 = 15%
✓ Factory B has both higher mean wages and higher absolute SD — but its wages are more variable relative to the mean. Factory A (CV = 10%) has a more uniform pay structure. Without CV, this comparison would be impossible because the means differ.
When to Use CV
- Comparing variability of datasets with different units (e.g., heights in cm vs. weights in kg)
- Comparing datasets with very different means (e.g., salaries in two countries)
- Investment analysis: comparing risk per unit of return across assets
When NOT to Use CV
- When the mean is zero or near-zero (CV becomes infinite or meaningless)
- When data is on an interval scale without a true zero (e.g., temperature in Celsius — a 0°C mean does not mean "no temperature")
- When data contains negative values
CV is only meaningful when the data has a true zero point. Celsius temperature, arbitrary index scores, and similar interval-scale data should not have a CV calculated on them.
All Formulas at a Glance
The tables below consolidate every formula covered on this page for quick reference.
Absolute Measures
| Measure | Ungrouped Formula | Grouped Formula | Units |
|---|---|---|---|
| Range | Xmax − Xmin | Upper − Lower class boundary | Same as data |
| IQR | Q3 − Q1 | Q3 − Q1 | Same as data |
| Quartile Deviation | (Q3 − Q1) / 2 | (Q3 − Q1) / 2 | Same as data |
| Mean Deviation (mean) | Σ|xᵢ − x̄| / n | Σfᵢ|xᵢ − x̄| / Σfᵢ | Same as data |
| Mean Deviation (median) | Σ|xᵢ − Med| / n | Σfᵢ|xᵢ − Med| / Σfᵢ | Same as data |
| Population Variance | Σ(xᵢ − μ)² / N | Σfᵢ(xᵢ − μ)² / N | Data² |
| Sample Variance | Σ(xᵢ − x̄)² / (n−1) | Σfᵢ(xᵢ − x̄)² / (Σfᵢ−1) | Data² |
| Population SD | √(σ²) | √(σ²) | Same as data |
| Sample SD | √(s²) | √(s²) | Same as data |
Relative Measures
| Measure | Formula | Primary Use |
|---|---|---|
| Coefficient of Range | (Xmax − Xmin) / (Xmax + Xmin) | Compare range across datasets |
| Coefficient of QD | (Q3 − Q1) / (Q3 + Q1) | Compare IQR-based spread |
| Coefficient of MD | M.D. / Mean (or Median) | Compare mean deviation |
| Coefficient of Variation | (SD / Mean) × 100% | Cross-dataset comparison — most important |
Complete Grouped Data Example
This section works through one frequency distribution and calculates Range, Mean Deviation, Variance, and Standard Deviation using both the direct method and the step-deviation method. Each formula produces an estimate because individual values are collapsed into class intervals.
Frequency Distribution
| Class Interval | Frequency (f) | Midpoint (x) | fx | |x − x̄| | f|x − x̄| | (x − x̄)² | f(x − x̄)² |
|---|---|---|---|---|---|---|---|
| 10–20 | 5 | 15 | 75 | 19 | 95 | 361 | 1805 |
| 20–30 | 8 | 25 | 200 | 9 | 72 | 81 | 648 |
| 30–40 | 12 | 35 | 420 | 1 | 12 | 1 | 12 |
| 40–50 | 9 | 45 | 405 | 11 | 99 | 121 | 1089 |
| 50–60 | 6 | 55 | 330 | 21 | 126 | 441 | 2646 |
| Total | 40 | — | 1430 | — | 404 | — | 6200 |
Range = 60 − 10 = 50
Mean (x̄) = Σfx / Σf = 1430 / 40 = 34
Mean Deviation = Σf|x − x̄| / Σf = 404 / 40 = 10.1
Variance (Direct) = Σf(x − x̄)² / Σf = 6200 / 40 = 155
Standard Deviation = √155 ≈ 12.45
Step-Deviation Method (A = 35, h = 10)
| Class | f | x | u = (x−35)/10 | fu | fu² |
|---|---|---|---|---|---|
| 10–20 | 5 | 15 | −2 | −10 | 20 |
| 20–30 | 8 | 25 | −1 | −8 | 8 |
| 30–40 | 12 | 35 | 0 | 0 | 0 |
| 40–50 | 9 | 45 | 1 | 9 | 9 |
| 50–60 | 6 | 55 | 2 | 12 | 24 |
| Total | 40 | — | — | 3 | 61 |
x̄ = A + h(Σfu/Σf) = 35 + 10(3/40) = 35 + 0.75 = 35.75 — note: small rounding difference from grouped mean of 34 due to interval assumptions
σ = h × √[(Σfu²/Σf) − (Σfu/Σf)²] = 10 × √[(61/40) − (3/40)²] = 10 × √[1.525 − 0.005625] = 10 × √1.5194 ≈ 10 × 1.233 ≈ 12.33
✓ Both methods give approximately the same SD (≈12.33–12.45), confirming the calculation. Minor differences arise from rounding during the mean computation in the direct method.
Chebyshev's Theorem — Dispersion Without Assuming Normality
The empirical rule (68–95–99.7) applies only to normal distributions. For data that is skewed, heavy-tailed, or simply unknown in shape, Chebyshev's theorem provides a guaranteed minimum bound that holds for any distribution with a finite mean and variance.
k = number of standard deviations from the mean (k > 1)
| k (Std. Devs.) | Normal Distribution (Empirical Rule) | Any Distribution (Chebyshev) |
|---|---|---|
| k = 1 | 68.27% | No guarantee |
| k = 2 | 95.45% | At least 75% |
| k = 3 | 99.73% | At least 88.9% |
| k = 4 | 99.99% | At least 93.75% |
If you know your data is not normally distributed, use Chebyshev's bounds to make conservative probability statements without assuming any specific distribution shape. Try the Chebyshev's Theorem calculator to apply these bounds to your own data.
Which Measure of Dispersion Should You Use?
The right choice depends on three things: the type of data, whether the distribution is symmetric or skewed, and whether outliers are present. This table handles all three simultaneously.
| Data Type | Distribution | Outliers? | Best Measure | Why |
|---|---|---|---|---|
| Ordinal | Any | Any | IQR or Range | SD requires interval/ratio data |
| Nominal | Any | Any | None meaningful | Dispersion is not applicable |
| Interval/Ratio | Symmetric, no outliers | No | Standard Deviation | Uses all data; algebraically tractable |
| Interval/Ratio | Skewed | Yes | IQR | Robust to extreme values |
| Interval/Ratio | Any | Extreme | IQR or MAD | Most resistant to outlier influence |
| Different units or means | Any | Any | Coefficient of Variation | Only unit-free comparison |
| Quick overview | Any | Unknown | Range | Instant, but limited |
The Key Rule: SD vs. IQR
SD + Mean → symmetric data, normal distribution, no serious outliers. Both are sensitive to all values, so they share the same conditions.
IQR + Median → skewed data, heavy-tailed distributions, when outliers are present. Both are robust to extremes, so they belong together.
When All Measures Disagree
When range, IQR, and SD paint different pictures, graph your data first. A large range combined with a small IQR tells you outliers are the story — report IQR as primary. When SD is noticeably larger than IQR/1.35, the data is right-skewed and IQR should lead. When SD ≈ IQR/1.35, the distribution is approximately normal and either measure is valid. See the histogram and skewness and kurtosis pages for visual diagnostic tools.
How Outliers Affect Each Measure
| Measure | Sensitivity to Outliers | Reason |
|---|---|---|
| Range | Extreme | Uses only max and min — one outlier completely redefines it |
| Variance | High | Squaring amplifies the effect of extreme values |
| Standard Deviation | High | Direct root of variance — same amplification |
| Mean Deviation | Moderate | Takes absolute value, not squares — linear in deviations |
| IQR | Low | Uses only Q1 and Q3 — the tails are excluded |
| Quartile Deviation | Low | Derived from IQR — same robustness |
Dataset without outlier: {12, 14, 15, 16, 18, 19, 20}
Range = 20 − 12 = 8 | Q1 = 13, Q3 = 19.5, IQR = 6.5 | SD ≈ 2.87
Dataset with outlier: {12, 14, 15, 16, 18, 19, 20, 100}
Range = 100 − 12 = 88 (+1000% change) | Q1 = 13.25, Q3 = 19.75, IQR ≈ 6.5 (unchanged) | SD ≈ 28.3 (+886% change)
✓ A single outlier (100) increases the range by 1000% and the SD by nearly 900%, while the IQR stays almost identical. This is exactly why IQR is preferred when outliers may be present.
For a systematic approach to identifying and handling outliers, see the outliers page.
Calculating Measures of Dispersion in Python and Excel
Python
import numpy as np from scipy import stats import statistics data = [12, 14, 15, 16, 18, 19, 20, 22] # Range data_range = np.max(data) - np.min(data) print(f"Range: {data_range}") # 10 # IQR and Quartile Deviation q1 = np.percentile(data, 25) q3 = np.percentile(data, 75) iqr = q3 - q1 qd = iqr / 2 print(f"Q1={q1}, Q3={q3}, IQR={iqr}, QD={qd}") # Mean Absolute Deviation mean = np.mean(data) mad = np.mean(np.abs(data - mean)) print(f"Mean Absolute Deviation: {mad:.4f}") # Population Variance and SD (divides by n) pop_var = np.var(data) pop_sd = np.std(data) print(f"Population Variance: {pop_var:.4f}") print(f"Population SD: {pop_sd:.4f}") # Sample Variance and SD (Bessel's correction: ddof=1) samp_var = np.var(data, ddof=1) samp_sd = np.std(data, ddof=1) print(f"Sample Variance: {samp_var:.4f}") print(f"Sample SD: {samp_sd:.4f}") # statistics module (always uses n-1) print(f"statistics.variance: {statistics.variance(data):.4f}") print(f"statistics.stdev: {statistics.stdev(data):.4f}") # Coefficient of Variation cv = (samp_sd / mean) * 100 print(f"CV: {cv:.2f}%") # Standard Error of the Mean sem = samp_sd / np.sqrt(len(data)) print(f"Standard Error: {sem:.4f}")
np.var() and np.std() divide by n by default (population formulas). For sample calculations, always pass ddof=1. Forgetting this is the most common source of incorrect variance calculations in Python data science workflows.
Excel
| Measure | Excel Function | Notes |
|---|---|---|
| Range | =MAX(A1:A10) - MIN(A1:A10) | No built-in RANGE function |
| Q1 | =QUARTILE.INC(A1:A10, 1) | INC uses inclusive interpolation |
| Q3 | =QUARTILE.INC(A1:A10, 3) | |
| IQR | =QUARTILE.INC(A1:A10,3)-QUARTILE.INC(A1:A10,1) | No built-in IQR function |
| Mean Absolute Deviation | =AVEDEV(A1:A10) | Built-in function |
| Population Variance | =VAR.P(A1:A10) | Divides by N |
| Sample Variance | =VAR.S(A1:A10) | Divides by n−1 |
| Population SD | =STDEV.P(A1:A10) | Divides by N |
| Sample SD | =STDEV.S(A1:A10) | Divides by n−1 — use this by default |
| Coefficient of Variation | =STDEV.S(A1:A10)/AVERAGE(A1:A10)*100 | Result is a percentage |
| Standard Error | =STDEV.S(A1:A10)/SQRT(COUNT(A1:A10)) |
For more on statistical computing, see standard deviation vs. variance for a deeper comparison, or use the descriptive statistics calculator for an all-in-one tool.
Central Tendency and Dispersion — You Always Need Both
| Central Tendency | Dispersion | |
|---|---|---|
| What it tells you | Where data centers | How far data spreads from the center |
| Main measures | Mean, Median, Mode | Range, IQR, SD, Variance, CV |
| What it misses | The spread of values | The center of values |
| Together | A complete description of a distribution | |
The natural pairings reflect shared assumptions about scale and robustness:
| Central Tendency Measure | Best Paired With | Why |
|---|---|---|
| Mean | Standard Deviation | Both use all values; both optimal for symmetric data |
| Median | IQR | Both resistant to outliers; both optimal for skewed data |
| Mode | Frequency / relative frequency | Mode used for categorical; spread expressed as frequencies |
Measures of Dispersion in Real Life
Finance & Investment Risk
Standard deviation is the standard measure of investment risk. Higher SD means more return variability. The coefficient of variation compares risk per unit of return across assets with different average returns.
Manufacturing Quality Control
Statistical Process Control uses SD to set control limits at Mean ± 3σ. Six Sigma defines quality as processes running within ±6σ from the target — measuring defect rates through dispersion.
Healthcare & Clinical Research
IQR is standard for clinical outcomes that are not normally distributed — lab values, survival times, ordinal patient-reported scales. SD is reported when outcomes are approximately normal.
Education & Test Analysis
SD tells educators how consistent student performance is. Low SD across an exam means students performed similarly; high SD signals significant variation in preparation. Z-scores use both mean and SD.
Meteorology
SD of daily temperatures measures climate consistency. Two cities with the same average temperature but different SDs have entirely different climates — think San Francisco vs. Denver.
Sports Analytics
IQR of player performance statistics resists the influence of outlier game performances that can distort SD. CV compares scoring consistency across sports with different average scoring volumes.
Common Mistakes and Misconceptions
The single most common error. Always use n−1 (Bessel's correction) when working with a sample. In Python, always pass ddof=1 to np.var() and np.std().
SD describes data spread; SEM = s/√n describes the precision of the mean estimate. These are not interchangeable. Using SEM to describe data makes the data look less variable than it is.
False. When variance < 1, SD > variance. The relationship depends entirely on the scale of measurement, not on any mathematical ordering rule.
Range is only a rough first indicator. One extreme value completely redefines it. Always follow up with IQR or SD for any substantive analysis.
SD assumes symmetric distribution for meaningful interpretation. For skewed data (income, reaction times, clinical biomarkers), report IQR and pair it with the median.
When the mean approaches zero, CV approaches infinity and loses all interpretive meaning. Never calculate CV for data centered near zero or for interval-scale data without a true zero.
In grouped data calculations, each class is represented by its midpoint — (lower + upper) / 2. Using class limits directly gives incorrect results for mean, MD, variance, and SD.
The empirical rule applies only to normal distributions. For data of unknown or non-normal shape, use Chebyshev's theorem, which makes no distributional assumption.
If height is in cm, variance is in cm². Saying "variance = 25 cm" is a unit error. Variance is always in squared units of the original measurement.
Low SD means data is tightly clustered around the mean. It says nothing about the shape of the distribution. A bimodal dataset can have a small SD.
Mean deviation is minimized when calculated about the median, not the mean. The mean minimizes the sum of squared deviations (variance), not the sum of absolute deviations.
IQR = Q3 − Q1. The full interquartile span from 25th to 75th percentile. Half the IQR is the quartile deviation (semi-IQR), not the IQR itself.
If you collected data from a subset of a population to estimate population parameters, always use n−1. Using N when you have a sample produces a biased (too-small) variance estimate.
Frequently Asked Questions
Measures of dispersion describe how far apart data values are from each other and from the center of a distribution. The most common measures are the range, IQR, mean deviation, variance, standard deviation, and coefficient of variation. Together with measures of central tendency, they give a complete picture of any dataset.
Dispersion measures split into two types. Absolute measures — range, IQR, quartile deviation, mean deviation, variance, standard deviation — are in the same units as the raw data. Relative measures — coefficient of range, coefficient of QD, coefficient of MD, coefficient of variation — are dimensionless ratios used to compare datasets with different units or different means.
The range is the difference between the maximum and minimum values in a dataset: Range = Xmax − Xmin. It is the simplest measure of spread, calculated from just two values. Its main weakness is extreme sensitivity to outliers — a single unusual value can completely change it.
The IQR is the difference between the third quartile (Q3, 75th percentile) and the first quartile (Q1, 25th percentile): IQR = Q3 − Q1. It measures the spread of the middle 50% of the data and is robust to outliers because it ignores both tails of the distribution.
Variance is the average of the squared deviations from the mean. Population variance: σ² = Σ(xᵢ − μ)²/N. Sample variance: s² = Σ(xᵢ − x̄)²/(n−1). Because deviations are squared, variance is in squared units — a variance of 25 cm² for height data means the squared average deviation is 25 cm², not 25 cm. Taking the square root gives the standard deviation.
Standard deviation is the positive square root of variance. It returns the measure to the original units of the data, making it directly interpretable. For a sample: s = √[Σ(xᵢ − x̄)²/(n−1)]. It is the most widely used dispersion measure for symmetric, continuous data without serious outliers.
Dividing by n−1 (Bessel's correction) compensates for a systematic bias. Because the sample mean x̄ is computed from the same data as the deviations, the sum of squared deviations around x̄ is always smaller than it would be around the true (unknown) population mean μ. Dividing by n−1 instead of n makes the result larger, exactly offsetting this underestimation, so that s² is an unbiased estimator of σ². One degree of freedom is lost because the n deviations must sum to zero once x̄ is known.
Bessel's correction is the practice of dividing by n−1 rather than n when computing sample variance or sample standard deviation. It corrects for the fact that calculating deviations around the sample mean (rather than the unknown population mean) systematically underestimates the true spread of the population. The correction makes s² an unbiased estimator of σ².
Population SD (σ) divides by N and is used when you have data on every member of the population. Sample SD (s) divides by n−1 and is used when you have a subset of the population and want to estimate the population parameter. In practice, most real-world data is a sample, so n−1 is appropriate. In Python, np.std(data, ddof=1) gives sample SD; np.std(data) gives population SD.
A high standard deviation means individual data points are spread widely around the mean — the dataset shows high variability. In finance this represents high risk; in manufacturing it means the process is inconsistent; in education it signals that students performed very differently from one another. "High" is always relative to the scale of the data.
No. Standard deviation is the positive square root of variance, and variance is a sum of squared terms (all non-negative), so it is always ≥ 0. SD = 0 only when all values in the dataset are identical. Negative SD is mathematically impossible.
Yes — it depends entirely on the scale of the data. If σ² = 4, then σ = 2 (variance > SD). If σ² = 0.25, then σ = 0.5 (SD > variance). If σ² = 1, both are equal. There is no universal ordering between variance and standard deviation.
Standard deviation (SD) measures the spread of individual data values around the sample mean — it describes variability in the data. Standard error of the mean (SEM = s/√n) measures how accurately the sample mean estimates the population mean — it describes precision of the mean estimate. SEM decreases as sample size grows; SD does not. Reporting SEM instead of SD makes data appear less variable, which is a common error in published research.
Use IQR when data is skewed (income, house prices, survival times), when outliers are present and should not dominate the analysis, when data is measured on an ordinal scale, or when reporting alongside the median. Standard deviation works best for symmetric distributions on an interval or ratio scale without serious outliers. IQR and median form a natural pair; SD and mean form another.
CV = (SD / Mean) × 100%. It is a dimensionless ratio expressing variability relative to the mean. Use it when comparing two datasets with different units (e.g., comparing height variability in cm with weight variability in kg) or when datasets have very different means. Do not use CV when the mean is near zero or when data is on an interval scale without a true zero point.
Chebyshev's theorem states that for any distribution with finite mean and variance, at least 1 − 1/k² of values fall within k standard deviations of the mean (for any k > 1). For example, at least 75% of values fall within 2 SD of the mean, and at least 88.9% within 3 SD. Unlike the empirical rule, this holds for any distribution shape — not just normal distributions.
The IQR (interquartile range) and quartile deviation are the most resistant to outliers because they use only the middle 50% of data — Q1 and Q3. Extreme values in the tails do not affect these measures. Mean absolute deviation has moderate resistance. Standard deviation and variance are sensitive to outliers because squaring amplifies extreme deviations. The range is the most sensitive of all, since a single extreme value redefines it completely.
Adding (or subtracting) a constant c to every value in a dataset does not change the standard deviation. SD measures spread relative to the mean, and shifting all values by the same amount shifts the mean by the same amount, leaving all deviations unchanged. Formally: σ(X + c) = σ(X). Variance is similarly unchanged.
Multiplying every value by a constant c multiplies the standard deviation by |c|. Formally: σ(cX) = |c| × σ(X). This makes sense because multiplying data by c stretches all deviations by the same factor c. Variance is multiplied by c² because σ² scales as the square of c.
For grouped data, use class midpoints as representative values. First calculate the weighted mean: x̄ = Σfᵢxᵢ / Σfᵢ. Then apply: σ² = Σfᵢ(xᵢ − x̄)² / Σfᵢ. The step-deviation method simplifies this when class widths are equal: compute uᵢ = (xᵢ − A)/h for each class, then σ² = h² × [(Σfᵢuᵢ²/Σfᵢ) − (Σfᵢuᵢ/Σfᵢ)²]. Both methods give the same result. See the complete worked example in the Grouped Data section above.
Mean absolute deviation (MAD) is the average of the absolute differences between each data point and the mean: MAD = Σ|xᵢ − x̄| / n. Like SD, it measures spread in the original units. SD uses squared deviations instead, which amplifies the effect of outliers but gives SD superior mathematical properties — differentiability, additivity across independent groups, and direct connections to variance used in t-tests, ANOVA, and regression. MAD is more intuitive and more robust to outliers; SD is more useful for further statistical analysis.
Standard deviation is the natural partner to the mean. Both use all data values in their calculation, both are sensitive to outliers in the same way, and both are optimal for symmetric, approximately normal distributions. When you report the mean, report SD alongside it.
The IQR (interquartile range) is the natural partner to the median. Both are resistant to outliers, both describe the middle of the distribution, and both are appropriate for skewed data. When you report the median, report IQR alongside it.
Excel has no built-in IQR function. Calculate it as: =QUARTILE.INC(A1:A10,3) - QUARTILE.INC(A1:A10,1). QUARTILE.INC uses inclusive interpolation between the actual data values. Alternatively, use the online IQR calculator.
Using NumPy: cv = (np.std(data, ddof=1) / np.mean(data)) * 100. Always use ddof=1 for the sample standard deviation. SciPy also provides scipy.stats.variation(data) which returns the ratio (without multiplying by 100).
The step-deviation method simplifies variance and SD calculations for grouped data when class widths are equal. Instead of computing deviations from the actual mean, you define coded values uᵢ = (xᵢ − A)/h, where A is a convenient assumed mean and h is the class width. The formulas are: σ² = h² × [(Σfᵢuᵢ²/Σfᵢ) − (Σfᵢuᵢ/Σfᵢ)²] and σ = h × √[(Σfᵢuᵢ²/Σfᵢ) − (Σfᵢuᵢ/Σfᵢ)²]. The coded values are small integers (−2, −1, 0, 1, 2...), making the arithmetic far easier than the direct method.
Key Takeaways
Two datasets can have identical means but completely different spreads — dispersion measures are needed to tell the full story.
Range is simplest but uses only two values and is highly sensitive to outliers. Use for a quick first look only.
IQR (Q3 − Q1) measures the spread of the middle 50% of data and is resistant to outliers. Pair it with the median.
Mean deviation averages absolute deviations; minimized when calculated about the median. Intuitive but algebraically limited.
Variance averages squared deviations. Uses all values. Expressed in squared units — hard to interpret directly.
Standard deviation is the square root of variance. Same units as data. Most widely used measure for symmetric, continuous data.
Sample variance divides by n−1 (Bessel's correction) to give an unbiased estimate of population variance.
Coefficient of Variation (SD/Mean × 100%) is the only unit-free measure. Use it to compare datasets with different units or scales.
Symmetric data without outliers → use SD + Mean. Skewed data or outliers present → use IQR + Median.
Variance can exceed SD (when variance > 1) or be less than it (when variance < 1). There is no fixed ordering between them.
SD ≠ standard error. SD describes data spread; SEM = s/√n describes precision of the sample mean.
Chebyshev's theorem guarantees ≥75% of values fall within 2 SD of the mean for any distribution — use it when data is not normal.
For grouped data, use class midpoints as representative values. All grouped formulas produce estimates, not exact values.
The step-deviation method simplifies grouped data SD when class widths are equal — small coded values replace large raw deviations.