Mathematically, this can be expressed as $r_e = \dfrac{\int\limits_{0}^{\infty} \pi \cdot r^3 \cdot n(r)\,dr}{\int\limits_{0}^{\infty} \pi \cdot r^2 \cdot n(r)\,dr}$.