Existence of a Smoothed Median Function The median of a finite set of data depends on the data in a continuous, but non-smooth way; this can be demonstrated by considering the median of the data set $\{ 0, 1, x \}$ as $x$ varies.
I wanted to know whether people have derived median-like statistics which depend smoothly on the data. By median-like, I mean roughly that 


*

*they recover location parameters, 

*they have some level of robustness associated to them, and ideally, 

*they recover the median in some limit. 


For example, it would be nice to have a parametrised family of functions $\{ \text{med}_\varepsilon \}_{\varepsilon > 0}$ which are each median-like, and such that as $\varepsilon \to 0$, one has that $\text{med}_\varepsilon ( \mathcal{D} ) \to \text{median} ( \mathcal{D} )$.
To clarify: I am particularly interested in knowing whether this exists in the literature already. If people have their own ideas for how to derive statistics with these properties, I'll gladly hear them out, but I would prefer to hear about tried-and-tested ideas.
 A: Two standard families that do what you're asking for are Huber's M-estimators and (symmetrically) trimmed means. Trimmed means trim a percentage of $\alpha$ largest and smallest observations and take the mean of the rest. $\alpha=0$ gives the mean and $\alpha$ approaching 50% converges to the median.
Huber's M-estimators are implicitly defined as minimising $\sum_{i=1}^n\rho(x_i,\theta)$ over $\theta$. The mean is obtained by $\rho(x,\theta)=(x-\theta)^2$, the median by $\rho(x,\theta)=|x-\theta|$. Huber proposed $\rho$-functions that behave like squares around zero and like the absolute value outside some interval $[-c,c]$ (with standardisation so that the whole thing is continuous). These are another "bridge" between means and medians and have a number of optimality features for distributions "close" but not equal to the normal distribution, as can be found in the Robust Statistics literature. The choice of  $[-c,c]$ in practice depends on the scaling of the data, and $\rho$ is often chosen as function of $\frac{|x-\theta|}{MAD}$, where MAD is the median absolute deviation from the median.  
