Derivative of the median? Suppose $\{f_i(x)\}$ is a finite set of continuous, differentiable, real functions on an interval.
How does one measure the rate of change in the median? In other words,  with $MED$ representing the median, what is the best way to compute/make sense out of $\frac{d}{dx}MED(f_i(x))$ since $MED(f_i(x))$ may not be a differentiable function (e.g. there's a lot of intersections of the $f_i$ in the middle)?
For comparison, consider the average. Since it's a linear combination of the values, $$AVG(f'_i(x)) = \frac{d}{dx}AVG(f_i(x)).$$
In the median case, the right side might not be defined and the left side doesn't really measure how the median is changing (I don't think).
 A: Let's look at an example: suppose $f_1(x) = 4x+12, f_2(x)=x^2$, and $f_3(x) = 2x^3+5x^2$, where $f_i$ is defined on $[-1,7]$.
You can check that:
$$
f_1(x) \geq f_3(x)\geq f_2(x) \phantom{NNN} \textrm{for }-1\leq x \leq \frac{3}{2}
$$
$$
f_3(x) \geq f_1(x)\geq f_2(x) \phantom{NNN} \textrm{for }\frac{3}{2}\leq x \leq 6
$$
$$
f_3(x) \geq f_2(x)\geq f_1(x) \phantom{NNN} \textrm{for }6\leq x \leq 7
$$
(Note that $f_3(0)=f_2(0)$ but otherwise $f_3>f_2$ on $[-1,3/2]$.)
So the median of these functions on $[-1,7]$ is:
$$
M(x)=\begin{cases}
f_3(x), & \textrm{if }-1\leq x \leq 3/2 \\
f_1(x), & \textrm{if }3/2 < x \leq 6 \\
f_2(x), & \textrm{if }6 < x \leq 7
\end{cases}
$$
Thus $M$ is differentiable except at $x=3/2$ and $x=6$:
$$
M'(x) = \begin{cases}
6x^2 + 10x, & \textrm{if }-1<  x < 3/2 \\
4, & \textrm{if }3/2 < x < 6 \\
2x, & \textrm{if }6 < x < 7
\end{cases}
$$
(Unfortunately $M'$ has non-removable discontinuities at $x=3/2$ and $x=6$, so this is the best we can do.  And it's really pretty good!)
So if your $f_i$ functions admit only finitely many pairwise intersections on your interval, then you should be able to measure the rate of change of the median at all but finitely many points.
(It's not surprising that the left-hand and right-hand derivatives would not coincide at the intersection points: at those points you have one function "overtaking" another, so it would make sense that one function would be changing faster than the other.)
If you happen to have an even number of functions, then you'll still want to find all the pairwise intersection points, but then you'll just replace the "middle two" by their mean $\frac{f_i+f_j}{2}$ on each subinterval.
