More generally, you want a function that finds the middle of the pack
There's an alternative interpretation of median that you could conceivably want instead: In 1-D the median elements split the set into two chunks, one "lesser" and one "greater", with at most half the elements in each chunk. In n-D we might generalize "lesser/greater" to "inner/outer", and only peel half-way. That is, instead of finding the innermost city core, we take as the median elements those on the boundary between downtown and the suburbs. -------- A carefully implemented peeling algorithm must account for the population at each point. Each peel step decrements the multiplicity, removing the point from the hull candidates when it reaches zero. This naturally generalizes to point distributions with fractional densities: each step subtracts the minimum multiplicity from the points on the hull. -------- I can even visualize how this metaphor could be applied to a continuous spatial distribution--kind of like a rock in acid--the higher densities dissolve slower. -------- So, how does this all work for distributions with infinite domains? Do they have medians if they have finite integrals? -------- What happens if we generalize the density further, say from fractional values to complex quantities?