Statistician Thomas Lumley explains different ways of calculating an average, and the difference between median and mean.