The weighted median is described in Wikipedia in the following way: link.
What is the weighted median of the following set of numbers $\{1,2,3,4,5\}$ with each number having weights $\{0.1, 0.1, 0.1, 0.1, 0.6\}$, respectively?
Note that, the sum of weights is $\displaystyle \sum_{i=1}^{5}w_{i}=1$, but there is no element $x_{k}$, such that:
$$\sum_{i=1}^{k-1}w_{i}\leq 0.5\qquad\text{and}\qquad \sum_{i=k+1}^{5}w_{i}\leq 0.5.$$
Namely:
- For $x_{2}=2$, we have
$$\sum_{i=1}^{1}w_{i}=0.1\leq 0.5\qquad\text{but}\qquad \sum_{i=3}^{5}w_{i}=0.8.$$
- For $x_{3}=3$, we have
$$\sum_{i=1}^{2}w_{i}=0.2\leq 0.5\qquad\text{but}\qquad \sum_{i=4}^{5}w_{i}=0.7.$$
- For $x_{4}=4$, we have
$$\sum_{i=1}^{3}w_{i}=0.3\leq 0.5\qquad\text{but}\qquad \sum_{i=5}^{5}w_{i}=0.6.$$
I choose $x_5$. Note $$ \sum_{i=1}^4 w_i = 0.4,\qquad \sum_{i=6}^5 w_i = 0, $$ the last is an empty sum.