Estimating the variance of the sample median, discrete case