Skip to content
10 min read

Statistics Basics: Mean, Median, Mode, and Measures of Spread

Statistics is the branch of mathematics that deals with collecting, organising, analysing, and interpreting data. Whether you are a student working through a textbook, a data analyst examining survey results, or a researcher testing hypotheses, a solid grasp of the basics is essential. This guide covers the fundamental measures of central tendency and spread that form the backbone of statistical analysis.

Measures of Central Tendency

Central tendency measures tell you where the "centre" of a dataset lies. The three most common are the mean, median, and mode.

The Mean (Average)

The arithmetic mean is the sum of all values divided by the number of values:

xˉ=1n∑i=1nxi=x1+x2+⋯+xnn\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i = \frac{x_1 + x_2 + \cdots + x_n}{n}

Example: For the dataset {4,7,9,12,18}\{4, 7, 9, 12, 18\}:

xˉ=4+7+9+12+185=505=10\bar{x} = \frac{4 + 7 + 9 + 12 + 18}{5} = \frac{50}{5} = 10

The mean is sensitive to extreme values (outliers). A single very large or very small value can pull the mean significantly in its direction.

The Median

The median is the middle value when the data is sorted in order. If there is an even number of values, the median is the mean of the two middle values.

Odd count example: For {3,5,7,11,15}\{3, 5, 7, 11, 15\}, the median is 77 (the third value out of five).

Even count example: For {2,4,6,8}\{2, 4, 6, 8\}:

Median=4+62=5\text{Median} = \frac{4 + 6}{2} = 5

The median is robust against outliers. For income data or house prices, the median is often more representative than the mean.

The Mode

The mode is the value that appears most frequently in a dataset. A dataset can have no mode (all values unique), one mode (unimodal), or multiple modes (bimodal, multimodal).

Example: For {2,3,3,5,7,7,7,9}\{2, 3, 3, 5, 7, 7, 7, 9\}, the mode is 77 (appears three times).

The mode is the only measure of central tendency that works with categorical (non-numeric) data. For example, the most popular colour chosen in a survey is the mode.

Measures of Spread

While central tendency tells you where the data is centred, measures of spread (or dispersion) tell you how spread out the values are.

Range

The simplest measure of spread:

Range=xmax⁡−xmin⁡\text{Range} = x_{\max} - x_{\min}

For {4,7,9,12,18}\{4, 7, 9, 12, 18\}, the range is 18−4=1418 - 4 = 14. The range is easy to calculate but is heavily influenced by outliers.

Variance

Variance measures the average squared deviation from the mean. There are two versions:

Population variance (when you have the entire population):

σ2=1N∑i=1N(xi−μ)2\sigma^2 = \frac{1}{N}\sum_{i=1}^{N}(x_i - \mu)^2

Sample variance (when you have a sample from a larger population):

s2=1n−1∑i=1n(xi−xˉ)2s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2

The n−1n - 1 in the sample formula is called Bessel's correction. It provides an unbiased estimate of the population variance.

Standard Deviation

Standard deviation is the square root of variance and is expressed in the same units as the original data:

σ=σ2s=s2\sigma = \sqrt{\sigma^2} \qquad s = \sqrt{s^2}

Full Worked Example

Dataset: {6,8,10,12,14}\{6, 8, 10, 12, 14\}

Step 1: Calculate the mean.

xˉ=6+8+10+12+145=505=10\bar{x} = \frac{6 + 8 + 10 + 12 + 14}{5} = \frac{50}{5} = 10

Step 2: Find each deviation from the mean.

(6−10),  (8−10),  (10−10),  (12−10),  (14−10)=−4,  −2,  0,  2,  4(6-10),\;(8-10),\;(10-10),\;(12-10),\;(14-10) = -4,\;-2,\;0,\;2,\;4

Step 3: Square each deviation.

16,  4,  0,  4,  1616,\;4,\;0,\;4,\;16

Step 4: Calculate the variance.

σ2=16+4+0+4+165=405=8(population)\sigma^2 = \frac{16 + 4 + 0 + 4 + 16}{5} = \frac{40}{5} = 8 \quad \text{(population)}
s2=404=10(sample)s^2 = \frac{40}{4} = 10 \quad \text{(sample)}

Step 5: Calculate the standard deviation.

σ=8≈2.83s=10≈3.16\sigma = \sqrt{8} \approx 2.83 \qquad s = \sqrt{10} \approx 3.16

Interquartile Range (IQR)

The IQR measures the spread of the middle 50% of the data:

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

Where Q1Q_1 is the first quartile (25th percentile) and Q3Q_3 is the third quartile (75th percentile). The IQR is useful for identifying outliers: any value below Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR} or above Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR} is typically considered an outlier.

When to Use Which Measure

  • Symmetric data with no outliers: Use the mean and standard deviation.
  • Skewed data or data with outliers: Use the median and IQR, as they are more robust.
  • Categorical data: Use the mode.
  • Comparing datasets with different scales: Use the coefficient of variation: CV=sxˉ×100%CV = \frac{s}{\bar{x}} \times 100\%.

Z-Scores: Standardising Data

A z-score tells you how many standard deviations a value is from the mean:

z=x−μσz = \frac{x - \mu}{\sigma}

A z-score of +2+2 means the value is two standard deviations above the mean. Z-scores are essential for comparing values from different distributions and for working with the normal distribution. Read more in our z-scores guide.

Common Mistakes

  1. Using the mean for skewed data. Income distributions are typically right-skewed. The mean salary will be higher than what most people earn. Use the median instead.
  2. Forgetting Bessel's correction. When working with a sample, divide by n−1n - 1, not nn.
  3. Confusing variance and standard deviation. Variance is in squared units. Standard deviation is in the original units and is generally easier to interpret.
  4. Ignoring context. A standard deviation of 5 means very different things for exam scores (out of 100) versus heights (in centimetres).

Try It Yourself

Use our free Standard Deviation Calculator to compute the mean, variance, and standard deviation for any dataset. For more advanced analysis, try the Mean, Median, Mode Calculator or explore z-scores with our Z-Score Calculator.

Related Articles