Can two distinct datasets of the same size have the same median and the same deviation from a real number?

81 Views Asked by At

Can two distinct datasets of the same size have the same median and the same deviation from any real number? For example Let $a_1 < a_2 < ··· < a_n$ and $b_1 < b_2 < ··· < b_n$ be real numbers such that $\sum_{i=1}^{n} |a_i-x|=\sum_{i=1}^{n}|b_i-x|$,where $x$ is any real. Now can it be proved that $a_i=b_i$?

1

There are 1 best solutions below

6
On BEST ANSWER

The total deviation constraint is enough without the requirement on the median and we can prove that the size of the two sets is the same. Let $c\lt a_1,b_1$ and $d=c-1$. The total deviation of the $a$s from $d$ is greater than the total deviation of the $a$s from $c$ by the number of the $a$s because $c$ is $1$ closer to each one. If the total deviation of the $a$s from $d$ equals the total deviation of the $b$s from $d$ and similarly for $c$ there must be the same number of $a$s and $b$s. As you have done, call that number $n.$

Now assume $a_1 \neq b_1$. WOLOG we can assume $a_1 \lt b_1$ and define $e=\min(\frac 12 (b_1-a_1), \frac 12(a_2-a_1))\gt 0$. We are given that the total deviation of both the $a$s and $b$s from $a_1$ is some number $f$. The total deviation of the $a$s from $a_1+e$ is $f+e-(n-1)e=f-(n-2)e$ because we are going away from $a_1$ and towards all the other $a$s. The total deviation of the $b$s from $a_1+e$ is $f-ne$ because we are going towards all of them. This is a contradiction, so $a_1=b_1$. We can repeat the argument now for $a_2$ and $b_2$ and so on up the line.