The median of a given data set is the middle value when the data is arranged in either ascending or descending order. If the dataset has an odd number of observations, the median is the middle value. If the data set has an even number of observations, themedian is the average of the two middle values.