Noon Barbari
Sign up
Statistics

Median

Middle value of a sorted series — robust to outliers, unlike the mean.

The median is the middle value of a sorted series — half the observations lie above it, half below. It is a robust measure of central tendency: a few extreme outliers move the median much less than they move the mean.

In trading the median trade size, median holding period, or median drawdown often tells you more than the mean about typical experience. The mean can be dominated by a handful of outliers; the median describes the day-to-day.

When the return distribution is symmetric, mean and median coincide. When it is skewed (as most financial return distributions are), mean and median diverge — by how much is itself a useful statistic.

Formula

median(x) = x_{(⌈N/2⌉)} if N is odd; (x_{(N/2)} + x_{(N/2+1)}) / 2 if N is even

Example

Trade returns sorted: [-3%, -1%, 0%, 2%, 50%]. Mean = 9.6%, median = 0%. The median is a much better description of what most trades did.

How Noon Barbari uses Median

Every concept here is implemented in the platform. Open the relevant docs or tool to see it in action.

How we report backtests

Related terms

Back to glossary