Descriptive Statistics Summarising Data with Numbers
Before you can infer anything about a population, you need to describe what you actually observed. Learn every measure of centre and spread, mean, median, mode, variance, standard deviation, IQR, skewness, and box plots, with worked examples, an interactive calculator, and a quiz.
Descriptive statistics is the art of condensing a dataset into a handful of numbers that capture the most important features: where the data is centred, how spread out it is, and what shape it takes. Before you run a single hypothesis test or fit a regression line, you need to understand your data: and that starts here.
Two datasets can have the same mean but completely different shapes. Two others might have the same mean and standard deviation but very different tails. The tools in this section let you distinguish between these cases rigorously and efficiently.
Population vs sample. The formulas differ slightly depending on whether you have the entire population (use N, μ, σ²) or just a sample (use n, x̄, s²). The sample formula divides by n−1 rather than n to give an unbiased estimate of the population variance.
§ 02
Measures of Centre — Mean, Median, Mode
A measure of centre tells you where the "middle" of the data sits. There are three main options, each with different strengths.
Sample Mean
x̄ = (x₁ + x₂ + … + xₙ) / n = (1/n) Σ xᵢ
The mean uses every data value and is algebraically tractable: it appears in almost every inferential formula. Its weakness is sensitivity to outliers: a single extreme value can pull the mean far from the bulk of the data.
The median is the middle value when data is sorted. For an odd count n, it is the value at position (n+1)/2. For an even count, it is the average of the two middle values. The median is resistant to outliers, it ignores extreme values entirely.
The mode is the most frequently occurring value. A dataset can have no mode (all values distinct), one mode (unimodal), or multiple modes (bimodal, multimodal). The mode is most useful for categorical data and for identifying peaks in a distribution.
When to use which. Use the mean when the data is roughly symmetric and has no severe outliers. Use the median for skewed distributions or when outliers are present (e.g., house prices, incomes). Use the mode for categorical data or to describe the most common value.
§ 03
Measures of Spread — Range, Variance, SD, IQR
Knowing where the centre is only half the story. Two datasets can have the same mean but very different variability. Measures of spread quantify how tightly packed or widely dispersed the data is.
Sample Variance and Standard Deviation
s² = Σ(xᵢ − x̄)² / (n−1)
s = √s²
Population versions: σ² = Σ(xᵢ − μ)² / N, σ = √σ²
Measure
Formula / Definition
Key Property
Range
max − min
Simplest. Highly sensitive to single outliers.
Variance (s²)
Σ(xᵢ−x̄)²/(n−1)
Average squared deviation. Units are squared.
Std Deviation (s)
√s²
Same units as data. Most commonly reported.
IQR
Q3 − Q1
Middle 50% of data. Resistant to outliers.
Coefficient of Variation
CV = s/x̄ × 100%
Relative spread. Allows comparison across different units.
The interquartile range (IQR) = Q3 − Q1 is the range of the middle 50% of the data. Like the median, it is resistant to outliers. The standard outlier detection rule flags a value as an outlier if it falls below Q1 − 1.5×IQR or above Q3 + 1.5×IQR.
§ 04
Interactive Descriptive Statistics Calculator
Descriptive Statistics Calculator
Enter a comma-separated list of numbers and click Calculate to see all key statistics instantly.
§ 05
Shape of a Distribution — Skewness
Two distributions can share the same mean and standard deviation but have completely different shapes. Skewness measures asymmetry.
A right-skewed (positively skewed) distribution has a long tail stretching to the right. The mean is pulled above the median by the high outliers. Income distributions are the classic example.
A left-skewed (negatively skewed) distribution has a long tail to the left. The mean falls below the median.
A symmetric distribution has mean ≈ median ≈ mode (exactly equal for a perfect normal distribution).
Skewness Direction Rule
Right skew: mean > median > mode
Symmetric: mean ≈ median ≈ mode
Left skew: mean < median < mode
Practical importance. Skewness determines which measure of centre to report. For right-skewed data (salaries, house prices), the median is a more representative "typical value" than the mean — a handful of billionaires in a dataset can make the mean salary look enormous while the median reflects what most people actually earn.
§ 06
Box Plots — The Five-Number Summary
A box plot (box-and-whisker plot) displays five key values simultaneously: the minimum, Q1 (25th percentile), median (Q2), Q3 (75th percentile), and maximum. Outliers beyond the whisker fences are plotted individually.
Five-Number Summary & Outlier Fences
Min, Q1, Median, Q3, Max
Box plots are especially powerful when comparing multiple groups side-by-side. They pack the location, spread, skewness (box position within whiskers), and outliers into a compact visual.
§ 07
10 Fully Worked Examples
Example 1 — Compute mean, median, modeEasy
Dataset: 3, 7, 7, 2, 9, 4, 7, 5, 1, 5
1
Sum = 3+7+7+2+9+4+7+5+1+5 = 50. Mean = 50/10 = 5.0.
2
Sorted: 1,2,3,4,5,5,7,7,7,9. n=10 (even). Median = (5+5)/2 = 5.0.
3
7 appears 3 times. Mode = 7.
Mean = 5.0, Median = 5.0, Mode = 7
Example 2 — Sample variance and SDEasy
Dataset: 2, 4, 4, 4, 5, 5, 7, 9. Compute s² and s.
1
x̄ = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5.
2
Deviations: −3,−1,−1,−1,0,0,2,4. Squared: 9,1,1,1,0,0,4,16. Sum = 32.
Combined mean = 76 (weighted toward the larger group)
Example 10 — Standardise to z-scoresHard
A student scored 78 on a test with x̄ = 70, s = 8. Another scored 82 on a different test with x̄ = 75, s = 10. Who performed better relative to their class?
1
Student 1: z = (78−70)/8 = 8/8 = 1.00.
2
Student 2: z = (82−75)/10 = 7/10 = 0.70.
3
Student 1 is 1.00 SD above their class mean; Student 2 is only 0.70 SD above.
Student 1 performed better relative to their class (higher z-score).
§ 08
Common Mistakes
Mistake 1 — Dividing by n instead of n−1. The sample variance formula uses n−1 (degrees of freedom). Dividing by n underestimates the population variance and is only correct for the population formula.
Mistake 2 — Confusing standard deviation with standard error. Standard deviation (s) measures spread within your dataset. Standard error (s/√n) measures how much the sample mean varies across samples — it shrinks as n increases.
Mistake 3 — Using the mean for skewed data. For right- or left-skewed distributions, the median is a better measure of centre. Always check skewness before deciding which measure to report.
Mistake 4 — Forgetting to sort before computing quartiles. Q1 and Q3 are based on the ordered dataset. Computing them from unsorted data gives wrong results.
Mistake 5 — Treating IQR as the range of 50% of the data. The IQR is the width of the interval containing the middle 50%, but it is not the same as listing 50% of the data values.