# Would the median of union equals to median of medians?

Given a finite set $$S \subset \mathbb{Z}$$, we can easily obtain its median $$median(S)$$. Given a set of sets $$T = \{ S_1, S_2, \cdots, S_n \}$$. where $$S_i \cap S_j = \emptyset, \forall S_i, S_j \in T$$

We can define two "median", $$M_1 = median(\cup_{S \in T})$$ and $$M_2 = median(\{ median(S)|S \subset T \})$$.

Would $$M_1 == M_2$$ ?

• How are you defining median? Is this the typical median from statistics where you can order the elements of the set? – Jack Neubecker Mar 22 at 3:20
• yes, and i just find a counter-example :( – peng yu Mar 22 at 3:22

for example, $$S_1 = (1, 2, 4)$$, $$S_2 = (3, 10, 11)$$.
$$M_1 = 3.5$$, while $$M_2 = 6$$
• This would be more convincing if you also had an $S_3$ such as $(5, 20,23)$ to avoid the median of even numbers of terms issue – Henry Mar 22 at 3:33
If the definition of median is as from statistics (no other definition is given), here is a counter example. Let $$A = {0,1}$$ and $$B ={1, 10}$$. Then the median of $$A$$ is $$0.5$$ and the median of $$B$$ is $$5.5$$; the median of these values is $$3$$. Whereas the median of the union is $$1$$.