$\gamma$ be a normalised regular density with compact support. The median of $\gamma$ is $$\begin{aligned}
\operatorname{med}(\gamma)&:=
\mathop{\operatorname{argmin}}\limits_{\mu\in\mathbb{R}} 
E_{\gamma}(\mu)\;, &
E_{\gamma}(\mu)&:=
\int\nolimits_{\mathbb{R}}
\gamma(x)\lvert \mu-x\rvert
\,\mathrm{d}x
\;.
\label{medd-E}\end{aligned}$$

The requirement of compact support of $\gamma$ can be replaced by a weaker condition that ensures that the integral in $E_\gamma$ converges.

Non-uniqueness of the median is much less of a problem here than in the case of discrete data as it occurs only if the support of $\gamma$ is contained in two separate intervals each of which contains exactly half the total weight of $\gamma$. In particular, if the support of $\gamma$ is an interval, and $\gamma$ has only isolated zeros within this interval, the median is unique.

Equivariance Properties
-----------------------

As the median in the sense of , or , depends on nothing but the total order of the data, it can be generalised to data in any totally ordered set $R$ instead of $\mathbb{R}$. Moreover, the median is equivariant w.r.t. any strictly monotonically increasing map $T:R\to R$, i.e., $$\begin{aligned}
T\left(\operatorname{med}(\mathcal{X})\right) &= 
\operatorname{med}\bigl(T(\mathcal{X})\bigr)\end{aligned}$$ where $$\begin{aligned}
T(\mathcal{X}) &:= \{ T(x) ~|~ x\in\mathcal{X} \}\end{aligned}$$ denotes element-wise application of $T$ to all members of $\mathcal{X}$ (retaining their cardinalities), and similarly $$\begin{aligned}
m\left(\operatorname{med}(\mathcal{X},w)\right) &=
\operatorname{med}\bigl(T(\mathcal{X},w\circ T^{-1})\bigr) 