Here, the number of observations is 11 which is odd. Arranging the data into ascending order we have 3,3,4,5, 7,9,10,12,18,19,21.
Now, median =(211+1)th or 6th observation =9
The absolute values of the respective deviations from the median, i.e., ∣xi−M∣ are 6,6,5,4,2,0,1,3,9,10,12.
Therefore, i=1∑11∣xi−M∣=58
and MD(M)=111i=1∑11∣xi−M∣ =111×58=5.27