12-16
$${x_{rk} = \frac{1}{M} \sum x_i m_i}$$