All courses › Statistics and Risk Analysis › Mean, median and standard deviation

Mean, median and standard deviation

The mean is the sum divided by the count, while the median is the middle value in sorted order, and is less sensitive to extreme values. The sample variance s2s^2 uses n−1n-1 in the denominator, and the standard deviation ss is the square root of the variance — it has the same unit as the data.

xˉ=1n∑ixi\bar x = \frac{1}{n}\sum_i x_imean
s2=1n−1∑i(xi−xˉ)2s^2 = \frac{1}{n-1}\sum_i (x_i - \bar x)^2sample variance
s=s2s = \sqrt{s^2}sample standard deviation

Symbols

xˉ\bar xmean of the sample
nnnumber of observations
sssample standard deviation

Example

Data: 2, 4, 4, 4, 5, 5, 7, 9. Sum =40= 40, xˉ=40/8=5\bar x = 40/8 = 5.

The median of the same data (sorted, 8 values) is the average of the two middle values: 4.54.5.

Use n−1n-1 (not nn) in the sample variance — it gives an unbiased estimate of the population variance.
Practise distributions for free →

← Poisson and exponential distribution · Hypothesis testing and p-value →

Part of Statistics and Risk Analysis: Distributions.