Basic statistics: mean, median, standard deviation
Mean, median, mode, standard deviation: the basic statistical indicators for summarising a dataset, with their formulas.
Mean, median, mode
| Indicator | Definition | Sensitive to outliers? |
|---|---|---|
| Mean | Sum of values ÷ number of values | Yes, strongly |
| Median | The middle value once data is sorted | No |
| Mode | The most frequent value | No |
Mean = (x₁ + x₂ + ... + xₙ) / n
When a distribution has outliers (e.g. a company's salaries with a very highly paid CEO), the median often gives a more representative picture than the mean.
Standard deviation and variance
Variance = the average of the squared deviations from the mean Standard deviation = √variance
Standard deviation measures how spread out the data is around the mean: the lower it is, the more clustered the values; the higher it is, the more spread out.
Worked example
For the grades 10, 12, 14, 16, 18 (mean = 14):
Deviations from the mean: -4, -2, 0, +2, +4 Squared deviations: 16, 4, 0, 4, 16 Variance = (16+4+0+4+16) / 5 = 8 Standard deviation = √8 ≈ 2.83
Quartiles
Quartiles split sorted data into 4 equal parts: Q1 (25%), Q2 = median (50%), Q3 (75%). The interquartile range (Q3 − Q1) is a spread measure less sensitive to outliers than standard deviation.
Population vs. sample
| Whole population | Sample | |
|---|---|---|
| Mean symbol | μ (mu) | x̄ (x-bar) |
| Standard deviation symbol | σ (sigma) | s |
| Variance divisor | n | n − 1 |
Dividing by (n − 1) instead of n for a sample (Bessel's correction) compensates for a sample slightly underestimating the true variance of the population it's drawn from.
Correlation: a classic trap
A correlation coefficient close to 1 or −1 means two variables move together, but correlation doesn't imply causation: two phenomena can vary together without one causing the other (a hidden third variable may explain both, or the relationship may be pure coincidence on a limited sample).
The normal distribution: the 68-95-99.7 rule
For a normal (bell-curve) distribution:
- 68% of values fall within ±1 standard deviation of the mean
- 95% within ±2 standard deviations
- 99.7% within ±3 standard deviations
Thanks for the feedback!