2

Suppose I have N individuals (N is odd for convenience). Associated with these individuals, two sets (S1 and S2) which contain integer numbers. E.g. S1 is the salary/hour and S2 is the bonus/hour:

  • Individuals = {A,B,C,D,E}
  • S1 = {A=9; B=11, C=13; D=15, E=20}
  • S2 = {A=6; B=1, C=4; D=5, E=1}

(Note that S1 is ordered while S2 is not). The medians of each set are respectively 13 & 4.

Suppose now, that for each individual I do the sum of the two sets:

S3 = {A=15; B=12, C=17; D=20, E=21}.

The median of S3 is equal to 17.

So, in this case, median(S1+S2) = median(S1)+median(S2).

My question is, in which conditions this relation is true ?

By doing tests, I came to the conclusion that if the median individual in set1 is the same as in set2 then the relationship is true... Is there other conditions ? How to prove it ?

Thank you,

pchat12
  • 23

1 Answers1

1

Your "conclusion that if the median individual in set 1 is the same as in set 2 then the relationship is true" is not always correct

Consider a very slight change to your numbers, swapping the bonuses for $D$ and $E$

  • Individuals $\{A,B,C,D,E\}$
  • $S_1 = \{A=9, \,\,\,B=11, C=13, D=15, E=20\}$
  • $S_2 = \{A=6, \,\,\,B=1,\,\, C=4,\,\,\,\, D=1, \,\,\,E=5\}$
  • $S_3 = \{A=15, B=12, C=17, D=16, E=25\}$

Then the median of $S_3$ is $16$ corresponding to individual $D$, not $C$ who provides the median of $13$ for $S_1$ and of $4$ for $S_2$ to give $17$ for $S_3$

This is an illustration that medians do not have the nice linearity properties of means. So getting $\text{median}(S_1)+\text{median}(S_2) = \text{median}(S_1+S_2)$ is not guaranteed in this case

A case where it is true is where both $S_1$ and $S_2$ are both increasing across the individuals (or both decreasing)

Henry
  • 157,058
  • Thank you. Very clear explanation. The concept I was missing to formulate the problem correctly was the linearity of the median function. By doing a better research I found this post: https://stats.stackexchange.com/questions/232261/how-can-i-prove-that-the-median-is-a-nonlinear-function – pchat12 Jun 21 '19 at 09:50