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,