Quartile
Quartiles divide a dataset into four equal parts, with Q1, Q2 (median), and Q3 marking the boundaries.
Definition
Quartiles are three values that split a sorted dataset into four equal groups: $Q_1$ is the boundary below the first 25%, $Q_2$ is the median (50%), and $Q_3$ is the boundary below the top 25%. $Q_1$ is the median of the lower half and $Q_3$ is the median of the upper half, though different methods (inclusive vs. exclusive of the median) can give slightly different results. Formally, quartiles are special cases of quantiles: $Q_1 = F^{-1}(0.25)$, $Q_2 = F^{-1}(0.50)$, $Q_3 = F^{-1}(0.75)$; for a finite sample, quantile computation uses interpolation, and R implements nine different quantile algorithms (types $1$-$9$), with type $7$ (linear interpolation of order statistics) as the default.
Example
Sorted scores $10$, $20$, $30$, $40$, $50$, $60$, $70$, $80$ give $Q_1 = 25$ (boundary between first and second quarter), $Q_2 = 45$ (median), and $Q_3 = 65$ (boundary between third and fourth quarter). For data $3$, $5$, $7$, $8$, $9$, $11$, $14$, $16$, $21$: median ($Q_2$) $= 9$; lower half $3$, $5$, $7$, $8$ gives $Q_1 = (5+7)/2 = 6$; upper half $11$, $14$, $16$, $21$ gives $Q_3 = (14+16)/2 = 15$; so $\text{IQR} = 15 - 6 = 9$. For the standard normal distribution, $Q_1 = -0.6745$, $Q_2 = 0$, $Q_3 = 0.6745$, giving $\text{IQR} = 1.349$, exact values used to calibrate robust scale estimators for normal data.
Key Insight
Think of quartiles like dividing a line of students into four equal-sized groups by height, with $Q_1$, $Q_2$, and $Q_3$ the three dividing points; together with the IQR, the five-number summary (min, $Q_1$, $Q_2$, $Q_3$, max) captures the shape of a distribution concisely without being affected by outliers. The asymptotic variance of the sample $p$-th quantile is $p(1-p)/(nf(Q_p)^2)$, where $f$ is the PDF, showing that quantiles at the extremes ($p$ near $0$ or $1$) are estimated less precisely, which explains why extreme percentiles require much larger samples for reliable estimation.