Table of Contents14 sections
Measures of Center: Mean vs. Median vs. Mode
Before comparing datasets or making predictions, we summarize a distribution with two questions: Where is the center? and How spread out are the values?
The three standard measures of center are:
- Arithmetic Mean ( or ): The sum of all observations divided by the count —physically, the “balance point” of the data:
- Median: The middle value when observations are sorted from smallest to largest (for an even count , the average of the two middle values).
- Mode: The most frequently occurring value(s) in the dataset (especially useful for categorical data).
Why Outliers Break the Mean
Suppose five employees earn $50k, $52k, $54k, $55k, and $59k. Their mean is $54k and their median is $54k.
Now replace the fifth salary with an executive salary of $500k:
- The mean skyrockets to $142.2k—higher than out of people in the room!
- The median remains $54k, accurately reflecting the typical employee.
Rule of thumb: Use the mean for symmetric distributions without extreme outliers; use the median for skewed data (income, housing prices, response latencies).
Measuring Spread: Variance and Standard Deviation
Two datasets can share the exact same mean () yet behave completely differently:
- Dataset A: (tightly clustered)
- Dataset B: (widely dispersed)
If we simply average the deviations , positive and negative deviations always cancel to zero! To prevent cancellation and measure typical distance from the mean, we square each deviation, average them to get Variance (), and take the square root to return to the original units, giving Standard Deviation ():
Population () vs. Sample () — Bessel’s Correction
When you have data for an entire population of size , divide by . When you have only a random sample of size and are using the sample mean to estimate the unknown population spread, divide by :
Why ? Because sample points are always slightly closer to their own sample mean than to the true population mean . Dividing by (Bessel’s correction) removes that downward bias so is an unbiased estimator of .
The Empirical Rule & Z-Scores
For roughly bell-shaped (normal) distributions, the standard deviation acts as a universal ruler:
- of all observations lie within .
- of all observations lie within .
- of all observations lie within .
Empirical Rule for normal distributions: ~68% of data lies within μ ± 1σ and ~95% within μ ± 2σ.
Standardizing with Z-Scores
A z-score converts any measurement into standard-deviation units from the mean:
This lets you compare scores across completely different scales (e.g., comparing an SAT score to an ACT score).
Progressive Worked Examples
Example 1 (Foundational): Full Variance & Standard Deviation Calculation
Compute the population mean, variance, and standard deviation of :
- Mean:
- Squared deviations :
- , , ,
- , , ,
- Population Variance ():
- Population Standard Deviation ():
Example 2 (Intermediate): Sample Standard Deviation ()
A quality-control engineer samples bolts with lengths (in mm): .
- Sample mean: .
- Sum of squared deviations:
- Sample variance (divide by ): .
- Sample standard deviation: .
Example 3 (Applied): Comparing Scores with Z-Scores
Alice scored on a physics exam () and on a chemistry exam (). Which score is stronger relative to her classmates?
- Physics: ( standard deviations above the mean).
- Chemistry: ( standard deviations above the mean).
Even though , Alice performed significantly better relative to the class in Physics ().
Analyze any dataset with an automatic diagram in the Statistics Summary Calculator.
Why It Matters
Standard deviation and variance power A/B testing, financial risk modeling (volatility), Six Sigma manufacturing tolerances, and data normalization in machine learning.
Common Misconceptions
- Forgetting to square deviations: Summing without squaring always gives .
- Confusing variance units with original units: If data is in dollars, is in dollars, while variance is in .
- Using on heavily skewed data: When data has extreme outliers, pair the median with the Interquartile Range (IQR) instead of mean + standard deviation.
Quick Summary
- Mean = balance point; Median = middle value (outlier-resistant).
- Variance = average squared deviation; Standard Deviation = (back in original units).
- Divide by for populations and for samples.
Practice Problems
1. Find the mean, median, and range of 18.
Answer: Mean = 17, Median = 18, Range = 10
Sorted: 22. Sum = 85 → Mean = 85/5 = 17. Middle value = 18. Range = 22 - 12 = 10.
2. Compute the population standard deviation of 8.
Answer: √5 ≈ 2.236
Mean = 5. Squared deviations: 9 + 1 + 1 + 9 = 20. Variance = 20 / 4 = 5. σ = √5 ≈ 2.236.
3. A test has μ = 100 and σ = 15. What score corresponds to z = -1.6?
Answer: 76
x = μ + z·σ = 100 + (-1.6)(15) = 100 - 24 = 76.
Frequently Asked Questions
When should I use the median instead of the mean?
Use the median whenever the dataset is skewed or has extreme outliers (such as household income or home prices), because the median is resistant to outliers.
Why does sample standard deviation divide by n - 1 instead of n?
Dividing by n - 1 (Bessel's correction) corrects for the slight downward bias that occurs when estimating population spread using the sample mean x̄ instead of the true population mean μ.
Can standard deviation ever be negative?
No. Because deviations are squared before averaging and taking the principal square root, σ ≥ 0 always. It equals 0 only when every value in the dataset is identical.
What is a z-score?
A z-score z = (x - μ) / σ measures how many standard deviations a data point x lies above or below the mean μ.