Derivative of order statistics --For further background into the question, one can refer to equations
 2.3 and 2.6 (page 1275 of [0])--
Define:
$$g_G(x)=\mbox{med}_Y|x-Y|$$
where $X$ and $Y$ are independent stochastic variables with distribution function $G$;
In the above cited paper, the authors derive a closed form expression for $g_G'(x)$ when $G=\Phi$.
my questions is: How does it come about that when $G=\Phi$ and $x=q$: $$g_G'(x)=\frac{\phi(x-c^{-1})-\phi(x+c^{-1})}{\phi(x+c^{-1})+\phi(x-c^{-1})}$$ 
where $c^{-1}=\mbox{med}_X g_{\Phi}(X)$. That part is not clear to me.
reference:


*

*[0]:Rousseeuw, Peter J.; Croux, Christophe (December 1993),
"Alternatives to the Median Absolute Deviation", Journal of the
American Statistical Association (American Statistical Association)
88 (424): 1273–1283, doi:10.2307/2291267

 A: It seems to me that $\phi$ and $\Phi$ are the PDF and CDF of the standard Gaussian; that is,
\begin{equation}
\phi(x) = \Phi^\prime (x).
\end{equation}
To obtain $g_{\Phi}(x) \equiv {\rm med}_{Y} |x-Y|$ (the CDF of $Y$ is $\Phi$), one should find a distance $a$ such that for exactly half of the members of the Gaussian distribution, the distance from $x$ is greater than $a$ (and of course smaller than $a$ for the other half). This condition amounts to
\begin{equation}
F(x,a) \equiv \Phi(x+a) - \Phi(x-a) = \frac{1}{2}.
\end{equation}
Solving this for $a$ gives $g_{\Phi}(x)$. Therefore obtaining $g_{\Phi}^{\prime}(x)$ boils down to differentiating the implicit function given above. That is,
\begin{equation}
\begin{split}
g_{\Phi}^{\prime}(x) &= - \frac{\partial F/\partial x}{\partial F/\partial a} = \frac{\phi(x-a)-\phi(x+a)}{\phi(x+a)+\phi(x-a)}\\
&=\frac{\phi(x-g_{\Phi}(x))-\phi(x+g_{\Phi}(x))}{\phi(x+g_{\Phi}(x))+\phi(x-g_{\Phi}(x))}.
\end{split}
\end{equation}
Then, using the fact that $g_{\Phi}(q) = 1/c = {\rm med}_{X}g_{\Phi}(X)$, where $q$ is defined by $\Phi(q) = 3/4$, gives
\begin{equation}
g_{\Phi}^{\prime}(q) = \frac{\phi(q - c^{-1})-\phi(q + c^{-1})}{\phi(q + c^{-1})+\phi(q - c^{-1})}.
\end{equation}
Update: How do we know that ${\rm med}_{X}g_{\Phi}(X) = g_{\Phi}(q)$?
Claim: $g_{\Phi}(x)$ is an even function that monotonically decreases as a function of $|x|$.
That this function is even follows from its definition (as an implicit function) given above and the fact that $\Phi(-x) = 1 - \Phi(x)$. It monotonically decreases in $|x|$ because
\begin{equation}
g_{\Phi}^{\prime}(x) \ \Bigg\{\begin{array}{ccc} >0 \ (x>0)\\=0\ (x=0)\\<0\ (x<0)\end{array}.
\end{equation}
One can see this from the expression for $g_{\Phi}^{\prime}(x)$ and the shape of the Gaussian function $\phi$. More rigorously, one should be able to deduce this fact from the following considerations:


*

*$\phi(x) = \phi(-x)$.

*$\phi(x)$ monotonically decreases in $|x|$.

*$a = g_{\Phi}(x)>0$.
Then, the value of $x$ giving the median of $g_{\Phi}(x)$, which we denote as $q$, is where exactly half of the members of the Gaussian distribution falls within $|q|$. Hence  $\Phi(q) = 1/4$ or $3/4$. Evaluating $g_{\Phi}$ at either of the two values (they only differ by their signs, and $g_{\Phi}$ is even) would give ${\rm med}_{X}g_{\Phi}(X)$.
