Visualization is key to solving this question.
Number of integers = 7.
So let's visualize 7 places as shown below
_ _ _ _ _ _ _The median is the dash in red.
Now, lets see which number / numbers can be the median.
Say if 1 is the median, the data set should contain
- three numbers which are less than or equal to 1 : These numbers will lie on the left of 1 (i.e. median)
- three numbers which are greater than or equal to 1 : These numbers will lie to the right of 1 (i.e. median)
However, the data set already has 5 numbers which are greater than 1, so
1 cannot be the median.
Similarly
5 cannot be the median by the same reasoning.
Now lets see if 9 can be the median
_ _ _ 9 _ _ _If 9 is the median, 1 and 5 will lie to the left of 9, and 13, 19 and 21 will lie to the right of y. So if, we can place x to the left of y, 9 could possibly be the median.
We also know that 9 is the arithmetic mean of the data set.
So \(\frac{9+5+13+x+19+21+1}{7} = 9\)
\(\frac{68 + x }{7} = 9\)
x = -5 ; well this is valid, because -5 lies to the left of 9.
Similarly for 13 : The three places to the left of 13 are taken by 1, 5 and 9, so x should be \(\geq{13}\)
_ _ _ 13 _ _ _\(\frac{68 + x }{7} = 13\)
x = 23
This is also valid.
Now
19 and 21 cannot be the median (same reason for which we eliminated 1 and 5).
So the only possible values of x = {-5 , 23 }
Sum = 23 - 5 = 18
Option C