From this thread I learned why the median is a nonlinear function. In the context in which I'm working I need to use a linear function.
Googling "approximate the median"+"linear" didn't reveal anything usable, but somehow it seems intuitive to me that some reasonable approximation should be possible with a linear function.
EDIT: I was asked in one of the comments to provide a fuller explanation of the context behind the question. The context is that I'm taking in a bunch of estimates from people about some quantity, and then generating an aggregated prediction them. One of the most obvious things to do is to linearly combine the estimates according to some predetermined weights.
The framework is provided by Davis-Stober et al (2014), who write:
Consider a set of N-many decision makers (DMs), where each DM makes a judgment about the unknown value of a criterion. [...] We take this criterion value to be a random variable, $Y$, with mean $\mu_{y}$ and variance $\sigma^{2}$. [...] A crowd prediction, denoted $C$, is defined as the random variable formed by linearly combining the DMs according to predetermined weights $w_{i}$, $C = \sum_{i=1}^{N} w_{i}X_{i}$, with the restriction that all $w_{i}$ are non-negative and, to ensure uniqueness, $\sum_{i=1}^{N} w_{i} = 1$. The weights $w_{i}$ are not random variables, but rather fixed choices of how to combine crowd member judgments. [...]
Let $\mu_{x}$ by the $N \times 1$ vector of the DM's mean predictions. Let $\Sigma_{xx}$ be the covariance matrix of the $X_{i}$, $i \in \{1, > 2, ..., N\}$ random variables. Let $\sigma_{xy}$ denote the $N \times > 1$ vector of covariances of $Y$ with each $X_{i}$, $i \in > \{1,2,...,N\}$. It is straightforward to show that $E[(C-Y)^2]$ is equal to the following
$E[(C-Y)^{2}]=(u{'}_{x}w - u_{y})^{2} + w{'}\Sigma_{xx}w - 2w{'}\sigma_{xy} + \sigma^{2}_{y}$,
where $w$ is the $N \times 1$ vector of weights, $w_{i}, i \in \{1,2, > ..., N\}$, defining $C$.
So I want to 'break down' $E[(C-Y)^{2}]$ in the way described in the aforementioned paper, but in the context in which I'm working it's more common to use the median instead of the mean. It's been asserted to me that I could get around this problem by using a linear aggregate to approximate the median.
Davis-Stober, C. P., Budescu, D. V., Dana, J., & Broomell, S. B. (2014). When is a crowd wise?. Decision, 1(2), 79. Chicago