Paragraph

For IQR, we first must determine the quartiles. The median (found earlier) already is the second quartile so we have \(Q_2 = 4.5\) million. For the other two, the formula for computing percentiles gives you the 25th percentiile
\begin{gather*} (n+1)p = 51(1/4) = 12.75\\ Q_1 = P^{0.25} = 0.25 \times 1.9 + 0.75 \times 2.1 = 2.05 \end{gather*}
and the 75th percentile
\begin{gather*} (n+1)p = 51(3/4) = 38.25\\ Q_3 = P^{0.75} = 0.75 \times 7 + 0.25 \times 8.3 = 7.325. \end{gather*}
Hence, the IQR = 7.325 - 2.05 = 5.275 million residents.
in-context