Standardized median estimation

Is there a 'standard' way to calculate an estimated median value for a given data-set that either never references a data point in the set, or is unlikely to? I'm familiar with the median of medians approach, but I'm not sure what it's limitations are.

Example: Assume each element in the data-set is associated with a unique individual (e.g it can be mapped back 1-1)

Data = {1, 2, 3, 4, 5, 6}


Note than when the number of elements in the dataset is even, the median is defined as (3+4)/2=3.5, which does not correlate with a value in the data-set, and hence does not map back to an individual.

The same cannot be said when the number of elements is odd.

Data = {1, 2, 3, 4, 5}


Here, the median is 3, which can be mapped back to an individual. So perhaps there's an interpolation technique that can be applied when the number of elements is odd?

Hopefully this clears things up.

• I really don't see what you mean by your first sentence. Please explain what you're talking about. May 23, 2017 at 9:39
• Basically, is there a standard algorithm that computes percentiles that are not exact. Preserve the shape of the distribution but do not give the exact distribution. May 23, 2017 at 20:39
• I am no more enlightened. What do you mean by "percentiles that are not exact"? In what sense does inexactness apply? What do you mean by "preserve the shape of the distribution but do not give the exact distribution"? I also don't see how that second part relates to "either never references a data point in the set, or is unlikely to". I really have no clear concept what you're asking for. If it's not clear to either whuber or myself what you're asking, I expect it will be unclear to most people here. Please consider explaining in plain and simple terms what underlying problem you have May 23, 2017 at 22:36
• The sample median is defined differently between odd and even sample sizes. In odd samples it is the middle value as you say. For even sample sizes it has to be between the two observations closest to the middle. Taking the average between those two observations is the most common way. But any value between the two could be considered a median. May 24, 2017 at 17:55
• It sounds like your question is, "is there a definition of the median that is the same for even- and odd-sized samples?". Is that an accurate characterization? May 24, 2017 at 20:39

The simple answer to your question is that your suggested calculation of the median in a sample having even $n$ is a good one, but certainly not the only one nor is it universally agreed upon as the best one.

If you think of the sample median as the empirical quantile function evaluated at 0.5, you will always select the $ceiling(n/2)$ order statistic as the median. This has the property that the median is always a member of the sample. We choose the lower value in even $n$ samples because the empirical distribution function and empirical quantile function are left continuous.

Suppose in R we take a sample of normal variates:

set.seed(123)
x <- rnorm(6)
m <- median(x)
plot(ecdf(x))
segments(min(x), 0.5, m, 0.5, col='red')
segments(m, 0.5, m, 0, col='red')
text(m, .25, 'Sample median', cex=0.5, srt=90, pos=2)


Gives us:

Changing 6 to 7

A radical idea is that instead of the median being a single number, it could be whole range of values which interpolates the $n/2$ and $n/2+1$ domain when n is even, making a kind of functional inverse.