In reply to Rick Wicklin.

Agree with your proof and conclusion, very thoughtful work! Thanks for sharing this.
However, when dealing with right-censored data, the median estimates from Kaplan-Meier curve may behave eerily: sometimes the overall median is less than the smallest subgroup median or greater than the largest subgroup median. I think this is because the median estimate from K-M curve has a different meaning than what is defined in the simple inequalities and the censored observations complicate the situation. I have simulated numeric example to illustrate this.