I have several, say for example three, distributed variables (X, Y and Z). The distributions can be whatever. These variables are inserted in a mathematical expression, e.g. $f(X,Y,Z) = C \frac{X}{Y}+Z$. f(X,Y,Z) will then have some (most likely unknown) distribution.
My question is: If I insert the medians for X, Y and Z into the expression, will the result always be the median of the distribution (whatever it is) of f(X,Y,Z)?
It is of course true for certain distributions and certain mathematical expressions (a sum of normally distributed independent variables is a normal distribution and the sum of the medians is the median of the resulting normal distribution). But is this generally true for all combinations of distributions and mathematical expressions?
Sidenote: This is my first question at StackExchange and I had a difficult time coming up with a descriptive title. So if someone comes up with a better title, I'll gladly edit or something if that is possible.
Edit 11 May 2020: My colleague found this: https://en.wikipedia.org/wiki/Jensen's_inequality (you need to copy the link), which apparently answers my question, at least partially.
In general, no. For instance, let $X_1$ and $X_2$ be independent and identically distributed exponential random variables with mean $1$; i.e., $$F_{X_1}(x) = F_{X_2}(x) = \begin{cases} 0, & x < 0 \\ 1 - e^{-x}, & x \ge 0. \end{cases}$$ Then the medians of $X_1$ and $X_2$ are equal to $m = \log 2$. Now let $Y = X_1 + X_2$; then $Y \sim \operatorname{Gamma}(2,1)$, with density $$f_Y(y) = y e^{-y}, \quad y \ge 0.$$ But the median of $Y$ satisfies $$\int_{y=0}^{m_Y} y e^{-y} \, dy = 1 - (1+m_Y) e^{-m_Y} = \frac{1}{2}.$$ If it were true that $m_Y = 2m = 2 \log 2$ (since your claim would imply the median of the sum of two random variables equals the sum of the medians of each), then $2 \log 2$ would be a solution to this equation, but it is not, since $$1 - (1 + 2 \log 2) e^{-2 \log 2} = \frac{3}{4} - \frac{\log 2}{2} \ne \frac{1}{2}.$$ In fact, the approximate value of $m_Y$ is $1.6783469900166606533$, whereas $2 \log 2 \approx 1.3862943611198906188$. Since the claim does not hold even for this very simple case, it certainly should not be expected to hold for arbitrary functions of finitely many arbitrary random variables.