Skip to content

Median med

The median is the middle value of a dataset. It is the value that separates the higher half from the lower half of the data. If the dataset has an odd number of values, the median is the middle value. If the dataset has an even number of values, the median is the average of the two middle values.

> (med [1 2 3 4 5])
3
> (med [1 2 3 4 5 6])
3.5