Estimating the median from a frequency table