Weighted median is the middle value of a set of numbers that each have weights attached to them. It is determined by expanding the set of numbers according to their weights when sorting them. For instance, if the numbers are 5 (weight = 3), 4 (weight = 1), and 7 (weight = 9), the expanded set looks like:
4 5 5 5 7 7 7 7 7 7 7 7 7
The middle value is a 7, so the weighted median of this set is 7.