Obviously, m 2 has turned out to be given by the usual definition of mean . The computational cost for a mean is proportional to N , the number of points. The cost for completely ordering a list of numbers is ,but complete ordering is not required for finding the median. Hoare provided an algorithm for finding the median which requires about 3 N operations. A computer algorithm based on Hoare's algorithm will be provided for weighted medians.
Weighted medians are analogous to weighted sums.
Obviously if the weight factors are all unity, this reduces to the earlier definition whereas using a weight factor equal to 3, for example, is just like including the same term three times with a weight of 1. From Figure 2 it is apparent that a median is always equal to one of the x i 4 even if the weights are not integers. If the weights are all unity and there is an even number of numbers, then the error norm will be flat between the two middle numbers. A sum of weighted absolute value norms. This is, in effect, a weighted median problem.