median of a discrete random variable