Say I have two independent random variables that occur with two different arbitrary but fixed continuous distributions $D_1$ and $D_2$. I then flip a coin, that occurs heads with probability $p$, to determines if I sample from $D_1$ or $D_2$. How do I calculate the median of this distribution?
If I wanted to calculate the mean, I could use conditional expectation to say: Let $\mu_1$ be the mean of $D_1$, likewise for $\mu_2$ and $D_2$. the expectation for the compound event would then be $p\mu_1 \times (1-p)\mu_2$.
If I compute the median of $D_1$ and $D_2$, can I compute the median of the compound event in a similar manner? I.e. $pm_1 \times (1-p)m_2$?. Does this then generalize to combinations of these compound events?